SCO 5.0.5 setluid patch
svaughan
svaughan at asterion.com
Fri Feb 16 11:59:48 EST 2001
This worked just fine for me on SCO 5.0.5.
I did have to add the #undef HAVE_GETLUID and HAVE_SETLUID to config.h.in
for it to compile and work. (should I need to do this?)
Sam
On Fri, 16 Feb 2001, Damien Miller wrote:
> On Thu, 15 Feb 2001, svaughan wrote:
>
> > Here is an updated patch. Sorry, I thought setluid was SCO specific.
>
> I have modified your patch a little. Can you please give the below one
> a try?
>
> It does not try to do setluid for non-OpenServer systems. From docs.sco.com
> it says that Unixware also offers the get/setluid syscalls, but they will
> always fail.
>
>
> Index: configure.in
> ===================================================================
> RCS file: /var/cvs/openssh/configure.in,v
> retrieving revision 1.241
> diff -u -r1.241 configure.in
> --- configure.in 2001/02/15 23:18:12 1.241
> +++ configure.in 2001/02/16 00:00:46
> @@ -234,6 +234,7 @@
> AC_DEFINE(HAVE_SCO_PROTECTED_PW)
> AC_DEFINE(DISABLE_SHADOW)
> AC_DEFINE(HAVE_BOGUS_SYS_QUEUE_H)
> + AC_CHECK_FUNCS(getluid setluid)
> ;;
> *-*-sco3.2v5*)
> AC_DEFINE(USE_PIPES)
> @@ -247,9 +248,9 @@
> 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: session.c
> ===================================================================
> RCS file: /var/cvs/openssh/session.c,v
> retrieving revision 1.75
> diff -u -r1.75 session.c
> --- session.c 2001/02/15 00:51:32 1.75
> +++ session.c 2001/02/16 00:00:46
> @@ -881,7 +881,6 @@
> }
> #endif /* USE_PAM */
>
> -
> #ifdef HAVE_CYGWIN
> void copy_environment(char ***env, int *envsize)
> {
> @@ -1117,6 +1116,12 @@
> # endif /* HAVE_LOGIN_CAP */
> }
> #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)
>
>
>
> --
> | Damien Miller <djm at mindrot.org> \ ``E-mail attachments are the poor man's
> | http://www.mindrot.org / distributed filesystem'' - Dan Geer
>
>
More information about the openssh-unix-dev
mailing list