Fix Debian bug #675824
* lib/groupmem.c (__gr_dup): Support libc which define other fields in struct group. * lib/pwmem.c: Likewise for struct passwd. * lib/shadowmem.c: Likewise for struct spwd. * lib/sgroupio.c: Apply same logic, even if this structure is defined internally.
This commit is contained in:
@@ -51,6 +51,9 @@
|
||||
if (NULL == sg) {
|
||||
return NULL;
|
||||
}
|
||||
/* Do the same as the other _dup function, even if we know the
|
||||
* structure. */
|
||||
memset (sg, 0, sizeof *sg);
|
||||
sg->sg_name = strdup (sgent->sg_name);
|
||||
if (NULL == sg->sg_name) {
|
||||
free (sg);
|
||||
|
||||
Reference in New Issue
Block a user