git.samba.org
/
jra
/
samba
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5456ea5
)
r23566: Fix the sys_bsd_setgroups function. The actual workaround was inactive.
author
Michael Adam
<obnox@samba.org>
Thu, 21 Jun 2007 14:23:06 +0000
(14:23 +0000)
committer
Gerald (Jerry) Carter
<jerry@samba.org>
Wed, 10 Oct 2007 17:23:30 +0000
(12:23 -0500)
Michael
source/lib/system.c
patch
|
blob
|
history
diff --git
a/source/lib/system.c
b/source/lib/system.c
index 309b21f59fec345663a76beb75e8debd305b14ec..9f62ce760af3e3688b2ac7a429b64a7a352318f8 100644
(file)
--- a/
source/lib/system.c
+++ b/
source/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++;
}