Update.
authorUlrich Drepper <drepper@redhat.com>
Thu, 30 Sep 2004 08:27:48 +0000 (08:27 +0000)
committerUlrich Drepper <drepper@redhat.com>
Thu, 30 Sep 2004 08:27:48 +0000 (08:27 +0000)
* nscd/nscd.c (termination_handler): Reset timestamp so that
client immediately stop using the database.

(__nscd_drop_map_ref): Change second parameter to be a reference to
* nscd/nscd.h: Add declaration of addinitgroups and

ChangeLog
nscd/Makefile
nscd/nscd.c
nscd/nscd_getai.c
nscd/nscd_getgr_r.c
nscd/nscd_gethst_r.c
nscd/nscd_getpw_r.c
nscd/nscd_initgroups.c

index ea2528a..f7c62ec 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,8 +1,11 @@
 2004-09-30  Ulrich Drepper  <drepper@redhat.com>
 
+       * nscd/nscd.c (termination_handler): Reset timestamp so that
+       client immediately stop using the database.
+
        * nscd/nscd-client.h (__nscd_get_map_ref): Drop volatile from last
        parameter.
-       (__nscd_drop_map_ref): Change second parameter to be a referenc to
+       (__nscd_drop_map_ref): Change second parameter to be a reference to
        a variable.  Update variable when cycle count changed.
        * nscd/nscd_helper.c (__nscd_get_map_ref): Remove volatile here, too.
        * nscd/nscd_getai.c: Correctly use __nscd_drop_map_ref.  Reinitialize
@@ -12,7 +15,7 @@
        * nscd/nscd_getpw_r.c: Likewise.
        * nscd/nscd_initgroups.c: Likewise.
 
-       * nscd/nscd.h: Add declaretion of addinitgroups and
+       * nscd/nscd.h: Add declaration of addinitgroups and
        readdinitgroups.
 
 2004-09-30  Andreas Jaeger  <aj@suse.de>
index 26cc610..a40a455 100644 (file)
@@ -66,6 +66,8 @@ include ../Rules
 CFLAGS-nscd_getpw_r.c = -fexceptions
 CFLAGS-nscd_getgr_r.c = -fexceptions
 CFLAGS-nscd_gethst_r.c = -fexceptions
+CFLAGS-nscd_getai.c = -fexceptions
+CFLAGS-nscd_initgroups.c = -fexceptions
 
 ifeq (yesyes,$(have-fpie)$(build-shared))
 CFLAGS-nscd.c = -fpie
@@ -89,7 +91,6 @@ CFLAGS-mem.c = -fpie
 CFLAGS-nscd_setup_thread.c = -fpie
 CFLAGS-aicache.c = -fpie
 CFLAGS-selinux.c = -fpie
-CFLAGS-nscd_initgroups.c = -fpie
 CFLAGS-initgrcache.c = -fpie
 
 $(objpfx)nscd: $(addprefix $(objpfx),$(nscd-modules:=.o))
index 3fb5ad4..146f61c 100644 (file)
@@ -430,9 +430,14 @@ termination_handler (int signum)
 
   /* Synchronize memory.  */
   for (int cnt = 0; cnt < lastdb; ++cnt)
-    if (dbs[cnt].persistent)
-      // XXX async OK?
-      msync (dbs[cnt].head, dbs[cnt].memsize, MS_ASYNC);
+    {
+      /* Make sure nobody keeps using the database.  */
+      dbs[cnt].head->timestamp = 0;
+
+      if (dbs[cnt].persistent)
+       // XXX async OK?
+       msync (dbs[cnt].head, dbs[cnt].memsize, MS_ASYNC);
+    }
 
   /* Shutdown the SELinux AVC.  */
   if (selinux_enabled)
index e717dd8..a683976 100644 (file)
@@ -39,7 +39,6 @@ libc_locked_map_ptr (map_handle);
    handling.  */
 libc_freeres_fn (ai_map_free)
 {
-
   if (map_handle.mapped != NO_MAPPING)
     free (map_handle.mapped);
 }
index 9e8170f..1b94bf5 100644 (file)
@@ -73,7 +73,6 @@ libc_locked_map_ptr (map_handle);
    handling.  */
 libc_freeres_fn (gr_map_free)
 {
-
   if (map_handle.mapped != NO_MAPPING)
     free (map_handle.mapped);
 }
index 25553ba..407be14 100644 (file)
@@ -93,7 +93,6 @@ libc_locked_map_ptr (map_handle);
    handling.  */
 libc_freeres_fn (gr_map_free)
 {
-
   if (map_handle.mapped != NO_MAPPING)
     free (map_handle.mapped);
 }
index 9af3858..b04dcfa 100644 (file)
@@ -72,7 +72,6 @@ libc_locked_map_ptr (map_handle);
    handling.  */
 libc_freeres_fn (gr_map_free)
 {
-
   if (map_handle.mapped != NO_MAPPING)
     free (map_handle.mapped);
 }
index c33c76d..ea32ab6 100644 (file)
@@ -35,7 +35,6 @@ libc_locked_map_ptr (map_handle);
    handling.  */
 libc_freeres_fn (gr_map_free)
 {
-
   if (map_handle.mapped != NO_MAPPING)
     free (map_handle.mapped);
 }