summary refs log tree commit diff
path: root/nscd
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2004-06-28 04:42:05 +0000
committerUlrich Drepper <drepper@redhat.com>2004-06-28 04:42:05 +0000
commit482bbeb905781e7b17e8d79b40d2a18c317ec4f1 (patch)
tree8786e28625620e5f917698e2a8e77124c3266b3f /nscd
parent340ef046a6b7e10b112e387f453bc78348c04745 (diff)
downloadglibc-482bbeb905781e7b17e8d79b40d2a18c317ec4f1.tar.gz
glibc-482bbeb905781e7b17e8d79b40d2a18c317ec4f1.tar.xz
glibc-482bbeb905781e7b17e8d79b40d2a18c317ec4f1.zip
Update.
	* nscd/connections.c (invalidate_cache): If the host cache has to
	be invalidated, re-read resolv.conf.
Diffstat (limited to 'nscd')
-rw-r--r--nscd/connections.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/nscd/connections.c b/nscd/connections.c
index 5cb73eb252..82f89c85e7 100644
--- a/nscd/connections.c
+++ b/nscd/connections.c
@@ -1,5 +1,5 @@
 /* Inner loops of cache daemon.
-   Copyright (C) 1998,1999,2000,2001,2002,2003 Free Software Foundation, Inc.
+   Copyright (C) 1998-2003, 2004 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
 
@@ -25,6 +25,7 @@
 #include <grp.h>
 #include <pthread.h>
 #include <pwd.h>
+#include <resolv.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
@@ -241,7 +242,12 @@ invalidate_cache (char *key)
   else if (strcmp (key, "group") == 0)
     number = grpdb;
   else if (__builtin_expect (strcmp (key, "hosts"), 0) == 0)
-    number = hstdb;
+    {
+      number = hstdb;
+
+      /* Re-initialize the resolver.  resolv.conf might have changed.  */
+      res_init ();
+    }
   else
     return;