diff options
Diffstat (limited to 'auth-sia.c')
-rw-r--r-- | auth-sia.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/auth-sia.c b/auth-sia.c index cae5f0912..cd2dcb840 100644 --- a/auth-sia.c +++ b/auth-sia.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include "log.h" | 31 | #include "log.h" |
32 | #include "servconf.h" | 32 | #include "servconf.h" |
33 | #include "canohost.h" | 33 | #include "canohost.h" |
34 | #include "uidswap.h" | ||
34 | 35 | ||
35 | #include <sia.h> | 36 | #include <sia.h> |
36 | #include <siad.h> | 37 | #include <siad.h> |
@@ -83,7 +84,7 @@ session_setup_sia(struct passwd *pw, char *tty) | |||
83 | 84 | ||
84 | host = get_canonical_hostname(options.use_dns); | 85 | host = get_canonical_hostname(options.use_dns); |
85 | 86 | ||
86 | if (sia_ses_init(&ent, saved_argc, saved_argv, host, pw->pw_name, | 87 | if (sia_ses_init(&ent, saved_argc, saved_argv, host, pw->pw_name, |
87 | tty, 0, NULL) != SIASUCCESS) | 88 | tty, 0, NULL) != SIASUCCESS) |
88 | fatal("sia_ses_init failed"); | 89 | fatal("sia_ses_init failed"); |
89 | 90 | ||
@@ -100,11 +101,11 @@ session_setup_sia(struct passwd *pw, char *tty) | |||
100 | if (sia_ses_launch(sia_collect_trm, ent) != SIASUCCESS) | 101 | if (sia_ses_launch(sia_collect_trm, ent) != SIASUCCESS) |
101 | fatal("Couldn't launch session for %s from %s", | 102 | fatal("Couldn't launch session for %s from %s", |
102 | pw->pw_name, host); | 103 | pw->pw_name, host); |
103 | 104 | ||
104 | sia_ses_release(&ent); | 105 | sia_ses_release(&ent); |
105 | 106 | ||
106 | if (setreuid(geteuid(), geteuid()) < 0) | 107 | setuid(0); |
107 | fatal("setreuid: %s", strerror(errno)); | 108 | permanently_set_uid(pw); |
108 | } | 109 | } |
109 | 110 | ||
110 | #endif /* HAVE_OSF_SIA */ | 111 | #endif /* HAVE_OSF_SIA */ |