Skip to content

Commit

Permalink
Update.
Browse files Browse the repository at this point in the history
	* 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
  • Loading branch information
Ulrich Drepper committed Sep 30, 2004
1 parent 0891f97 commit 74fef3b
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 11 deletions.
7 changes: 5 additions & 2 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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>
Expand Down
3 changes: 2 additions & 1 deletion nscd/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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))
Expand Down
11 changes: 8 additions & 3 deletions nscd/nscd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 0 additions & 1 deletion nscd/nscd_getai.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
1 change: 0 additions & 1 deletion nscd/nscd_getgr_r.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
1 change: 0 additions & 1 deletion nscd/nscd_gethst_r.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
1 change: 0 additions & 1 deletion nscd/nscd_getpw_r.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
1 change: 0 additions & 1 deletion nscd/nscd_initgroups.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 74fef3b

Please sign in to comment.