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

Nicolas FRANCOIS pkg-shadow-devel@lists.alioth.debian.org
Sun, 22 May 2005 23:35:43 +0000


Author: nekral-guest
Date: 2005-05-22 23:35:42 +0000 (Sun, 22 May 2005)
New Revision: 170

Added:
   trunk/debian/patches/008_userdel_remove_group_from_gshadow
Modified:
   trunk/debian/patches/008_src.dpatch
   trunk/debian/patches/series
Log:
Move some bits from 008_src.dpatch to 008_userdel_remove_group_from_gshadow


Modified: trunk/debian/patches/008_src.dpatch
===================================================================
--- trunk/debian/patches/008_src.dpatch	2005-05-22 23:32:27 UTC (rev 169)
+++ trunk/debian/patches/008_src.dpatch	2005-05-22 23:35:42 UTC (rev 170)
@@ -821,37 +821,3 @@
 +	run_shell (shell, command, additional_args, fakelogin);
  	 /*NOTREACHED*/ exit (1);
  }
-Index: shadow-4.0.3/src/userdel.c
-===================================================================
---- shadow-4.0.3.orig/src/userdel.c	2005-05-23 00:40:16.187167000 +0200
-+++ shadow-4.0.3/src/userdel.c	2005-05-23 00:40:50.307167000 +0200
-@@ -147,6 +147,7 @@
- 	struct group *ngrp;
- 
- #ifdef	SHADOWGRP
-+	int deleted_user_group = 0;
- 	const struct sgrp *sgrp;
- 	struct sgrp *nsgrp;
- #endif				/* SHADOWGRP */
-@@ -209,6 +210,10 @@
- 
- 		gr_remove (grp->gr_name);
- 
-+#ifdef SHADOWGRP
-+		deleted_user_group = 1;
-+#endif
-+
- 		/*
- 		 * Update the DBM group file with the new entry as well.
- 		 */
-@@ -279,6 +284,10 @@
- 		SYSLOG ((LOG_INFO, "delete `%s' from shadow group `%s'\n",
- 			 user_name, nsgrp->sg_name));
- 	}
-+
-+	if (deleted_user_group)
-+		sgr_remove(user_name);
-+
- #ifdef	NDBM
- 	endsgent ();
- #endif				/* NDBM */

Added: trunk/debian/patches/008_userdel_remove_group_from_gshadow
===================================================================
--- trunk/debian/patches/008_userdel_remove_group_from_gshadow	2005-05-22 23:32:27 UTC (rev 169)
+++ trunk/debian/patches/008_userdel_remove_group_from_gshadow	2005-05-22 23:35:42 UTC (rev 170)
@@ -0,0 +1,40 @@
+Goal: userdel now deletes user groups from /etc/gshdow as well as
+      /etc/group.
+Fixes: #99442
+
+Status wrt upstream: It could certainly be submitted to upstream.
+
+Index: shadow-4.0.3/src/userdel.c
+===================================================================
+--- shadow-4.0.3.orig/src/userdel.c	2005-05-22 22:41:28.837167000 +0200
++++ shadow-4.0.3/src/userdel.c	2005-05-22 23:02:35.137167000 +0200
+@@ -147,6 +147,7 @@
+ 	struct group *ngrp;
+ 
+ #ifdef	SHADOWGRP
++	int deleted_user_group = 0;
+ 	const struct sgrp *sgrp;
+ 	struct sgrp *nsgrp;
+ #endif				/* SHADOWGRP */
+@@ -209,6 +210,10 @@
+ 
+ 		gr_remove (grp->gr_name);
+ 
++#ifdef SHADOWGRP
++		deleted_user_group = 1;
++#endif
++
+ 		/*
+ 		 * Update the DBM group file with the new entry as well.
+ 		 */
+@@ -279,6 +284,10 @@
+ 		SYSLOG ((LOG_INFO, "delete `%s' from shadow group `%s'\n",
+ 			 user_name, nsgrp->sg_name));
+ 	}
++
++	if (deleted_user_group)
++		sgr_remove(user_name);
++
+ #ifdef	NDBM
+ 	endsgent ();
+ #endif				/* NDBM */

Modified: trunk/debian/patches/series
===================================================================
--- trunk/debian/patches/series	2005-05-22 23:32:27 UTC (rev 169)
+++ trunk/debian/patches/series	2005-05-22 23:35:42 UTC (rev 170)
@@ -9,6 +9,7 @@
 008_login_stop_checking_args_after--
 008_login_opt-f_with_username_after--
 008_usermod_warn_old_home_not_removed
+008_userdel_remove_group_from_gshadow
 009_etc.dpatch
 010_chpasswd-md5.dpatch
 100_LINGUAS.dpatch