diff options
author | Darren Tucker <dtucker@zip.com.au> | 2003-09-06 16:44:39 +1000 |
---|---|---|
committer | Darren Tucker <dtucker@zip.com.au> | 2003-09-06 16:44:39 +1000 |
commit | 9f18be63ab1f6987c7bd5514e920b99dbeceb79b (patch) | |
tree | f5feadd9052fc59a32ea3f77aa0216a867b45fd5 | |
parent | b2db4e83a350415a87c037414fc5e4c6074eba0d (diff) |
- (dtucker) [acconfig.h configure.ac uidswap.c] Prefer setuid/setgid on AIX.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | acconfig.h | 8 | ||||
-rw-r--r-- | configure.ac | 5 | ||||
-rw-r--r-- | uidswap.c | 4 |
4 files changed, 17 insertions, 5 deletions
@@ -1,3 +1,6 @@ | |||
1 | 20030906 | ||
2 | - (dtucker) [acconfig.h configure.ac uidswap.c] Prefer setuid/setgid on AIX. | ||
3 | |||
1 | 20030905 | 4 | 20030905 |
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 | ||
3 | AC_INIT | 3 | AC_INIT |
4 | AC_CONFIG_SRCDIR([ssh.c]) | 4 | AC_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) |
@@ -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 |