about summary refs log tree commit diff
path: root/nscd/nscd_getai.c
diff options
context:
space:
mode:
Diffstat (limited to 'nscd/nscd_getai.c')
-rw-r--r--nscd/nscd_getai.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/nscd/nscd_getai.c b/nscd/nscd_getai.c
index 24b374b0dc..866f7b2a5f 100644
--- a/nscd/nscd_getai.c
+++ b/nscd/nscd_getai.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2004 Free Software Foundation, Inc.
+/* Copyright (C) 2004, 2005 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2004.
 
@@ -78,7 +78,7 @@ __nscd_getai (const char *key, struct nscd_ai_result **result, int *h_errnop)
 				 sizeof (ai_resp_mem));
       if (sock == -1)
 	{
-	  /* nscd not running or wrong version or hosts caching disabled.  */
+	  /* nscd not running or wrong version.  */
 	  __nss_not_use_nscd_hosts = 1;
 	  goto out;
 	}
@@ -151,6 +151,13 @@ __nscd_getai (const char *key, struct nscd_ai_result **result, int *h_errnop)
     }
   else
     {
+      if (__builtin_expect (ai_resp->found == -1, 0))
+	{
+	  /* The daemon does not cache this database.  */
+	  __nss_not_use_nscd_hosts = 1;
+	  goto out_close;
+	}
+
       /* Store the error number.  */
       *h_errnop = ai_resp->error;