- (dtucker) [acconfig.h configure.ac uidswap.c] Bug #645: Check for
setres[ug]id() present but not implemented (eg some Linux/glibc combinations).
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
20031217
|
||||
- (dtucker) [acconfig.h configure.ac uidswap.c] Bug #645: Check for
|
||||
setres[ug]id() present but not implemented (eg some Linux/glibc
|
||||
combinations).
|
||||
|
||||
20031208
|
||||
- (tim) [configure.ac] Bug 770. Fix --without-rpath.
|
||||
|
||||
@@ -1286,4 +1291,4 @@
|
||||
- Fix sshd BindAddress and -b options for systems using fake-getaddrinfo.
|
||||
Report from [email protected], diagnosis from [email protected]
|
||||
|
||||
$Id: ChangeLog,v 1.2994.2.62 2003/12/08 20:36:57 tim Exp $
|
||||
$Id: ChangeLog,v 1.2994.2.63 2003/12/17 07:54:53 dtucker Exp $
|
||||
|
||||
+7
-1
@@ -1,4 +1,4 @@
|
||||
/* $Id: acconfig.h,v 1.166 2003/09/16 01:52:19 dtucker Exp $ */
|
||||
/* $Id: acconfig.h,v 1.166.2.1 2003/12/17 07:54:54 dtucker Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1999-2003 Damien Miller. All rights reserved.
|
||||
@@ -41,6 +41,12 @@
|
||||
/* Define if your setregid() is broken */
|
||||
#undef BROKEN_SETREGID
|
||||
|
||||
/* Define if your setresuid() is broken */
|
||||
#undef BROKEN_SETRESUID
|
||||
|
||||
/* Define if your setresgid() is broken */
|
||||
#undef BROKEN_SETRESGID
|
||||
|
||||
/* Define to a Set Process Title type if your system is */
|
||||
/* supported by bsd-setproctitle.c */
|
||||
#undef SPT_TYPE
|
||||
|
||||
+25
-1
@@ -1,4 +1,4 @@
|
||||
# $Id: configure.ac,v 1.154.2.15 2003/12/08 20:36:58 tim Exp $
|
||||
# $Id: configure.ac,v 1.154.2.16 2003/12/17 07:54:54 dtucker Exp $
|
||||
|
||||
AC_INIT
|
||||
AC_CONFIG_SRCDIR([ssh.c])
|
||||
@@ -778,6 +778,30 @@ AC_CHECK_DECL(tcsendbreak,
|
||||
[#include <termios.h>]
|
||||
)
|
||||
|
||||
dnl Some platorms have setresuid that isn't implemented
|
||||
AC_MSG_CHECKING(if setresuid seems to work)
|
||||
AC_TRY_RUN([
|
||||
#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
int main(){errno=0; setresuid(0,0,0); if (errno==ENOSYS) exit(1); else exit(0);}
|
||||
],
|
||||
[AC_MSG_RESULT(yes)],
|
||||
[AC_DEFINE(BROKEN_SETRESUID),
|
||||
AC_MSG_RESULT(not implemented)]
|
||||
)
|
||||
|
||||
dnl Some platorms have setresgid that isn't implemented
|
||||
AC_MSG_CHECKING(if setresgid seems to work)
|
||||
AC_TRY_RUN([
|
||||
#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
int main(){errno=0; setresgid(0,0,0); if (errno==ENOSYS) exit(1); else exit(0);}
|
||||
],
|
||||
[AC_MSG_RESULT(yes)],
|
||||
[AC_DEFINE(BROKEN_SETRESGID)
|
||||
AC_MSG_RESULT(not implemented)]
|
||||
)
|
||||
|
||||
dnl Checks for time functions
|
||||
AC_CHECK_FUNCS(gettimeofday time)
|
||||
dnl Checks for utmp functions
|
||||
|
||||
@@ -151,7 +151,7 @@ permanently_set_uid(struct passwd *pw)
|
||||
debug("permanently_set_uid: %u/%u", (u_int)pw->pw_uid,
|
||||
(u_int)pw->pw_gid);
|
||||
|
||||
#if defined(HAVE_SETRESGID)
|
||||
#if defined(HAVE_SETRESGID) && !defined(BROKEN_SETRESGID)
|
||||
if (setresgid(pw->pw_gid, pw->pw_gid, pw->pw_gid) < 0)
|
||||
fatal("setresgid %u: %.100s", (u_int)pw->pw_gid, strerror(errno));
|
||||
#elif defined(HAVE_SETREGID) && !defined(BROKEN_SETREGID)
|
||||
@@ -164,7 +164,7 @@ permanently_set_uid(struct passwd *pw)
|
||||
fatal("setgid %u: %.100s", (u_int)pw->pw_gid, strerror(errno));
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_SETRESUID)
|
||||
#if defined(HAVE_SETRESUID) && !defined(BROKEN_SETRESUID)
|
||||
if (setresuid(pw->pw_uid, pw->pw_uid, pw->pw_uid) < 0)
|
||||
fatal("setresuid %u: %.100s", (u_int)pw->pw_uid, strerror(errno));
|
||||
#elif defined(HAVE_SETREUID) && !defined(BROKEN_SETREUID)
|
||||
|
||||
Reference in New Issue
Block a user