From 5d4cf042506c290f6f6c62d95ce2ebb56c854a7a Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 6 Jul 2011 10:52:31 -0400 Subject: Fix handling of chained netgroups --- ChangeLog | 5 +++++ inet/getnetgrent_r.c | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/ChangeLog b/ChangeLog index c853190..9b2915e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2011-07-06 Ulrich Drepper + + * inet/getnetgrent_r.c (internal_getnetgrent_r): Fix check for known + netgroups to read. + 2011-07-05 Roland McGrath * config.make.in (install_root): Default to $(DESTDIR). diff --git a/inet/getnetgrent_r.c b/inet/getnetgrent_r.c index 42045a2..b588897 100644 --- a/inet/getnetgrent_r.c +++ b/inet/getnetgrent_r.c @@ -279,6 +279,11 @@ internal_getnetgrent_r (char **hostp, char **userp, char **domainp, namep = namep->next) if (strcmp (datap->val.group, namep->name) == 0) break; + if (namep == NULL) + for (namep = datap->needed_groups; namep != NULL; + namep = namep->next) + if (strcmp (datap->val.group, namep->name) == 0) + break if (namep != NULL) /* Really ignore. */ continue; -- cgit v1.1