]> andersk Git - openssh.git/commitdiff
- (dtucker) [acconfig.h configure.ac uidswap.c] Prefer setuid/setgid on AIX.
authordtucker <dtucker>
Sat, 6 Sep 2003 06:44:39 +0000 (06:44 +0000)
committerdtucker <dtucker>
Sat, 6 Sep 2003 06:44:39 +0000 (06:44 +0000)
ChangeLog
acconfig.h
configure.ac
uidswap.c

index fdd214c45d1c7f3e4fd181e35f5d6300d4c06beb..05506f20a1e1f615ed243263ee3a8eaca8f78a96 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
+20030906
+ - (dtucker) [acconfig.h configure.ac uidswap.c] Prefer setuid/setgid on AIX.
+
 20030905
  - (dtucker) [Makefile.in] Add distclean target for regress/, fix clean target.
 
index 6e760cdfda23df50eafe673ffee1a010f439ac41..804c37dee1869dc405ae872dab09788fc95cdeca 100644 (file)
 /* Define if your platform breaks doing a seteuid before a setuid */
 #undef SETEUID_BREAKS_SETUID
 
+/* Define if your setreuid() is broken */
+#undef BROKEN_SETREUID
+
+/* Define if your setregid() is broken */
+#undef BROKEN_SERREGID
+
 /* Define to a Set Process Title type if your system is */
 /* supported by bsd-setproctitle.c */
 #undef SPT_TYPE
index e3bd2dc91116e1c4e73e0784602f14189e3b165c..c1ad156a2f41aa3409fd764e52fc090993e605e9 100644 (file)
@@ -97,6 +97,9 @@ case "$host" in
        AC_CHECK_FUNCS(setauthdb)
        AC_DEFINE(BROKEN_GETADDRINFO)
        AC_DEFINE(BROKEN_REALPATH)
+       AC_DEFINE(SETEUID_BREAKS_SETUID)
+       AC_DEFINE(BROKEN_SETREUID)
+       AC_DEFINE(BROKEN_SETREGID)
        dnl AIX handles lastlog as part of its login message
        AC_DEFINE(DISABLE_LASTLOG)
        AC_DEFINE(LOGIN_NEEDS_UTMPX)
index e517da21d3266e38c02d92c6fe8b75f05f4488db..3f13f9bf4a6f913b9536215efba5398e1b04c46a 100644 (file)
--- a/uidswap.c
+++ b/uidswap.c
@@ -154,7 +154,7 @@ permanently_set_uid(struct passwd *pw)
 #if defined(HAVE_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)
+#elif defined(HAVE_SETREGID) && !defined(BROKEN_SETREGID)
        if (setregid(pw->pw_gid, pw->pw_gid) < 0)
                fatal("setregid %u: %.100s", (u_int)pw->pw_gid, strerror(errno));
 #else
@@ -167,7 +167,7 @@ permanently_set_uid(struct passwd *pw)
 #if defined(HAVE_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)
+#elif defined(HAVE_SETREUID) && !defined(BROKEN_SETREUID)
        if (setreuid(pw->pw_uid, pw->pw_uid) < 0)
                fatal("setreuid %u: %.100s", (u_int)pw->pw_uid, strerror(errno));
 #else
This page took 0.300086 seconds and 5 git commands to generate.