Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > bee470e21a8ce2cdd844d7d805aa403d > files > 178

glibc-2.5-49.el5_5.6.src.rpm

2008-01-05  Jakub Jelinek  <jakub@redhat.com>

	[BZ #5112]
	* nscd/connections.c (restart): Fix condition.

2007-10-05  Ulrich Drepper  <drepper@redhat.com>

	[BZ #5112]
	* nscd/connections.c (restart): Don't resync if database is
	disabled.  Patch mostly by Brian De Wolf <bldewolf@csupomona.edu>.

--- libc/nscd/connections.c	29 Aug 2007 06:09:59 -0000	1.102
+++ libc/nscd/connections.c	6 Oct 2007 20:03:00 -0000	1.103
@@ -1284,14 +1293,15 @@ cannot change to old working directory: 
 
   /* Synchronize memory.  */
   for (int cnt = 0; cnt < lastdb; ++cnt)
-    {
-      /* Make sure nobody keeps using the database.  */
-      dbs[cnt].head->timestamp = 0;
+    if (dbs[cnt].enabled)
+      {
+	/* 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);
-    }
+	if (dbs[cnt].persistent)
+	  // XXX async OK?
+	  msync (dbs[cnt].head, dbs[cnt].memsize, MS_ASYNC);
+      }
 
   /* The preparations are done.  */
   execv ("/proc/self/exe", argv);