about summary refs log tree commit diff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2009-07-25 12:29:04 -0700
committerAndreas Schwab <schwab@redhat.com>2009-08-17 15:37:34 +0200
commitaa152ec6ad1bcc84a53f3c02810c7d968d1b8216 (patch)
tree70ba598d69ca1d9579e0be7b7f92d4974a426fe5
parentc87c885303b406c5f636841b8289425062f3c7c6 (diff)
downloadglibc-aa152ec6ad1bcc84a53f3c02810c7d968d1b8216.tar.gz
glibc-aa152ec6ad1bcc84a53f3c02810c7d968d1b8216.tar.xz
glibc-aa152ec6ad1bcc84a53f3c02810c7d968d1b8216.zip
Handle missing NSS modules and those without callbacks.
getaddrinfo didn't update the status variable in that round of the
loop if no callback was used.
(cherry picked from commit 657317537c09b82a2feb1194fda045f63e3a1222)
-rw-r--r--ChangeLog6
-rw-r--r--sysdeps/posix/getaddrinfo.c2
2 files changed, 8 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index ec8c64aedf..637b91b263 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2009-07-25  Ulrich Drepper  <drepper@redhat.com>
+
+	[BZ #10448]
+	* sysdeps/posix/getaddrinfo.c (gaih_inet): If NSS module contains no
+	callback we must touch the status to avoid using stale value.
+
 2009-06-16  Ulrich Drepper  <drepper@redhat.com>
 
 	* login/Makefile: Build pt_chown as PIE.
diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c
index d346c621fb..a788d18fee 100644
--- a/sysdeps/posix/getaddrinfo.c
+++ b/sysdeps/posix/getaddrinfo.c
@@ -833,6 +833,8 @@ gaih_inet (const char *name, const struct gaih_service *service,
 			       && inet6_status != NSS_STATUS_UNAVAIL)
 			status = inet6_status;
 		    }
+		  else
+		    status = NSS_STATUS_UNAVAIL;
 		}
 
 	      if (nss_next_action (nip, status) == NSS_ACTION_RETURN)