diff options
Diffstat (limited to 'session.c')
-rw-r--r-- | session.c | 19 |
1 files changed, 12 insertions, 7 deletions
@@ -57,7 +57,10 @@ RCSID("$OpenBSD: session.c,v 1.43 2000/11/06 23:04:56 markus Exp $"); | |||
57 | #endif /* WITH_IRIX_PROJECT */ | 57 | #endif /* WITH_IRIX_PROJECT */ |
58 | #ifdef WITH_IRIX_JOBS | 58 | #ifdef WITH_IRIX_JOBS |
59 | #include <sys/resource.h> | 59 | #include <sys/resource.h> |
60 | #endif | 60 | #endif |
61 | #ifdef WITH_IRIX_AUDIT | ||
62 | #include <sat.h> | ||
63 | #endif /* WITH_IRIX_AUDIT */ | ||
61 | 64 | ||
62 | #if defined(HAVE_USERSEC_H) | 65 | #if defined(HAVE_USERSEC_H) |
63 | #include <usersec.h> | 66 | #include <usersec.h> |
@@ -131,12 +134,7 @@ do_child(const char *command, struct passwd * pw, const char *term, | |||
131 | 134 | ||
132 | /* import */ | 135 | /* import */ |
133 | extern ServerOptions options; | 136 | extern ServerOptions options; |
134 | #ifdef HAVE___PROGNAME | ||
135 | extern char *__progname; | 137 | extern char *__progname; |
136 | #else /* HAVE___PROGNAME */ | ||
137 | static const char *__progname = "sshd"; | ||
138 | #endif /* HAVE___PROGNAME */ | ||
139 | |||
140 | extern int log_stderr; | 138 | extern int log_stderr; |
141 | extern int debug_flag; | 139 | extern int debug_flag; |
142 | extern unsigned int utmp_len; | 140 | extern unsigned int utmp_len; |
@@ -1104,7 +1102,6 @@ do_child(const char *command, struct passwd * pw, const char *term, | |||
1104 | strerror(errno)); | 1102 | strerror(errno)); |
1105 | } | 1103 | } |
1106 | # endif /* WITH_IRIX_JOBS */ | 1104 | # endif /* WITH_IRIX_JOBS */ |
1107 | |||
1108 | # ifdef WITH_IRIX_ARRAY | 1105 | # ifdef WITH_IRIX_ARRAY |
1109 | /* initialize array session */ | 1106 | /* initialize array session */ |
1110 | if (jid == 0) { | 1107 | if (jid == 0) { |
@@ -1123,6 +1120,14 @@ do_child(const char *command, struct passwd * pw, const char *term, | |||
1123 | fatal("Failed to initialize project %d for %s: %.100s", | 1120 | fatal("Failed to initialize project %d for %s: %.100s", |
1124 | (int)projid, pw->pw_name, strerror(errno)); | 1121 | (int)projid, pw->pw_name, strerror(errno)); |
1125 | # endif /* WITH_IRIX_PROJECT */ | 1122 | # endif /* WITH_IRIX_PROJECT */ |
1123 | #ifdef WITH_IRIX_AUDIT | ||
1124 | if (sysconf(_SC_AUDIT)) { | ||
1125 | debug("Setting sat id to %d", (int) pw->pw_uid); | ||
1126 | if (satsetid(pw->pw_uid)) | ||
1127 | debug("error setting satid: %.100s", strerror(errno)); | ||
1128 | } | ||
1129 | #endif /* WITH_IRIX_AUDIT */ | ||
1130 | |||
1126 | /* Permanently switch to the desired uid. */ | 1131 | /* Permanently switch to the desired uid. */ |
1127 | permanently_set_uid(pw->pw_uid); | 1132 | permanently_set_uid(pw->pw_uid); |
1128 | # endif /* HAVE_LOGIN_CAP */ | 1133 | # endif /* HAVE_LOGIN_CAP */ |