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

Nicolas FRANÇOIS nekral-guest at alioth.debian.org
Sun Nov 6 18:39:53 UTC 2011


Author: nekral-guest
Date: 2011-11-06 18:39:53 +0000 (Sun, 06 Nov 2011)
New Revision: 3559

Modified:
   upstream/trunk/ChangeLog
   upstream/trunk/NEWS
   upstream/trunk/man/grpck.8.xml
   upstream/trunk/man/pwck.8.xml
   upstream/trunk/src/grpck.c
   upstream/trunk/src/pwck.c
Log:
	* NEWS, src/pwck.c, man/pwck.8.xm, src/grpck.c, man/grpck.8.xml:
	Add --root option.

Modified: upstream/trunk/ChangeLog
===================================================================
--- upstream/trunk/ChangeLog	2011-11-06 18:39:47 UTC (rev 3558)
+++ upstream/trunk/ChangeLog	2011-11-06 18:39:53 UTC (rev 3559)
@@ -1,5 +1,10 @@
 2011-10-31  Nicolas François  <nicolas.francois at centraliens.net>
 
+	* NEWS, src/pwck.c, man/pwck.8.xm, src/grpck.c, man/grpck.8.xml:
+	Add --root option.
+
+2011-10-31  Nicolas François  <nicolas.francois at centraliens.net>
+
 	* man/limits.5.xml, libmisc/limits.c: Sort limit identifiers.
 	* libmisc/limits.c: Fix support for the K limit identifier.
 	* libmisc/limits.c: Add missing default limit for L and U.

Modified: upstream/trunk/NEWS
===================================================================
--- upstream/trunk/NEWS	2011-11-06 18:39:47 UTC (rev 3558)
+++ upstream/trunk/NEWS	2011-11-06 18:39:53 UTC (rev 3559)
@@ -56,6 +56,7 @@
     shadow entry.
   * Add --root option.
 - grpck
+  * Add --root option.
   * NIS entries were dropped by -s (sort).
 - grpconv
   * Add --root option.
@@ -79,6 +80,7 @@
   * Add --root option.
 - pwpck
   * NIS entries were dropped by -s (sort).
+  * Add --root option.
 - pwconv
   * Add --root option.
 - pwunconv

Modified: upstream/trunk/man/grpck.8.xml
===================================================================
--- upstream/trunk/man/grpck.8.xml	2011-11-06 18:39:47 UTC (rev 3558)
+++ upstream/trunk/man/grpck.8.xml	2011-11-06 18:39:53 UTC (rev 3559)
@@ -151,6 +151,19 @@
 	</listitem>
       </varlistentry>
       <varlistentry>
+	<term>
+	  <option>-R</option>, <option>--root</option>
+	  <replaceable>CHROOT_DIR</replaceable>
+	</term>
+	<listitem>
+	  <para>
+	    Apply changes in the <replaceable>CHROOT_DIR</replaceable>
+	    directory and use the configuration files from the
+	    <replaceable>CHROOT_DIR</replaceable> directory.
+	  </para>
+	</listitem>
+      </varlistentry>
+      <varlistentry>
 	<term><option>-s</option>, <option>--sort</option></term>
 	<listitem>
 	  <para>

Modified: upstream/trunk/man/pwck.8.xml
===================================================================
--- upstream/trunk/man/pwck.8.xml	2011-11-06 18:39:47 UTC (rev 3558)
+++ upstream/trunk/man/pwck.8.xml	2011-11-06 18:39:53 UTC (rev 3559)
@@ -187,6 +187,19 @@
 	</listitem>
       </varlistentry>
       <varlistentry>
+	<term>
+	  <option>-R</option>, <option>--root</option>
+	  <replaceable>CHROOT_DIR</replaceable>
+	</term>
+	<listitem>
+	  <para>
+	    Apply changes in the <replaceable>CHROOT_DIR</replaceable>
+	    directory and use the configuration files from the
+	    <replaceable>CHROOT_DIR</replaceable> directory.
+	  </para>
+	</listitem>
+      </varlistentry>
+      <varlistentry>
 	<term><option>-s</option>, <option>--sort</option></term>
 	<listitem>
 	  <para>

Modified: upstream/trunk/src/grpck.c
===================================================================
--- upstream/trunk/src/grpck.c	2011-11-06 18:39:47 UTC (rev 3558)
+++ upstream/trunk/src/grpck.c	2011-11-06 18:39:53 UTC (rev 3559)
@@ -155,6 +155,7 @@
 	(void) fputs (_("  -h, --help                    display this help message and exit\n"), usageout);
 	(void) fputs (_("  -r, --read-only               display errors and warnings\n"
 	                "                                but do not change files\n"), usageout);
+	(void) fputs (_("  -R, --root CHROOT_DIR         directory to chroot into\n"), usageout);
 	(void) fputs (_("  -s, --sort                    sort entries by UID\n"), usageout);
 	(void) fputs ("\n", usageout);
 	exit (status);
@@ -191,17 +192,18 @@
 {
 	int c;
 	static struct option long_options[] = {
-		{"help",      no_argument, NULL, 'h'},
-		{"quiet",     no_argument, NULL, 'q'},
-		{"read-only", no_argument, NULL, 'r'},
-		{"sort",      no_argument, NULL, 's'},
+		{"help",      no_argument,       NULL, 'h'},
+		{"quiet",     no_argument,       NULL, 'q'},
+		{"read-only", no_argument,       NULL, 'r'},
+		{"root",      required_argument, NULL, 'R'},
+		{"sort",      no_argument,       NULL, 's'},
 		{NULL, 0, NULL, '\0'}
 	};
 
 	/*
 	 * Parse the command line arguments
 	 */
-	while ((c = getopt_long (argc, argv, "hqrs",
+	while ((c = getopt_long (argc, argv, "hqrR:s",
 	                         long_options, NULL)) != -1) {
 		switch (c) {
 		case 'h':
@@ -213,6 +215,8 @@
 		case 'r':
 			read_only = true;
 			break;
+		case 'R': /* no-op, handled in process_root_flag () */
+			break;
 		case 's':
 			sort_mode = true;
 			break;
@@ -836,6 +840,8 @@
 	(void) bindtextdomain (PACKAGE, LOCALEDIR);
 	(void) textdomain (PACKAGE);
 
+	process_root_flag ("-R", argc, argv);
+
 	OPENLOG ("grpck");
 
 	/* Parse the command line arguments */

Modified: upstream/trunk/src/pwck.c
===================================================================
--- upstream/trunk/src/pwck.c	2011-11-06 18:39:47 UTC (rev 3558)
+++ upstream/trunk/src/pwck.c	2011-11-06 18:39:53 UTC (rev 3559)
@@ -152,6 +152,7 @@
 	(void) fputs (_("  -q, --quiet                   report errors only\n"), usageout);
 	(void) fputs (_("  -r, --read-only               display errors and warnings\n"
 	                "                                but do not change files\n"), usageout);
+	(void) fputs (_("  -R, --root CHROOT_DIR         directory to chroot into\n"), usageout);
 #ifdef WITH_TCB
 	if (!getdef_bool ("USE_TCB")) {
 #endif				/* !WITH_TCB */
@@ -171,17 +172,18 @@
 {
 	int c;
 	static struct option long_options[] = {
-		{"help",      no_argument, NULL, 'h'},
-		{"quiet",     no_argument, NULL, 'q'},
-		{"read-only", no_argument, NULL, 'r'},
-		{"sort",      no_argument, NULL, 's'},
+		{"help",      no_argument,       NULL, 'h'},
+		{"quiet",     no_argument,       NULL, 'q'},
+		{"read-only", no_argument,       NULL, 'r'},
+		{"root",      required_argument, NULL, 'R'},
+		{"sort",      no_argument,       NULL, 's'},
 		{NULL, 0, NULL, '\0'}
 	};
 
 	/*
 	 * Parse the command line arguments
 	 */
-	while ((c = getopt_long (argc, argv, "ehqrs",
+	while ((c = getopt_long (argc, argv, "ehqrR:s",
 	                         long_options, NULL)) != -1) {
 		switch (c) {
 		case 'h':
@@ -194,6 +196,8 @@
 		case 'r':
 			read_only = true;
 			break;
+		case 'R': /* no-op, handled in process_root_flag () */
+			break;
 		case 's':
 			sort_mode = true;
 			break;
@@ -835,6 +839,8 @@
 	(void) bindtextdomain (PACKAGE, LOCALEDIR);
 	(void) textdomain (PACKAGE);
 
+	process_root_flag ("-R", argc, argv);
+
 	OPENLOG ("pwck");
 
 	/* Parse the command line arguments */




More information about the Pkg-shadow-commits mailing list