Found by chance due to a re-order of the tests to start s3member
earlier and chasing down a malloc Abort into a valgrind error. Only
happens when a user has more than 4 groups.
Andrew Bartlett
Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Mon Feb 20 05:23:04 CET 2012 on sn-devel-104
int i;
NSS_STATUS status;
int i;
NSS_STATUS status;
- groups = (gid_t *)malloc(size);
+ groups = (gid_t *)malloc(sizeof(gid_t) * size);
groups[0] = gid;
status = nss_initgroups(name, gid, &groups, &start, &size);
groups[0] = gid;
status = nss_initgroups(name, gid, &groups, &start, &size);