diff options
author | Damien Miller <djm@mindrot.org> | 2001-02-16 12:12:41 +1100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2001-02-16 12:12:41 +1100 |
commit | 217f567187a9b1d32019666151d702c87332c72b (patch) | |
tree | faa72af41f566ce6ba47cb1540c7a757e02a7333 | |
parent | 5dfe976cdfbc5703dfbbd0783f1328be0007eca3 (diff) |
- (djm) Set "login ID" on systems with setluid. Only enabled for SCO
OpenServer for now. Based on patch from svaughan <svaughan@asterion.com>
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | configure.in | 5 | ||||
-rw-r--r-- | session.c | 7 |
3 files changed, 12 insertions, 4 deletions
@@ -11,6 +11,8 @@ | |||
11 | - (djm) USE_PIPES for a few more sysv platforms | 11 | - (djm) USE_PIPES for a few more sysv platforms |
12 | - (djm) Cleanup configure.in a little | 12 | - (djm) Cleanup configure.in a little |
13 | - (djm) Ask users to check config.log when we can't find necessary libs | 13 | - (djm) Ask users to check config.log when we can't find necessary libs |
14 | - (djm) Set "login ID" on systems with setluid. Only enabled for SCO | ||
15 | OpenServer for now. Based on patch from svaughan <svaughan@asterion.com> | ||
14 | 16 | ||
15 | 20010215 | 17 | 20010215 |
16 | - (djm) Move PAM session setup back to before setuid to user. Fixes | 18 | - (djm) Move PAM session setup back to before setuid to user. Fixes |
@@ -3984,4 +3986,4 @@ | |||
3984 | - Wrote replacements for strlcpy and mkdtemp | 3986 | - Wrote replacements for strlcpy and mkdtemp |
3985 | - Released 1.0pre1 | 3987 | - Released 1.0pre1 |
3986 | 3988 | ||
3987 | $Id: ChangeLog,v 1.777 2001/02/16 01:05:39 djm Exp $ | 3989 | $Id: ChangeLog,v 1.778 2001/02/16 01:12:41 djm Exp $ |
diff --git a/configure.in b/configure.in index ac9a456a8..2104329c5 100644 --- a/configure.in +++ b/configure.in | |||
@@ -1,4 +1,4 @@ | |||
1 | # $Id: configure.in,v 1.242 2001/02/16 01:05:39 djm Exp $ | 1 | # $Id: configure.in,v 1.243 2001/02/16 01:12:41 djm Exp $ |
2 | 2 | ||
3 | AC_INIT(ssh.c) | 3 | AC_INIT(ssh.c) |
4 | 4 | ||
@@ -236,6 +236,7 @@ mips-sony-bsd|mips-sony-newsos4) | |||
236 | AC_DEFINE(HAVE_SCO_PROTECTED_PW) | 236 | AC_DEFINE(HAVE_SCO_PROTECTED_PW) |
237 | AC_DEFINE(DISABLE_SHADOW) | 237 | AC_DEFINE(DISABLE_SHADOW) |
238 | AC_DEFINE(HAVE_BOGUS_SYS_QUEUE_H) | 238 | AC_DEFINE(HAVE_BOGUS_SYS_QUEUE_H) |
239 | AC_CHECK_FUNCS(getluid setluid) | ||
239 | ;; | 240 | ;; |
240 | *-*-sco3.2v5*) | 241 | *-*-sco3.2v5*) |
241 | CPPFLAGS="$CPPFLAGS -I/usr/local/include" | 242 | CPPFLAGS="$CPPFLAGS -I/usr/local/include" |
@@ -249,9 +250,9 @@ mips-sony-bsd|mips-sony-newsos4) | |||
249 | AC_DEFINE(HAVE_SCO_PROTECTED_PW) | 250 | AC_DEFINE(HAVE_SCO_PROTECTED_PW) |
250 | AC_DEFINE(DISABLE_SHADOW) | 251 | AC_DEFINE(DISABLE_SHADOW) |
251 | AC_DEFINE(HAVE_BOGUS_SYS_QUEUE_H) | 252 | AC_DEFINE(HAVE_BOGUS_SYS_QUEUE_H) |
253 | AC_CHECK_FUNCS(getluid setluid) | ||
252 | ;; | 254 | ;; |
253 | *-dec-osf*) | 255 | *-dec-osf*) |
254 | # This is untested | ||
255 | if test ! -z "USE_SIA" ; then | 256 | if test ! -z "USE_SIA" ; then |
256 | AC_MSG_CHECKING(for Digital Unix Security Integration Architecture) | 257 | AC_MSG_CHECKING(for Digital Unix Security Integration Architecture) |
257 | if test -f /etc/sia/matrix.conf; then | 258 | if test -f /etc/sia/matrix.conf; then |
@@ -881,7 +881,6 @@ void do_pam_environment(char ***env, int *envsize) | |||
881 | } | 881 | } |
882 | #endif /* USE_PAM */ | 882 | #endif /* USE_PAM */ |
883 | 883 | ||
884 | |||
885 | #ifdef HAVE_CYGWIN | 884 | #ifdef HAVE_CYGWIN |
886 | void copy_environment(char ***env, int *envsize) | 885 | void copy_environment(char ***env, int *envsize) |
887 | { | 886 | { |
@@ -1118,6 +1117,12 @@ do_child(const char *command, struct passwd * pw, const char *term, | |||
1118 | } | 1117 | } |
1119 | #endif /* HAVE_OSF_SIA */ | 1118 | #endif /* HAVE_OSF_SIA */ |
1120 | 1119 | ||
1120 | #if defined(HAVE_GETLUID) && defined(HAVE_SETLUID) | ||
1121 | /* Sets login uid for accounting */ | ||
1122 | if (getluid() == -1 && setluid(pw->pw_uid) == -1) | ||
1123 | error("setluid: %s", strerror(errno)); | ||
1124 | #endif /* defined(HAVE_GETLUID) && defined(HAVE_SETLUID) */ | ||
1125 | |||
1121 | #ifdef HAVE_CYGWIN | 1126 | #ifdef HAVE_CYGWIN |
1122 | if (is_winnt) | 1127 | if (is_winnt) |
1123 | #endif | 1128 | #endif |