SCO 5.0.5 setluid patch

svaughan svaughan at asterion.com
Fri Feb 16 10:08:40 EST 2001


Here is an updated patch. Sorry, I thought setluid was SCO specific. 

> I think the setluid test should be done in the main AC_CHECK_FUNCS()
> section and
> 	+ #ifdef HAVE_SETLUID 
> 	+       /* Sets login uid for accounting*/ 
> 	+       if(setluid(pw->pw_uid) == -1) 
> 	+               perror("Unable to set luid!");
> 	+ #endif /* HAVE_SETLUID */
> 
> It's not really SCO specific.


Thanks,
Sam

*** openssh/session.c Sun Feb 11 06:12:08 2001
--- openssh_patch/session.c Thu Feb 15 15:02:49 2001
***************
*** 1030,1035 ****
  #endif /* WITH_IRIX_ARRAY */
  #endif /* WITH_IRIX_JOBS */


        /* login(1) is only called if we execute the login shell */
        if (options.use_login && command != NULL)
--- 1030,1040 ----
  #endif /* WITH_IRIX_ARRAY */
  #endif /* WITH_IRIX_JOBS */

+ #ifdef HAVE_SETLUID
+       /* Sets login uid for accounting*/
+       if(setluid(pw->pw_uid) == -1)
+               perror("Unable to set luid!");
+ #endif /* HAVE_SETLUID */

        /* login(1) is only called if we execute the login shell */
        if (options.use_login && command != NULL)


***************
*** 333,338 ****
  dnl    Checks for utmpx functions
  AC_CHECK_FUNCS(endutxent getutxent getutxid getutxline pututxline )
  AC_CHECK_FUNCS(setutxent utmpxname)

  AC_CHECK_FUNC(getuserattr,
        [AC_DEFINE(HAVE_GETUSERATTR)],
--- 333,340 ----
  dnl    Checks for utmpx functions
  AC_CHECK_FUNCS(endutxent getutxent getutxid getutxline pututxline )
  AC_CHECK_FUNCS(setutxent utmpxname)
+
+ AC_CHECK_FUNC(setluid, [AC_DEFINE(HAVE_SETLUID)])

  AC_CHECK_FUNC(getuserattr,
        [AC_DEFINE(HAVE_GETUSERATTR)],



*** openssh/config.h.in Sun Feb 11 09:30:28 2001
--- openssh_patch/config.h.in Thu Feb 15 15:05:41 2001
***************
*** 31,36 ****
  /* Define if you have SCO protected password database */
  #undef HAVE_SCO_PROTECTED_PW

  /* If your header files don't define LOGIN_PROGRAM, then use this
(detected) */
  /* from environment and PATH */
  #undef LOGIN_PROGRAM_FALLBACK
--- 31,39 ----
  /* Define if you have SCO protected password database */
  #undef HAVE_SCO_PROTECTED_PW

+ /* Define if you have SCO setluid function */
+ #undef HAVE_SETLUID
+
  /* If your header files don't define LOGIN_PROGRAM, then use this
(detected) */
  /* from environment and PATH */
  #undef LOGIN_PROGRAM_FALLBACK







More information about the openssh-unix-dev mailing list