diff options
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | NEWS | 4 | ||||
-rw-r--r-- | nscd/netgroupcache.c | 14 | ||||
-rw-r--r-- | nss/nss_files/files-netgrp.c | 2 |
4 files changed, 19 insertions, 9 deletions
@@ -1,3 +1,11 @@ +2014-05-26 Siddhesh Poyarekar <siddhesh@redhat.com> + + [BZ #16878] + * nscd/netgroupcache.c (addgetnetgrentX): Look for + NSS_STATUS_TRYAGAIN to indicate insufficient buffer space. + * nscd/nss_files/files-netgrp.c (_nss_netgroup_parseline): Use + NSS_STATUS_TRYAGAIN to indicate insufficient buffer space. + 2014-03-12 Siddhesh Poyarekar <siddhesh@redhat.com> [BZ #16695] @@ -9,8 +9,8 @@ Version 2.19.1 * The following bugs are resolved with this release: - 15946, 16545, 16574, 16623, 16695, 16882, 16885, 16916, 16932, 16943, - 16958, 17048, 17069. + 15946, 16545, 16574, 16623, 16695, 16878, 16882, 16885, 16916, 16932, + 16943, 16958, 17048, 17069. * CVE-2014-4043 The posix_spawn_file_actions_addopen implementation did not copy the path argument. This allowed programs to cause posix_spawn to diff --git a/nscd/netgroupcache.c b/nscd/netgroupcache.c index fe7fc75..084f74d 100644 --- a/nscd/netgroupcache.c +++ b/nscd/netgroupcache.c @@ -203,11 +203,6 @@ addgetnetgrentX (struct database_dyn *db, int fd, request_header *req, int e; status = getfct.f (&data, buffer + buffilled, buflen - buffilled - req->key_len, &e); - if (status == NSS_STATUS_RETURN - || status == NSS_STATUS_NOTFOUND) - /* This was either the last one for this group or the - group was empty. Look at next group if available. */ - break; if (status == NSS_STATUS_SUCCESS) { if (data.type == triple_val) @@ -322,11 +317,18 @@ addgetnetgrentX (struct database_dyn *db, int fd, request_header *req, } } } - else if (status == NSS_STATUS_UNAVAIL && e == ERANGE) + else if (status == NSS_STATUS_TRYAGAIN && e == ERANGE) { buflen *= 2; buffer = xrealloc (buffer, buflen); } + else if (status == NSS_STATUS_RETURN + || status == NSS_STATUS_NOTFOUND + || status == NSS_STATUS_UNAVAIL) + /* This was either the last one for this group or the + group was empty or the NSS module had an internal + failure. Look at next group if available. */ + break; } enum nss_status (*endfct) (struct __netgrent *); diff --git a/nss/nss_files/files-netgrp.c b/nss/nss_files/files-netgrp.c index 34eae4c..bc0b367 100644 --- a/nss/nss_files/files-netgrp.c +++ b/nss/nss_files/files-netgrp.c @@ -252,7 +252,7 @@ _nss_netgroup_parseline (char **cursor, struct __netgrent *result, if (cp - host > buflen) { *errnop = ERANGE; - status = NSS_STATUS_UNAVAIL; + status = NSS_STATUS_TRYAGAIN; } else { |