aboutsummaryrefslogtreecommitdiff
path: root/nscd/nscd.c
diff options
context:
space:
mode:
Diffstat (limited to 'nscd/nscd.c')
-rw-r--r--nscd/nscd.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/nscd/nscd.c b/nscd/nscd.c
index 3fb5ad4691..146f61cb25 100644
--- a/nscd/nscd.c
+++ b/nscd/nscd.c
@@ -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)