diff options
author | des <des@FreeBSD.org> | 2009-05-22 18:46:28 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2009-05-22 18:46:28 +0000 |
commit | 8bf56a9772e08d79d1a808bb69be82ca688afc76 (patch) | |
tree | d3b23c04145e95d8d26c4e6efa1cd05fa34fd795 /crypto/openssh/uidswap.c | |
parent | 56fa0af6738b5c4466957197aaa372d30e74440b (diff) | |
parent | f4c3a2131f559534b5693fd15df8d89049db7cbb (diff) | |
download | FreeBSD-src-8bf56a9772e08d79d1a808bb69be82ca688afc76.zip FreeBSD-src-8bf56a9772e08d79d1a808bb69be82ca688afc76.tar.gz |
Upgrade to OpenSSH 5.2p1.
MFC after: 3 months
Diffstat (limited to 'crypto/openssh/uidswap.c')
-rw-r--r-- | crypto/openssh/uidswap.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/crypto/openssh/uidswap.c b/crypto/openssh/uidswap.c index 91d878c..8376483 100644 --- a/crypto/openssh/uidswap.c +++ b/crypto/openssh/uidswap.c @@ -233,6 +233,16 @@ permanently_set_uid(struct passwd *pw) fatal("setgid %u: %.100s", (u_int)pw->pw_gid, strerror(errno)); #endif +#ifdef __APPLE__ + /* + * OS X requires initgroups after setgid to opt back into + * memberd support for >16 supplemental groups. + */ + if (initgroups(pw->pw_name, pw->pw_gid) < 0) + fatal("initgroups %.100s %u: %.100s", + pw->pw_name, (u_int)pw->pw_gid, strerror(errno)); +#endif + #if defined(HAVE_SETRESUID) && !defined(BROKEN_SETRESUID) if (setresuid(pw->pw_uid, pw->pw_uid, pw->pw_uid) < 0) fatal("setresuid %u: %.100s", (u_int)pw->pw_uid, strerror(errno)); |