s3: smbd: Factor out code that calls getgroups_unix_user() into a separate function.
authorJeremy Allison <jra@samba.org>
Sun, 23 Mar 2014 04:23:48 +0000 (21:23 -0700)
committerJeremy Allison <jra@samba.org>
Tue, 25 Mar 2014 15:24:13 +0000 (16:24 +0100)
commita9fa09723bee3588db2168ac13f7ad0334452c11
treeaf422643fb5063496159baf738ca1ef2a29ad118
parent547111b2cf94d18ae7972308161d64b5504ee9fd
s3: smbd: Factor out code that calls getgroups_unix_user() into a separate function.

This code needs to special-case the guest user, as
this token can have the token_sid[0] set to the Guest
SID, not the mapping of UNIX uid -> SID.

Other users that may have a well-known SID
set in token_sid[0] (like SYSTEM) are usually
not mappable to UNIX users and can be ignored
when adding local groups from /etc/group.

Found by <linux@kukkukk.com>.

Second part of the bugfix for:

https://bugzilla.samba.org/show_bug.cgi?id=10508

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source3/auth/token_util.c