SCO 5.0.5 setluid patch

Darryl Krasman darryl at idealgroup.com
Wed Feb 21 17:49:50 EST 2001


I downloaded openssh-2.5.1p1 as soon as it was on the ftp servers just
to get the setluid patch. After compiling and installing on 5.0.5 I saw
that the luid still wasn't being set correctly whether sshd was run from
inetd or as a daemon from /etc/rc2.d/. I fiddled around and moved the
setluid() stuff up higher in session.c and now luid is now being set
correctly. I provided a regular diff below. I am not a power c
programmer or cvs guy so I hope you'll be kind if the diff is crude.
More importantly, I hope that where I moved it to is correct! 
-- 
Darryl
Ideal Computer Group Inc.

thor 314 : /u/sco/source/openssh-2.5.1p1 # diff session.c session.drk.c
1024a1025,1031
> /* DRK: moved this stuff up higher */
> #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) */
>
1128,1133d1134
<
< #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) */





More information about the openssh-unix-dev mailing list