mirror of
https://sourceware.org/git/glibc.git
synced 2025-10-21 14:53:53 +03:00
Add the extra check also in innetgr
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
* inet/getnetgrent_r.c (internal_getnetgrent_r): Fix check for known
|
* inet/getnetgrent_r.c (internal_getnetgrent_r): Fix check for known
|
||||||
netgroups to read.
|
netgroups to read.
|
||||||
|
(innetgr): Likewise.
|
||||||
|
|
||||||
2011-07-05 Roland McGrath <roland@hack.frob.com>
|
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)
|
namep = namep->next)
|
||||||
if (strcmp (entry.val.group, namep->name) == 0)
|
if (strcmp (entry.val.group, namep->name) == 0)
|
||||||
break;
|
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
|
if (namep == NULL
|
||||||
&& strcmp (netgroup, entry.val.group) != 0)
|
&& strcmp (netgroup, entry.val.group) != 0)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user