summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorPeter Watkins <treestem@gmail.com>2010-02-14 12:43:13 +0100
committerVolker Lendecke <vl@samba.org>2010-02-14 12:45:04 +0100
commitd3a42946cc7d98070e90122341d234119ed94089 (patch)
tree67970534122abfd54dec1b0261b2267665eb26ed /source3/lib
parent05b6e3f4f43ef5dacbc69b59c6373c536ae2a1c6 (diff)
downloadsamba-d3a42946cc7d98070e90122341d234119ed94089.tar.gz
samba-d3a42946cc7d98070e90122341d234119ed94089.tar.bz2
samba-d3a42946cc7d98070e90122341d234119ed94089.zip
s3: Fix initgroups return check
A return code of 1 from initgroups() is OK since apparently it means the gid has already been set. The man page doesn't mention this.
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/system_smbd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/lib/system_smbd.c b/source3/lib/system_smbd.c
index b22d15fb8a..b4447c5f9c 100644
--- a/source3/lib/system_smbd.c
+++ b/source3/lib/system_smbd.c
@@ -68,7 +68,7 @@ static int getgrouplist_internals(const char *user, gid_t gid, gid_t *groups,
return -1;
}
- if (initgroups(user, gid) != 0) {
+ if (initgroups(user, gid) == -1) {
DEBUG(0, ("getgrouplist_internals: initgroups() failed!\n"));
SAFE_FREE(gids_saved);
return -1;