[Pkg-shadow-commits] r838 - trunk/debian/patches

Nicolas FRANCOIS nekral-guest at costa.debian.org
Tue Feb 7 12:27:15 UTC 2006


Author: nekral-guest
Date: 2006-02-07 12:27:13 +0000 (Tue, 07 Feb 2006)
New Revision: 838

Added:
   trunk/debian/patches/490_useradd_always_unlock_group_databases
Modified:
   trunk/debian/patches/series
Log:
Always remove the lock on the group databases.


Added: trunk/debian/patches/490_useradd_always_unlock_group_databases
===================================================================
--- trunk/debian/patches/490_useradd_always_unlock_group_databases	2006-02-05 00:22:09 UTC (rev 837)
+++ trunk/debian/patches/490_useradd_always_unlock_group_databases	2006-02-07 12:27:13 UTC (rev 838)
@@ -0,0 +1,38 @@
+Goal: A lock is always created on the group and gshadow databases, it
+      should always be removed (not only if do_grp_update).
+
+Fixes: #348250
+
+Status wrt upstream: not reported yet
+
+Index: shadow-4.0.14/src/useradd.c
+===================================================================
+--- shadow-4.0.14.orig/src/useradd.c	2006-02-07 13:11:46.000000000 +0100
++++ shadow-4.0.14/src/useradd.c	2006-02-07 13:13:15.000000000 +0100
+@@ -1273,7 +1273,6 @@
+ 				 _("%s: cannot rewrite group file\n"), Prog);
+ 			fail_exit (E_GRP_UPDATE);
+ 		}
+-		gr_unlock ();
+ #ifdef	SHADOWGRP
+ 		if (is_shadow_grp && !sgr_close ()) {
+ 			fprintf (stderr,
+@@ -1282,13 +1281,16 @@
+ 				 Prog);
+ 			fail_exit (E_GRP_UPDATE);
+ 		}
+-		if (is_shadow_grp)
+-			sgr_unlock ();
+ #endif
+ 	}
+ 	if (is_shadow_pwd)
+ 		spw_unlock ();
+ 	pw_unlock ();
++	gr_unlock ();
++#ifdef	SHADOWGRP
++	if (is_shadow_grp)
++		sgr_unlock ();
++#endif
+ }
+ 
+ /*

Modified: trunk/debian/patches/series
===================================================================
--- trunk/debian/patches/series	2006-02-05 00:22:09 UTC (rev 837)
+++ trunk/debian/patches/series	2006-02-07 12:27:13 UTC (rev 838)
@@ -51,6 +51,7 @@
 485_shell-env-exitcodes
 486_nowarn
 489_useradd_allow_non_uniq_uid
+490_useradd_always_unlock_group_databases
 # 999-2 is about using cdbs. It does not patch upstream files
 # so shouldn't be here, but we keep it for the future
 # 999-2_build_using_cdbs




More information about the Pkg-shadow-commits mailing list