- (djm) Set "login ID" on systems with setluid. Only enabled for SCO

OpenServer for now. Based on patch from svaughan <svaughan@asterion.com>
This commit is contained in:
Damien Miller 2001-02-16 12:12:41 +11:00
parent 5dfe976cdf
commit 217f567187
3 changed files with 12 additions and 4 deletions

View File

@ -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
@ -3984,4 +3986,4 @@
- Wrote replacements for strlcpy and mkdtemp
- Released 1.0pre1
$Id: ChangeLog,v 1.777 2001/02/16 01:05:39 djm Exp $
$Id: ChangeLog,v 1.778 2001/02/16 01:12:41 djm Exp $

View File

@ -1,4 +1,4 @@
# $Id: configure.in,v 1.242 2001/02/16 01:05:39 djm Exp $
# $Id: configure.in,v 1.243 2001/02/16 01:12:41 djm Exp $
AC_INIT(ssh.c)
@ -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

View File

@ -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