diff options
Diffstat (limited to 'inet/getnetgrent_r.c')
-rw-r--r-- | inet/getnetgrent_r.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/inet/getnetgrent_r.c b/inet/getnetgrent_r.c index b588897..91cdcce 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) { |