diff options
author | Ulrich Drepper <drepper@gmail.com> | 2011-07-06 11:38:42 -0400 |
---|---|---|
committer | Ulrich Drepper <drepper@gmail.com> | 2011-07-06 11:38:42 -0400 |
commit | 960e5535b08ea358caefe8eb831aae36cc4826c5 (patch) | |
tree | 9cd581c14fa309c9770716da7b52b0a0b3981ddb | |
parent | 5d4cf042506c290f6f6c62d95ce2ebb56c854a7a (diff) | |
download | glibc-960e5535b08ea358caefe8eb831aae36cc4826c5.tar.gz glibc-960e5535b08ea358caefe8eb831aae36cc4826c5.tar.xz glibc-960e5535b08ea358caefe8eb831aae36cc4826c5.zip |
Add the extra check also in innetgr
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | inet/getnetgrent_r.c | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog index 9b2915e402..38149a6f36 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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> diff --git a/inet/getnetgrent_r.c b/inet/getnetgrent_r.c index b588897df1..91cdcce468 100644 --- a/inet/getnetgrent_r.c +++ b/inet/getnetgrent_r.c @@ -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) { |