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 6fece555d..4e947cd4e 100644
--- a/auth-sia.c
+++ b/auth-sia.c
@@ -61,35 +61,46 @@ session_setup_sia(char *user, char *tty)
61 host = get_canonical_hostname (options.reverse_mapping_check); 61 host = get_canonical_hostname (options.reverse_mapping_check);
62 62
63 if (sia_ses_init(&ent, saved_argc, saved_argv, host, user, tty, 0, 63 if (sia_ses_init(&ent, saved_argc, saved_argv, host, user, tty, 0,
64 NULL) != SIASUCCESS) 64 NULL) != SIASUCCESS) {
65 fatal("sia_ses_init failed"); 65 error("sia_ses_init failed");
66 exit(1);
67 }
66 68
67 if ((pw = getpwnam(user)) == NULL) { 69 if ((pw = getpwnam(user)) == NULL) {
68 sia_ses_release(&ent); 70 sia_ses_release(&ent);
69 fatal("getpwnam(%s) failed: %s", user, strerror(errno)); 71 error("getpwnam(%s) failed: %s", user, strerror(errno));
72 exit(1);
70 } 73 }
71 if (sia_make_entity_pwd(pw, ent) != SIASUCCESS) { 74 if (sia_make_entity_pwd(pw, ent) != SIASUCCESS) {
72 sia_ses_release(&ent); 75 sia_ses_release(&ent);
73 fatal("sia_make_entity_pwd failed"); 76 error("sia_make_entity_pwd failed");
77 exit(1);
74 } 78 }
75 79
76 ent->authtype = SIA_A_NONE; 80 ent->authtype = SIA_A_NONE;
77 if (sia_ses_estab(sia_collect_trm, ent) != SIASUCCESS) 81 if (sia_ses_estab(sia_collect_trm, ent) != SIASUCCESS) {
78 fatal("couldn't establish session for %s from %s", user, 82 error("couldn't establish session for %s from %s", user,
79 host); 83 host);
84 exit(1);
85 }
80 86
81 if (setpriority(PRIO_PROCESS, 0, 0) == -1) { 87 if (setpriority(PRIO_PROCESS, 0, 0) == -1) {
82 sia_ses_release(&ent); 88 sia_ses_release(&ent);
83 fatal("setpriority failed: %s", strerror (errno)); 89 error("setpriority failed: %s", strerror (errno));
90 exit(1);
84 } 91 }
85 92
86 if (sia_ses_launch(sia_collect_trm, ent) != SIASUCCESS) 93 if (sia_ses_launch(sia_collect_trm, ent) != SIASUCCESS) {
87 fatal("couldn't launch session for %s from %s", user, host); 94 error("couldn't launch session for %s from %s", user, host);
95 exit(1);
96 }
88 97
89 sia_ses_release(&ent); 98 sia_ses_release(&ent);
90 99
91 if (setreuid(geteuid(), geteuid()) < 0) 100 if (setreuid(geteuid(), geteuid()) < 0) {
92 fatal("setreuid failed: %s", strerror (errno)); 101 error("setreuid failed: %s", strerror (errno));
102 exit(1);
103 }
93} 104}
94 105
95#endif /* HAVE_OSF_SIA */ 106#endif /* HAVE_OSF_SIA */