summaryrefslogtreecommitdiff
path: root/session.c
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2000-11-17 03:47:20 +0000
committerBen Lindstrom <mouring@eviladmin.org>2000-11-17 03:47:20 +0000
commit49a79c09762613f29601ef2470d13952168021be (patch)
tree140539420c10c5b358481cadcec495a5a41103fd /session.c
parentbaaa2c05dd789bdce64fa7eb5697a5f969d68288 (diff)
- (stevek) Reworked progname support.
- (bal) Misplaced #include "includes.h" in bsd-setproctitle.c. Patch by Shinichi Maruyama <marya@st.jip.co.jp> I assume the progname patch was finished. I believe stevek is on vacation, but it passes compiling under Linux and NeXTStep.
Diffstat (limited to 'session.c')
-rw-r--r--session.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/session.c b/session.c
index b94c8e84d..890e16d59 100644
--- a/session.c
+++ b/session.c
@@ -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 */
133extern ServerOptions options; 136extern ServerOptions options;
134#ifdef HAVE___PROGNAME
135extern char *__progname; 137extern char *__progname;
136#else /* HAVE___PROGNAME */
137static const char *__progname = "sshd";
138#endif /* HAVE___PROGNAME */
139
140extern int log_stderr; 138extern int log_stderr;
141extern int debug_flag; 139extern int debug_flag;
142extern unsigned int utmp_len; 140extern 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 */