about summary refs log tree commit diff
path: root/nscd
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2006-04-27 09:17:12 +0000
committerJakub Jelinek <jakub@redhat.com>2006-04-27 09:17:12 +0000
commit9b356005b4dca9c57af7cb1f5313a13a728c6310 (patch)
tree3c096b8ac144496c6c91f12466c4efe2e01ca17a /nscd
parent03f76580354b024a77541221fe5760c0501b8b6e (diff)
downloadglibc-9b356005b4dca9c57af7cb1f5313a13a728c6310.tar.gz
glibc-9b356005b4dca9c57af7cb1f5313a13a728c6310.tar.xz
glibc-9b356005b4dca9c57af7cb1f5313a13a728c6310.zip
* nscd/connections.c (sighup_handler): Only run prune_cache on
	enabled databases.
Diffstat (limited to 'nscd')
-rw-r--r--nscd/connections.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/nscd/connections.c b/nscd/connections.c
index a52082cba3..f8e66c20a6 100644
--- a/nscd/connections.c
+++ b/nscd/connections.c
@@ -1897,13 +1897,16 @@ finish_drop_privileges (void)
 void
 sighup_handler (int signum)
 {
-    /* Prune the password database */
+  /* Prune the password database.  */
+  if (dbs[pwddb].enabled)
     prune_cache (&dbs[pwddb], LONG_MAX);
     
-    /* Prune the group database */
+  /* Prune the group database.  */
+  if (dbs[grpdb].enabled)
     prune_cache (&dbs[grpdb], LONG_MAX);
 
-    /* Prune the host database */
+  /* Prune the host database.  */
+  if (dbs[hstdb].enabled)
     prune_cache (&dbs[hstdb], LONG_MAX);
 }