From 49a79c09762613f29601ef2470d13952168021be Mon Sep 17 00:00:00 2001 From: Ben Lindstrom Date: Fri, 17 Nov 2000 03:47:20 +0000 Subject: - (stevek) Reworked progname support. - (bal) Misplaced #include "includes.h" in bsd-setproctitle.c. Patch by Shinichi Maruyama I assume the progname patch was finished. I believe stevek is on vacation, but it passes compiling under Linux and NeXTStep. --- session.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'session.c') 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 $"); #endif /* WITH_IRIX_PROJECT */ #ifdef WITH_IRIX_JOBS #include -#endif +#endif +#ifdef WITH_IRIX_AUDIT +#include +#endif /* WITH_IRIX_AUDIT */ #if defined(HAVE_USERSEC_H) #include @@ -131,12 +134,7 @@ do_child(const char *command, struct passwd * pw, const char *term, /* import */ extern ServerOptions options; -#ifdef HAVE___PROGNAME extern char *__progname; -#else /* HAVE___PROGNAME */ -static const char *__progname = "sshd"; -#endif /* HAVE___PROGNAME */ - extern int log_stderr; extern int debug_flag; extern unsigned int utmp_len; @@ -1104,7 +1102,6 @@ do_child(const char *command, struct passwd * pw, const char *term, strerror(errno)); } # endif /* WITH_IRIX_JOBS */ - # ifdef WITH_IRIX_ARRAY /* initialize array session */ if (jid == 0) { @@ -1123,6 +1120,14 @@ do_child(const char *command, struct passwd * pw, const char *term, fatal("Failed to initialize project %d for %s: %.100s", (int)projid, pw->pw_name, strerror(errno)); # endif /* WITH_IRIX_PROJECT */ +#ifdef WITH_IRIX_AUDIT + if (sysconf(_SC_AUDIT)) { + debug("Setting sat id to %d", (int) pw->pw_uid); + if (satsetid(pw->pw_uid)) + debug("error setting satid: %.100s", strerror(errno)); + } +#endif /* WITH_IRIX_AUDIT */ + /* Permanently switch to the desired uid. */ permanently_set_uid(pw->pw_uid); # endif /* HAVE_LOGIN_CAP */ -- cgit v1.2.3