summaryrefslogtreecommitdiff
path: root/uidswap.c
diff options
context:
space:
mode:
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)