diff options
author | Jakub Jelinek <jakub@redhat.com> | 2007-12-12 18:13:35 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2007-12-12 18:13:35 +0000 |
commit | 574e283890a6ca92325a06dafa76ff307a8019a2 (patch) | |
tree | 055e44e24a55fb4863e5d9cdc04e320cde52ffe9 /nis | |
parent | a162e5955f7e324be82d9318bbcbe869c66ffb86 (diff) | |
download | glibc-574e283890a6ca92325a06dafa76ff307a8019a2.tar.gz |
Updated to fedora-glibc-20071212T1051
Diffstat (limited to 'nis')
-rw-r--r-- | nis/nss_compat/compat-initgroups.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/nis/nss_compat/compat-initgroups.c b/nis/nss_compat/compat-initgroups.c index fd16475ea9..76ca95d1e6 100644 --- a/nis/nss_compat/compat-initgroups.c +++ b/nis/nss_compat/compat-initgroups.c @@ -303,10 +303,19 @@ getgrent_next_nss (ent_t *ent, char *buffer, size_t buflen, const char *user, else tmpbuf = extend_alloca (tmpbuf, tmplen, 2 * tmplen); - if (!in_blacklist (grpbuf.gr_name, - strlen (grpbuf.gr_name), ent)) - check_and_add_group (user, group, start, size, groupsp, - limit, &grpbuf); + if (__builtin_expect (status != NSS_STATUS_NOTFOUND, 1)) + { + if (__builtin_expect (status != NSS_STATUS_SUCCESS, 0)) + { + free (mygroups); + return status; + } + + if (!in_blacklist (grpbuf.gr_name, + strlen (grpbuf.gr_name), ent)) + check_and_add_group (user, group, start, size, groupsp, + limit, &grpbuf); + } } free (mygroups); |