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

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


Author: nekral-guest
Date: 2005-05-22 23:15:13 +0000 (Sun, 22 May 2005)
New Revision: 165

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


Added: trunk/debian/patches/008_grpck_add_prune_option
===================================================================
--- trunk/debian/patches/008_grpck_add_prune_option	2005-05-22 23:07:06 UTC (rev 164)
+++ trunk/debian/patches/008_grpck_add_prune_option	2005-05-22 23:15:13 UTC (rev 165)
@@ -0,0 +1,54 @@
+Goal: grpck now has an (otherwise undocumented) -p option, so that
+      shadowconfig can clean up the results of the above, so the config
+      script will fail randomly less often.
+Fixes: #103385
+
+Status wrt upstream: It could certainly be submitted to upstream.
+
+Index: shadow-4.0.3/src/grpck.c
+===================================================================
+--- shadow-4.0.3.orig/src/grpck.c	2005-05-23 01:08:35.567167000 +0200
++++ shadow-4.0.3/src/grpck.c	2005-05-23 01:09:33.657167000 +0200
+@@ -146,6 +146,7 @@
+ 	int errors = 0;
+ 	int deleted = 0;
+ 	int i;
++	int prune = 0;
+ 	struct commonio_entry *gre, *tgre;
+ 	struct group *grp;
+ 	int sort_mode = 0;
+@@ -172,7 +173,7 @@
+ 	 * Parse the command line arguments
+ 	 */
+ 
+-	while ((arg = getopt (argc, argv, "qrs")) != EOF) {
++	while ((arg = getopt (argc, argv, "qprs")) != EOF) {
+ 		switch (arg) {
+ 		case 'q':
+ 			/* quiet - ignored for now */
+@@ -183,6 +184,9 @@
+ 		case 's':
+ 			sort_mode = 1;
+ 			break;
++		case 'p':
++			prune = 1;
++			break;
+ 		default:
+ 			usage ();
+ 		}
+@@ -315,9 +319,13 @@
+ 			/*
+ 			 * prompt the user to delete the entry or not
+ 			 */
+-
+-			if (!yes_or_no ())
++			if (!prune) {
++			        if (!yes_or_no ())
++				        continue;
++			} else {
++			        puts("Yes");
+ 				continue;
++			}
+ 
+ 			/*
+ 			 * All group file deletions wind up here. This code

Modified: trunk/debian/patches/008_src.dpatch
===================================================================
--- trunk/debian/patches/008_src.dpatch	2005-05-22 23:07:06 UTC (rev 164)
+++ trunk/debian/patches/008_src.dpatch	2005-05-22 23:15:13 UTC (rev 165)
@@ -24,53 +24,6 @@
 
 @DPATCH@
 
-Index: shadow-4.0.3/src/grpck.c
-===================================================================
---- shadow-4.0.3.orig/src/grpck.c	2005-05-23 00:40:16.187167000 +0200
-+++ shadow-4.0.3/src/grpck.c	2005-05-23 00:40:50.297167000 +0200
-@@ -146,6 +146,7 @@
- 	int errors = 0;
- 	int deleted = 0;
- 	int i;
-+	int prune = 0;
- 	struct commonio_entry *gre, *tgre;
- 	struct group *grp;
- 	int sort_mode = 0;
-@@ -172,7 +173,7 @@
- 	 * Parse the command line arguments
- 	 */
- 
--	while ((arg = getopt (argc, argv, "qrs")) != EOF) {
-+	while ((arg = getopt (argc, argv, "qprs")) != EOF) {
- 		switch (arg) {
- 		case 'q':
- 			/* quiet - ignored for now */
-@@ -183,6 +184,9 @@
- 		case 's':
- 			sort_mode = 1;
- 			break;
-+		case 'p':
-+			prune = 1;
-+			break;
- 		default:
- 			usage ();
- 		}
-@@ -315,9 +319,13 @@
- 			/*
- 			 * prompt the user to delete the entry or not
- 			 */
--
--			if (!yes_or_no ())
-+			if (!prune) {
-+			        if (!yes_or_no ())
-+				        continue;
-+			} else {
-+			        puts("Yes");
- 				continue;
-+			}
- 
- 			/*
- 			 * All group file deletions wind up here. This code
 Index: shadow-4.0.3/src/login.c
 ===================================================================
 --- shadow-4.0.3.orig/src/login.c	2005-05-23 00:40:16.187167000 +0200

Modified: trunk/debian/patches/series
===================================================================
--- trunk/debian/patches/series	2005-05-22 23:07:06 UTC (rev 164)
+++ trunk/debian/patches/series	2005-05-22 23:15:13 UTC (rev 165)
@@ -5,6 +5,7 @@
 005_manpages.dpatch
 006_libmisc.dpatch
 008_src.dpatch
+008_grpck_add_prune_option
 009_etc.dpatch
 010_chpasswd-md5.dpatch
 100_LINGUAS.dpatch