diff options
author | Colin Watson <cjwatson@debian.org> | 2010-01-01 17:15:23 +0000 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2010-01-01 17:15:23 +0000 |
commit | 99b402ea4c8457b0a3cafff37f5b3410a8dc6476 (patch) | |
tree | 1d24ce54c9981ea8cbb4c5a9309964a0e4c4b320 /uidswap.c | |
parent | 87552344215a38d3a2b0d4d63dc151e05978bbe1 (diff) | |
parent | 54af7a4ae8d455791a631bdfaade4b64436ae16a (diff) |
import openssh-5.2p1-gsskex-all-20090726.patch
Diffstat (limited to 'uidswap.c')
-rw-r--r-- | uidswap.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -233,6 +233,16 @@ permanently_set_uid(struct passwd *pw) | |||
233 | fatal("setgid %u: %.100s", (u_int)pw->pw_gid, strerror(errno)); | 233 | fatal("setgid %u: %.100s", (u_int)pw->pw_gid, strerror(errno)); |
234 | #endif | 234 | #endif |
235 | 235 | ||
236 | #ifdef __APPLE__ | ||
237 | /* | ||
238 | * OS X requires initgroups after setgid to opt back into | ||
239 | * memberd support for >16 supplemental groups. | ||
240 | */ | ||
241 | if (initgroups(pw->pw_name, pw->pw_gid) < 0) | ||
242 | fatal("initgroups %.100s %u: %.100s", | ||
243 | pw->pw_name, (u_int)pw->pw_gid, strerror(errno)); | ||
244 | #endif | ||
245 | |||
236 | #if defined(HAVE_SETRESUID) && !defined(BROKEN_SETRESUID) | 246 | #if defined(HAVE_SETRESUID) && !defined(BROKEN_SETRESUID) |
237 | if (setresuid(pw->pw_uid, pw->pw_uid, pw->pw_uid) < 0) | 247 | if (setresuid(pw->pw_uid, pw->pw_uid, pw->pw_uid) < 0) |
238 | fatal("setresuid %u: %.100s", (u_int)pw->pw_uid, strerror(errno)); | 248 | fatal("setresuid %u: %.100s", (u_int)pw->pw_uid, strerror(errno)); |