summaryrefslogtreecommitdiff
path: root/uidswap.c
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2003-12-17 18:53:26 +1100
committerDarren Tucker <dtucker@zip.com.au>2003-12-17 18:53:26 +1100
commite937be36c309fff54978e56159503bcfee76d4c0 (patch)
tree71b5bc2c7cfc424e7a68a67f27953600174dfe3f /uidswap.c
parent8975ddf11b17bf58191c653a0173d91e50e942c7 (diff)
- (dtucker) [acconfig.h configure.ac uidswap.c] Bug #645: Check for
setres[ug]id() present but not implemented (eg some Linux/glibc combinations).
Diffstat (limited to 'uidswap.c')
-rw-r--r--uidswap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/uidswap.c b/uidswap.c
index a5f76fdcd..4cabaa444 100644
--- a/uidswap.c
+++ b/uidswap.c
@@ -151,7 +151,7 @@ permanently_set_uid(struct passwd *pw)
151 debug("permanently_set_uid: %u/%u", (u_int)pw->pw_uid, 151 debug("permanently_set_uid: %u/%u", (u_int)pw->pw_uid,
152 (u_int)pw->pw_gid); 152 (u_int)pw->pw_gid);
153 153
154#if defined(HAVE_SETRESGID) 154#if defined(HAVE_SETRESGID) && !defined(BROKEN_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) && !defined(BROKEN_SETREGID) 157#elif defined(HAVE_SETREGID) && !defined(BROKEN_SETREGID)
@@ -164,7 +164,7 @@ permanently_set_uid(struct passwd *pw)
164 fatal("setgid %u: %.100s", (u_int)pw->pw_gid, strerror(errno)); 164 fatal("setgid %u: %.100s", (u_int)pw->pw_gid, strerror(errno));
165#endif 165#endif
166 166
167#if defined(HAVE_SETRESUID) 167#if defined(HAVE_SETRESUID) && !defined(BROKEN_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) && !defined(BROKEN_SETREUID) 170#elif defined(HAVE_SETREUID) && !defined(BROKEN_SETREUID)