about summary refs log tree commit diff
path: root/sysdeps/posix
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2010-08-11 07:25:02 -0700
committerUlrich Drepper <drepper@redhat.com>2010-08-11 07:25:02 -0700
commitc3e2f19bb995a0281f4cc56ad81bd67a5404dde6 (patch)
tree5bdbd8e1cb8119cd07cb48c60ef4f383c6b2d875 /sysdeps/posix
parentf15ce4d8dc139523fe0c273580b604b2453acba6 (diff)
downloadglibc-c3e2f19bb995a0281f4cc56ad81bd67a5404dde6.tar.gz
glibc-c3e2f19bb995a0281f4cc56ad81bd67a5404dde6.tar.xz
glibc-c3e2f19bb995a0281f4cc56ad81bd67a5404dde6.zip
Add self-contained test for NSS.
While at it fix interaction between __nss_configure_lookup and nscd.
Otherwise the test fails if nscd is runnung.
Diffstat (limited to 'sysdeps/posix')
-rw-r--r--sysdeps/posix/getaddrinfo.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c
index 2e0c7248f0..126a09ea33 100644
--- a/sysdeps/posix/getaddrinfo.c
+++ b/sysdeps/posix/getaddrinfo.c
@@ -600,7 +600,8 @@ gaih_inet (const char *name, const struct gaih_service *service,
 	      && ++__nss_not_use_nscd_hosts > NSS_NSCD_RETRY)
 	    __nss_not_use_nscd_hosts = 0;
 
-	  if (!__nss_not_use_nscd_hosts)
+	  if (!__nss_not_use_nscd_hosts
+	      && !__nss_database_custom[NSS_DBSIDX_hosts])
 	    {
 	      /* Try to use nscd.  */
 	      struct nscd_ai_result *air = NULL;