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 /uidswap.c | |
parent | b2db4e83a350415a87c037414fc5e4c6074eba0d (diff) |
- (dtucker) [acconfig.h configure.ac uidswap.c] Prefer setuid/setgid on AIX.
Diffstat (limited to 'uidswap.c')
-rw-r--r-- | uidswap.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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 |