diff options
author | Michael Adam <obnox@samba.org> | 2007-06-21 14:23:06 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:23:30 -0500 |
commit | f7f3b72b21a024b69f861f2e2169f5efc1a2dce3 (patch) | |
tree | 1c70c79641ea30baee9cd3a10f7494e3487bcb03 /source3 | |
parent | f4eb916e856395bf1055c5b3f0583f816cd5c2b5 (diff) | |
download | samba-f7f3b72b21a024b69f861f2e2169f5efc1a2dce3.tar.gz samba-f7f3b72b21a024b69f861f2e2169f5efc1a2dce3.tar.bz2 samba-f7f3b72b21a024b69f861f2e2169f5efc1a2dce3.zip |
r23566: Fix the sys_bsd_setgroups function. The actual workaround was inactive.
Michael
(This used to be commit 4b5d9b2ba773e6ce57c38e3c0d5af72ad5a98b51)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/lib/system.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/source3/lib/system.c b/source3/lib/system.c index 309b21f59f..9f62ce760a 100644 --- a/source3/lib/system.c +++ b/source3/lib/system.c @@ -1006,14 +1006,12 @@ static int sys_bsd_setgroups(gid_t primary_gid, int setlen, const gid_t *gidset) * and insert it at the front. */ if (gidset[0] != primary_gid) { - gid_t *new_gidset; - new_gidset = SMB_MALLOC_ARRAY(gid_t, setlen + 1); if (new_gidset == NULL) { return -1; } - memcpy(new_gidset + 1, gidset, ((setlen + 1) * sizeof(gid_t))); + memcpy(new_gidset + 1, gidset, (setlen * sizeof(gid_t))); new_gidset[0] = primary_gid; setlen++; } |