From d3a42946cc7d98070e90122341d234119ed94089 Mon Sep 17 00:00:00 2001 From: Peter Watkins Date: Sun, 14 Feb 2010 12:43:13 +0100 Subject: 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. --- source3/lib/system_smbd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/lib/system_smbd.c') 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; -- cgit