SCO 5.0.5 setluid patch

Sam Vaughan svaughan at asterion.com
Thu Feb 22 09:47:39 EST 2001


On Wed, 21 Feb 2001 mouring at etoh.eviladmin.org wrote:
  
>
> Can you resend that patch?  It was managed in deliever and does not
> apply against the current CVS tree.
>
> Thanks
>
> - Ben
>

No problem, here is a patch for the CVS tree that I grabbed this
morning. 

Sam

*** openssh_cvs/session.c Tue Feb 20 21:53:33 2001
--- openssh_cvs_patch/session.c Wed Feb 21 11:03:24 2001
***************
*** 1071,1076 ****
                        }
  #endif
  # else /* HAVE_LOGIN_CAP */
                        if (setlogin(pw->pw_name) < 0)
                                error("setlogin failed: %s",
strerror(errno));
                        if (setgid(pw->pw_gid) < 0) {
--- 1071,1083 ----
                        }
  #endif
  # else /* HAVE_LOGIN_CAP */
+ 
+ #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) */
+ 
                        if (setlogin(pw->pw_name) < 0)
                                error("setlogin failed: %s",
strerror(errno));
                        if (setgid(pw->pw_gid) < 0) {
***************
*** 1122,1132 ****
                }
  #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)
--- 1129,1134 ----
                }
  #endif /* HAVE_OSF_SIA */
  
  
  #ifdef HAVE_CYGWIN
                if (is_winnt)










More information about the openssh-unix-dev mailing list