]> git.ipfire.org Git - ipfire-2.x.git/blame - src/patches/glibc/glibc-rh1085273.patch
dhcpcd: fix delay after dhcp down.
[ipfire-2.x.git] / src / patches / glibc / glibc-rh1085273.patch
CommitLineData
bb330e25
AF
1commit d41242129ba693cdbc8db85b846fcaccf9f0b7c4
2Author: Siddhesh Poyarekar <siddhesh@redhat.com>
3Date: Thu Jan 2 10:03:12 2014 +0530
4
5 Fix infinite loop in nscd when netgroup is empty (bz #16365)
6
7 Currently, when a user looks up a netgroup that does not have any
8 members, nscd goes into an infinite loop trying to find members in the
9 group. This is because it does not handle cases when getnetgrent
10 returns an NSS_STATUS_NOTFOUND (which is what it does on empty group).
11 Fixed to handle this in the same way as NSS_STATUS_RETURN, similar to
12 what getgrent does by itself.
13
14diff --git a/nscd/netgroupcache.c b/nscd/netgroupcache.c
15index baebdd7..50936ee 100644
16--- a/nscd/netgroupcache.c
17+++ b/nscd/netgroupcache.c
18@@ -180,9 +180,10 @@ addgetnetgrentX (struct database_dyn *db, int fd, request_header *req,
19 int e;
20 status = getfct.f (&data, buffer + buffilled,
21 buflen - buffilled, &e);
22- if (status == NSS_STATUS_RETURN)
23- /* This was the last one for this group. Look
24- at next group if available. */
25+ if (status == NSS_STATUS_RETURN
26+ || status == NSS_STATUS_NOTFOUND)
27+ /* This was either the last one for this group or the
28+ group was empty. Look at next group if available. */
29 break;
30 if (status == NSS_STATUS_SUCCESS)
31 {