]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
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 ea2528adbc324bf8c845a5666b985b1a398b49c4..f7c62ec69af2590e4492313d0e48ce86b411fb58 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 26cc610fe156ab698b94fbb0bcba2ad68ced99ca..a40a455267e825ebd004514036ee7d1a9de7b6dd 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 3fb5ad46913c8a5c28b8ee57bd348c49041f5da6..146f61cb2596530e5ea4887a0a3e3b1260f0f00a 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 e717dd85a0199167115490a057cd65b7a92eafb5..a683976d87b6e0eac3918eac6a2a65dd4b7b05be 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 9e8170f0f226c5d6a23c1e9007b505a75df31740..1b94bf584fece32e667f0aac52daf0291e8c9a00 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 25553babf4325e3d56f6f108a4b5f56e6bf78bf6..407be1441f17be4c5c486eb8ecfde585431a314f 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 9af3858454b3648898e66b740307084ce4c69916..b04dcfaa9933fcb4d67d6fa8995665fa2e7d9c36 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 c33c76dfb397e9bd9bffdf4bfb941f5bb9948720..ea32ab6bccae7624a717ba025f1661fbb56177be 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);
 }