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:
@ -48,6 +48,8 @@
|
||||
if (NULL == gr) {
|
||||
return NULL;
|
||||
}
|
||||
/* The libc might define other fields. They won't be copied. */
|
||||
memset (gr, 0, sizeof *gr);
|
||||
gr->gr_gid = grent->gr_gid;
|
||||
gr->gr_name = strdup (grent->gr_name);
|
||||
if (NULL == gr->gr_name) {
|
||||
|
Reference in New Issue
Block a user