summaryrefslogtreecommitdiff
path: root/auth-sia.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2001-04-16 18:37:05 +1000
committerDamien Miller <djm@mindrot.org>2001-04-16 18:37:05 +1000
commit364a9bd9ce0fa0c357e55306df56e47883a591f9 (patch)
treeaa3973186d00cc3be06f9b3af3602b83e381a288 /auth-sia.c
parent3b12614396192aa0e7b62cddf593c440feb70d2f (diff)
- Fix OSF SIA support displaying too much information for quiet
logins and logins where access was denied by SIA. Patch from Chris Adams <cmadams@hiwaay.net>
Diffstat (limited to 'auth-sia.c')
-rw-r--r--auth-sia.c33
1 files changed, 22 insertions, 11 deletions
diff --git a/auth-sia.c b/auth-sia.c
index 6fece555..4e947cd4 100644
--- a/auth-sia.c
+++ b/auth-sia.c
@@ -61,35 +61,46 @@ session_setup_sia(char *user, char *tty)
host = get_canonical_hostname (options.reverse_mapping_check);
if (sia_ses_init(&ent, saved_argc, saved_argv, host, user, tty, 0,
- NULL) != SIASUCCESS)
- fatal("sia_ses_init failed");
+ NULL) != SIASUCCESS) {
+ error("sia_ses_init failed");
+ exit(1);
+ }
if ((pw = getpwnam(user)) == NULL) {
sia_ses_release(&ent);
- fatal("getpwnam(%s) failed: %s", user, strerror(errno));
+ error("getpwnam(%s) failed: %s", user, strerror(errno));
+ exit(1);
}
if (sia_make_entity_pwd(pw, ent) != SIASUCCESS) {
sia_ses_release(&ent);
- fatal("sia_make_entity_pwd failed");
+ error("sia_make_entity_pwd failed");
+ exit(1);
}
ent->authtype = SIA_A_NONE;
- if (sia_ses_estab(sia_collect_trm, ent) != SIASUCCESS)
- fatal("couldn't establish session for %s from %s", user,
+ if (sia_ses_estab(sia_collect_trm, ent) != SIASUCCESS) {
+ error("couldn't establish session for %s from %s", user,
host);
+ exit(1);
+ }
if (setpriority(PRIO_PROCESS, 0, 0) == -1) {
sia_ses_release(&ent);
- fatal("setpriority failed: %s", strerror (errno));
+ error("setpriority failed: %s", strerror (errno));
+ exit(1);
}
- if (sia_ses_launch(sia_collect_trm, ent) != SIASUCCESS)
- fatal("couldn't launch session for %s from %s", user, host);
+ if (sia_ses_launch(sia_collect_trm, ent) != SIASUCCESS) {
+ error("couldn't launch session for %s from %s", user, host);
+ exit(1);
+ }
sia_ses_release(&ent);
- if (setreuid(geteuid(), geteuid()) < 0)
- fatal("setreuid failed: %s", strerror (errno));
+ if (setreuid(geteuid(), geteuid()) < 0) {
+ error("setreuid failed: %s", strerror (errno));
+ exit(1);
+ }
}
#endif /* HAVE_OSF_SIA */