about summary refs log tree commit diff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2008-05-17 21:44:56 +0000
committerUlrich Drepper <drepper@redhat.com>2008-05-17 21:44:56 +0000
commit66d904966f878ebace3e55d4fa86944d24a55420 (patch)
tree27b03874c65ab76b1c7b462b65a8e0b554679c30
parent343996c47ca25b7aadd8bcf1f0775841754a8099 (diff)
downloadglibc-66d904966f878ebace3e55d4fa86944d24a55420.tar.gz
glibc-66d904966f878ebace3e55d4fa86944d24a55420.tar.xz
glibc-66d904966f878ebace3e55d4fa86944d24a55420.zip
* sysdeps/posix/getaddrinfo.c (gaih_inet): If nscd reports no
	entry is available, believe it.
-rw-r--r--ChangeLog3
-rw-r--r--sysdeps/posix/getaddrinfo.c5
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 688d38d059..e3685dc90a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2008-05-17  Ulrich Drepper  <drepper@redhat.com>
 
+	* sysdeps/posix/getaddrinfo.c (gaih_inet): If nscd reports no
+	entry is available, believe it.
+
 	* resolv/nss_dns/dns-host.c (gaih_getanswer_slice): If there are
 	no answers return NSS_STATUS_NOTFOUND.
 	(gaih_getanswer): Don't call gaih_getanswer_slice if the answer
diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c
index 2515d23c26..5c82b5274a 100644
--- a/sysdeps/posix/getaddrinfo.c
+++ b/sysdeps/posix/getaddrinfo.c
@@ -660,7 +660,10 @@ gaih_inet (const char *name, const struct gaih_service *service,
 
 		  goto process_list;
 		}
-	      else if (err != 0 && __nss_not_use_nscd_hosts == 0)
+	      else if (err == 0)
+		/* The database contains a negative entry.  */
+		return 0;
+	      else if (__nss_not_use_nscd_hosts == 0)
 		{
 		  if (herrno == NETDB_INTERNAL && errno == ENOMEM)
 		    return -EAI_MEMORY;