From 364a9bd9ce0fa0c357e55306df56e47883a591f9 Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Mon, 16 Apr 2001 18:37:05 +1000 Subject: - Fix OSF SIA support displaying too much information for quiet logins and logins where access was denied by SIA. Patch from Chris Adams --- auth-sia.c | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) (limited to 'auth-sia.c') 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 */ -- cgit v1.2.1