svn commit: samba r23566 - in branches: SAMBA_3_0/source/lib
SAMBA_3_0_26/source/lib
obnox at samba.org
obnox at samba.org
Thu Jun 21 14:23:06 GMT 2007
Author: obnox
Date: 2007-06-21 14:23:06 +0000 (Thu, 21 Jun 2007)
New Revision: 23566
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=23566
Log:
Fix the sys_bsd_setgroups function. The actual workaround was inactive.
Michael
Modified:
branches/SAMBA_3_0/source/lib/system.c
branches/SAMBA_3_0_26/source/lib/system.c
Changeset:
Modified: branches/SAMBA_3_0/source/lib/system.c
===================================================================
--- branches/SAMBA_3_0/source/lib/system.c 2007-06-21 14:04:55 UTC (rev 23565)
+++ branches/SAMBA_3_0/source/lib/system.c 2007-06-21 14:23:06 UTC (rev 23566)
@@ -1006,14 +1006,12 @@
* 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++;
}
Modified: branches/SAMBA_3_0_26/source/lib/system.c
===================================================================
--- branches/SAMBA_3_0_26/source/lib/system.c 2007-06-21 14:04:55 UTC (rev 23565)
+++ branches/SAMBA_3_0_26/source/lib/system.c 2007-06-21 14:23:06 UTC (rev 23566)
@@ -1006,14 +1006,12 @@
* 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++;
}
More information about the samba-cvs
mailing list