summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--acconfig.h8
-rw-r--r--configure.ac5
-rw-r--r--uidswap.c4
4 files changed, 17 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index c065225fc..a66669ced 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
120030906
2 - (dtucker) [acconfig.h configure.ac uidswap.c] Prefer setuid/setgid on AIX.
3
120030905 420030905
2 - (dtucker) [Makefile.in] Add distclean target for regress/, fix clean target. 5 - (dtucker) [Makefile.in] Add distclean target for regress/, fix clean target.
3 6
@@ -1021,4 +1024,4 @@
1021 - Fix sshd BindAddress and -b options for systems using fake-getaddrinfo. 1024 - Fix sshd BindAddress and -b options for systems using fake-getaddrinfo.
1022 Report from murple@murple.net, diagnosis from dtucker@zip.com.au 1025 Report from murple@murple.net, diagnosis from dtucker@zip.com.au
1023 1026
1024$Id: ChangeLog,v 1.2961 2003/09/05 01:35:52 dtucker Exp $ 1027$Id: ChangeLog,v 1.2962 2003/09/06 06:44:39 dtucker Exp $
diff --git a/acconfig.h b/acconfig.h
index c83a45619..ce79146f4 100644
--- a/acconfig.h
+++ b/acconfig.h
@@ -1,4 +1,4 @@
1/* $Id: acconfig.h,v 1.162 2003/08/26 01:58:16 dtucker Exp $ */ 1/* $Id: acconfig.h,v 1.163 2003/09/06 06:44:39 dtucker Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 1999-2003 Damien Miller. All rights reserved. 4 * Copyright (c) 1999-2003 Damien Miller. All rights reserved.
@@ -35,6 +35,12 @@
35/* Define if your platform breaks doing a seteuid before a setuid */ 35/* Define if your platform breaks doing a seteuid before a setuid */
36#undef SETEUID_BREAKS_SETUID 36#undef SETEUID_BREAKS_SETUID
37 37
38/* Define if your setreuid() is broken */
39#undef BROKEN_SETREUID
40
41/* Define if your setregid() is broken */
42#undef BROKEN_SERREGID
43
38/* Define to a Set Process Title type if your system is */ 44/* Define to a Set Process Title type if your system is */
39/* supported by bsd-setproctitle.c */ 45/* supported by bsd-setproctitle.c */
40#undef SPT_TYPE 46#undef SPT_TYPE
diff --git a/configure.ac b/configure.ac
index bbc00e703..23f3e5e68 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
1# $Id: configure.ac,v 1.143 2003/08/26 01:58:16 dtucker Exp $ 1# $Id: configure.ac,v 1.144 2003/09/06 06:44:39 dtucker Exp $
2 2
3AC_INIT 3AC_INIT
4AC_CONFIG_SRCDIR([ssh.c]) 4AC_CONFIG_SRCDIR([ssh.c])
@@ -97,6 +97,9 @@ case "$host" in
97 AC_CHECK_FUNCS(setauthdb) 97 AC_CHECK_FUNCS(setauthdb)
98 AC_DEFINE(BROKEN_GETADDRINFO) 98 AC_DEFINE(BROKEN_GETADDRINFO)
99 AC_DEFINE(BROKEN_REALPATH) 99 AC_DEFINE(BROKEN_REALPATH)
100 AC_DEFINE(SETEUID_BREAKS_SETUID)
101 AC_DEFINE(BROKEN_SETREUID)
102 AC_DEFINE(BROKEN_SETREGID)
100 dnl AIX handles lastlog as part of its login message 103 dnl AIX handles lastlog as part of its login message
101 AC_DEFINE(DISABLE_LASTLOG) 104 AC_DEFINE(DISABLE_LASTLOG)
102 AC_DEFINE(LOGIN_NEEDS_UTMPX) 105 AC_DEFINE(LOGIN_NEEDS_UTMPX)
diff --git a/uidswap.c b/uidswap.c
index e517da21d..3f13f9bf4 100644
--- a/uidswap.c
+++ b/uidswap.c
@@ -154,7 +154,7 @@ permanently_set_uid(struct passwd *pw)
154#if defined(HAVE_SETRESGID) 154#if defined(HAVE_SETRESGID)
155 if (setresgid(pw->pw_gid, pw->pw_gid, pw->pw_gid) < 0) 155 if (setresgid(pw->pw_gid, pw->pw_gid, pw->pw_gid) < 0)
156 fatal("setresgid %u: %.100s", (u_int)pw->pw_gid, strerror(errno)); 156 fatal("setresgid %u: %.100s", (u_int)pw->pw_gid, strerror(errno));
157#elif defined(HAVE_SETREGID) 157#elif defined(HAVE_SETREGID) && !defined(BROKEN_SETREGID)
158 if (setregid(pw->pw_gid, pw->pw_gid) < 0) 158 if (setregid(pw->pw_gid, pw->pw_gid) < 0)
159 fatal("setregid %u: %.100s", (u_int)pw->pw_gid, strerror(errno)); 159 fatal("setregid %u: %.100s", (u_int)pw->pw_gid, strerror(errno));
160#else 160#else
@@ -167,7 +167,7 @@ permanently_set_uid(struct passwd *pw)
167#if defined(HAVE_SETRESUID) 167#if defined(HAVE_SETRESUID)
168 if (setresuid(pw->pw_uid, pw->pw_uid, pw->pw_uid) < 0) 168 if (setresuid(pw->pw_uid, pw->pw_uid, pw->pw_uid) < 0)
169 fatal("setresuid %u: %.100s", (u_int)pw->pw_uid, strerror(errno)); 169 fatal("setresuid %u: %.100s", (u_int)pw->pw_uid, strerror(errno));
170#elif defined(HAVE_SETREUID) 170#elif defined(HAVE_SETREUID) && !defined(BROKEN_SETREUID)
171 if (setreuid(pw->pw_uid, pw->pw_uid) < 0) 171 if (setreuid(pw->pw_uid, pw->pw_uid) < 0)
172 fatal("setreuid %u: %.100s", (u_int)pw->pw_uid, strerror(errno)); 172 fatal("setreuid %u: %.100s", (u_int)pw->pw_uid, strerror(errno));
173#else 173#else