summaryrefslogtreecommitdiff
path: root/source3/lib/system_smbd.c
diff options
context:
space:
mode:
authorJames Peach <jpeach@samba.org>2007-06-08 22:25:55 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:23:12 -0500
commit74c74f8dccc01c99c8098dcb0dcae5cfaa81566d (patch)
treeeb21fabc1c544a5c1ed90dac9ce4042f61f1835b /source3/lib/system_smbd.c
parent0a1f5d71e4ad551f178613fff8bd288ad0cad057 (diff)
downloadsamba-74c74f8dccc01c99c8098dcb0dcae5cfaa81566d.tar.gz
samba-74c74f8dccc01c99c8098dcb0dcae5cfaa81566d.tar.bz2
samba-74c74f8dccc01c99c8098dcb0dcae5cfaa81566d.zip
r23393: Support BSD group semantics by making sure that the effective GID is always
passed as the first GID when calling setgroups(2). (This used to be commit 6ebaf856c1d27f2fbfa0444a5c6c17c4331d2780)
Diffstat (limited to 'source3/lib/system_smbd.c')
-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 509b2bbcb1..0d62360ca6 100644
--- a/source3/lib/system_smbd.c
+++ b/source3/lib/system_smbd.c
@@ -104,7 +104,7 @@ static int getgrouplist_internals(const char *user, gid_t gid, gid_t *groups,
restore_re_gid();
- if (sys_setgroups(ngrp_saved, gids_saved) != 0) {
+ if (sys_setgroups(gid, ngrp_saved, gids_saved) != 0) {
/* yikes! */
DEBUG(0,("ERROR: getgrouplist: failed to reset group list!\n"));
smb_panic("getgrouplist: failed to reset group list!\n");