This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch, master, updated. glibc-2.15-514-g86ae07a


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  86ae07a8c9e8e26806f7b8dedf57e7b14a308c69 (commit)
      from  d6270972f79fe89a96fa7a3909991dad2e317033 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=86ae07a8c9e8e26806f7b8dedf57e7b14a308c69

commit 86ae07a8c9e8e26806f7b8dedf57e7b14a308c69
Author: Jeff Law <law@redhat.com>
Date:   Wed Mar 28 10:09:29 2012 -0600

           [BZ #13760]
            * resolv/nss_dns/dns-host.c (gaih_getanswer): Look for errno
            in the right place. Discard and retry query if response is
            larger than input buffer size.

diff --git a/ChangeLog b/ChangeLog
index f75e121..ba7b2cd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2012-02-22  Siddhesh Poyarekar  <siddhesh@redhat.com>
+
+	[BZ #13760]
+	* resolv/nss_dns/dns-host.c (gaih_getanswer): Look for errno
+	in the right place. Discard and retry query if response is
+	larger than input buffer size.
+
 2012-03-28  Joseph Myers  <joseph@codesourcery.com>
 
 	[BZ #369]
diff --git a/NEWS b/NEWS
index 3ebc0ff..ec8ecdb 100644
--- a/NEWS
+++ b/NEWS
@@ -16,9 +16,9 @@ Version 2.16
   11494, 12047, 13058, 13525, 13526, 13527, 13528, 13529, 13530, 13531,
   13532, 13533, 13547, 13551, 13552, 13553, 13555, 13559, 13566, 13583,
   13618, 13637, 13656, 13658, 13673, 13695, 13704, 13706, 13726, 13738,
-  13786, 13792, 13806, 13824, 13840, 13841, 13844, 13846, 13851, 13852,
-  13854, 13871, 13879, 13883, 13892, 13910, 13911, 13912, 13913, 13915,
-  13916, 13917, 13918, 13919, 13920, 13921
+  13760, 13786, 13792, 13806, 13824, 13840, 13841, 13844, 13846, 13851,
+  13852, 13854, 13871, 13879, 13883, 13892, 13910, 13911, 13912, 13913,
+  13915, 13916, 13917, 13918, 13919, 13920, 13921
 
 * ISO C11 support:
 
diff --git a/resolv/nss_dns/dns-host.c b/resolv/nss_dns/dns-host.c
index 01369f6..10aecb8 100644
--- a/resolv/nss_dns/dns-host.c
+++ b/resolv/nss_dns/dns-host.c
@@ -1219,7 +1219,13 @@ gaih_getanswer (const querybuf *answer1, int anslen1, const querybuf *answer2,
 				  &first);
   if ((status == NSS_STATUS_SUCCESS || status == NSS_STATUS_NOTFOUND
        || (status == NSS_STATUS_TRYAGAIN
-	   && (errno != ERANGE || *h_errnop != NO_RECOVERY)))
+	   /* We want to look at the second answer in case of an
+	      NSS_STATUS_TRYAGAIN only if the error is non-recoverable, i.e.
+	      *h_errnop is NO_RECOVERY. If not, and if the failure was due to
+	      an insufficient buffer (ERANGE), then we need to drop the results
+	      and pass on the NSS_STATUS_TRYAGAIN to the caller so that it can
+	      repeat the query with a larger buffer.  */
+	   && (*errnop != ERANGE || *h_errnop == NO_RECOVERY)))
       && answer2 != NULL && anslen2 > 0)
     {
       enum nss_status status2 = gaih_getanswer_slice(answer2, anslen2, qname,

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                 |    7 +++++++
 NEWS                      |    6 +++---
 resolv/nss_dns/dns-host.c |    8 +++++++-
 3 files changed, 17 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]