git.samba.org
/
abartlet
/
samba.git
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
05b6e3f
)
s3: Fix initgroups return check
author
Peter Watkins
<treestem@gmail.com>
Sun, 14 Feb 2010 11:43:13 +0000
(12:43 +0100)
committer
Volker Lendecke
<vl@samba.org>
Sun, 14 Feb 2010 11:45:04 +0000
(12:45 +0100)
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
patch
|
blob
|
history
diff --git
a/source3/lib/system_smbd.c
b/source3/lib/system_smbd.c
index b22d15fb8a9e5441858ccab7d82e45bda29e6023..b4447c5f9cd179ee86fea87edfc0a761f0f79584 100644
(file)
--- 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;