[Pkg-shadow-commits] r1887 - in upstream/trunk: . src

nekral-guest at alioth.debian.org nekral-guest at alioth.debian.org
Sat Mar 8 16:23:22 UTC 2008


Author: nekral-guest
Date: 2008-03-08 16:23:22 +0000 (Sat, 08 Mar 2008)
New Revision: 1887

Modified:
   upstream/trunk/ChangeLog
   upstream/trunk/NEWS
   upstream/trunk/src/groupdel.c
Log:
Do not rewrite the group and gshadow file in case of error.


Modified: upstream/trunk/ChangeLog
===================================================================
--- upstream/trunk/ChangeLog	2008-03-08 16:20:55 UTC (rev 1886)
+++ upstream/trunk/ChangeLog	2008-03-08 16:23:22 UTC (rev 1887)
@@ -1,12 +1,17 @@
 2008-03-08  Nicolas François  <nicolas.francois at centraliens.net>
 
+	* NEWS, src/groupdel.c: Do not rewrite the group and gshadow file
+	in case of error.
+
+2008-03-08  Nicolas François  <nicolas.francois at centraliens.net>
+
 	* src/groupdel.c: Do not log that the group was deleted if an
 	error occurred.
 
 2008-03-08  Nicolas François  <nicolas.francois at centraliens.net>
 
-	* src/groupdel.c: Do not raise an error if the group does not
-	exist in the gshadow file.
+	* NEWS, src/groupdel.c: Do not raise an error if the group does
+	not exist in the gshadow file.
 
 2008-03-08  Nicolas François  <nicolas.francois at centraliens.net>
 

Modified: upstream/trunk/NEWS
===================================================================
--- upstream/trunk/NEWS	2008-03-08 16:20:55 UTC (rev 1886)
+++ upstream/trunk/NEWS	2008-03-08 16:23:22 UTC (rev 1887)
@@ -33,6 +33,7 @@
   * New option -r, --system for system accounts.
 - groupdel
   * Do not fail if the group does not exist in the gshadow file.
+  * Do not rewrite the group or gshadow file in case of error.
 - groupmems
   * Fix buffer overflow when adding an user to a group. Thanks to Peter Vrabec.
 - groupmod

Modified: upstream/trunk/src/groupdel.c
===================================================================
--- upstream/trunk/src/groupdel.c	2008-03-08 16:20:55 UTC (rev 1886)
+++ upstream/trunk/src/groupdel.c	2008-03-08 16:23:22 UTC (rev 1887)
@@ -340,10 +340,11 @@
 	open_files ();
 
 	grp_update ();
-	close_files ();
+	if (errors == 0) {
+		close_files ();
+		nscd_flush_cache ("group");
+	}
 
-	nscd_flush_cache ("group");
-
 #ifdef USE_PAM
 	if (retval == PAM_SUCCESS)
 		pam_end (pamh, PAM_SUCCESS);




More information about the Pkg-shadow-commits mailing list