]> andersk Git - openssh.git/commitdiff
- (djm) Set "login ID" on systems with setluid. Only enabled for SCO
authordjm <djm>
Fri, 16 Feb 2001 01:12:41 +0000 (01:12 +0000)
committerdjm <djm>
Fri, 16 Feb 2001 01:12:41 +0000 (01:12 +0000)
   OpenServer for now. Based on patch from svaughan <svaughan@asterion.com>

ChangeLog
configure.in
session.c

index 85e8a330d309955ae2e1dbadcb844564071c3fd1..540943b0662e3cca383b671e1b29bfda116081dc 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -11,6 +11,8 @@
  - (djm) USE_PIPES for a few more sysv platforms
  - (djm) Cleanup configure.in a little
  - (djm) Ask users to check config.log when we can't find necessary libs
+ - (djm) Set "login ID" on systems with setluid. Only enabled for SCO
+   OpenServer for now. Based on patch from svaughan <svaughan@asterion.com>
 
 20010215
  - (djm) Move PAM session setup back to before setuid to user. Fixes 
index b10cad4833a88499561087d62c05445810e3ff76..0f54364d44312c7079e5de3353500a15107f3d0f 100644 (file)
@@ -236,6 +236,7 @@ mips-sony-bsd|mips-sony-newsos4)
        AC_DEFINE(HAVE_SCO_PROTECTED_PW)
        AC_DEFINE(DISABLE_SHADOW)
        AC_DEFINE(HAVE_BOGUS_SYS_QUEUE_H)
+       AC_CHECK_FUNCS(getluid setluid)
        ;;
 *-*-sco3.2v5*)
        CPPFLAGS="$CPPFLAGS -I/usr/local/include"
@@ -249,9 +250,9 @@ mips-sony-bsd|mips-sony-newsos4)
        AC_DEFINE(HAVE_SCO_PROTECTED_PW)
        AC_DEFINE(DISABLE_SHADOW)
        AC_DEFINE(HAVE_BOGUS_SYS_QUEUE_H)
+       AC_CHECK_FUNCS(getluid setluid)
        ;;
 *-dec-osf*)
-# This is untested
        if test ! -z "USE_SIA" ; then
                AC_MSG_CHECKING(for Digital Unix Security Integration Architecture)
                if test -f /etc/sia/matrix.conf; then
index 8f3ee834ee87114eb1798d81602cd42d6445f89d..47ef8b9c7303bf9d056e08a42e671f8dba8b140f 100644 (file)
--- a/session.c
+++ b/session.c
@@ -881,7 +881,6 @@ void do_pam_environment(char ***env, int *envsize)
 }
 #endif /* USE_PAM */
 
-
 #ifdef HAVE_CYGWIN
 void copy_environment(char ***env, int *envsize)
 {
@@ -1118,6 +1117,12 @@ do_child(const char *command, struct passwd * pw, const char *term,
                }
 #endif /* HAVE_OSF_SIA */
 
+#if defined(HAVE_GETLUID) && defined(HAVE_SETLUID)
+       /* Sets login uid for accounting */
+       if (getluid() == -1 && setluid(pw->pw_uid) == -1)
+               error("setluid: %s", strerror(errno));
+#endif /* defined(HAVE_GETLUID) && defined(HAVE_SETLUID) */
+
 #ifdef HAVE_CYGWIN
                if (is_winnt)
 #endif
This page took 0.361715 seconds and 5 git commands to generate.