Add the extra check also in innetgr
This commit is contained in:
parent
5d4cf04250
commit
960e5535b0
|
@ -2,6 +2,7 @@
|
|||
|
||||
* inet/getnetgrent_r.c (internal_getnetgrent_r): Fix check for known
|
||||
netgroups to read.
|
||||
(innetgr): Likewise.
|
||||
|
||||
2011-07-05 Roland McGrath <roland@hack.frob.com>
|
||||
|
||||
|
|
|
@ -389,6 +389,11 @@ innetgr (const char *netgroup, const char *host, const char *user,
|
|||
namep = namep->next)
|
||||
if (strcmp (entry.val.group, namep->name) == 0)
|
||||
break;
|
||||
if (namep == NULL)
|
||||
for (namep = entry.needed_groups; namep != NULL;
|
||||
namep = namep->next)
|
||||
if (strcmp (entry.val.group, namep->name) == 0)
|
||||
break;
|
||||
if (namep == NULL
|
||||
&& strcmp (netgroup, entry.val.group) != 0)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue