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

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


Author: nekral-guest
Date: 2011-11-06 18:40:22 +0000 (Sun, 06 Nov 2011)
New Revision: 3564

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

Modified: upstream/trunk/ChangeLog
===================================================================
--- upstream/trunk/ChangeLog	2011-11-06 18:40:17 UTC (rev 3563)
+++ upstream/trunk/ChangeLog	2011-11-06 18:40:22 UTC (rev 3564)
@@ -1,5 +1,9 @@
 2011-11-06  Nicolas François  <nicolas.francois at centraliens.net>
 
+	* NEWS, src/newusers.c, man/newusers.8.xml: Add --root option.
+
+2011-11-06  Nicolas François  <nicolas.francois at centraliens.net>
+
 	* src/vipw.c: Remove unused variable a.
 
 2011-11-06  Nicolas François  <nicolas.francois at centraliens.net>

Modified: upstream/trunk/NEWS
===================================================================
--- upstream/trunk/NEWS	2011-11-06 18:40:17 UTC (rev 3563)
+++ upstream/trunk/NEWS	2011-11-06 18:40:22 UTC (rev 3564)
@@ -76,6 +76,8 @@
     pam_lastlog.
 - newgrp, sg
   * Fix parsing of gshadow entries.
+- newusers
+  * Add --root option.
 - passwd
   * Add --root option.
 - pwpck

Modified: upstream/trunk/man/newusers.8.xml
===================================================================
--- upstream/trunk/man/newusers.8.xml	2011-11-06 18:40:17 UTC (rev 3563)
+++ upstream/trunk/man/newusers.8.xml	2011-11-06 18:40:22 UTC (rev 3564)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
    Copyright (c) 1991 - 1994, Julianne Frances Haugh
-   Copyright (c) 2007 - 2009, Nicolas François
+   Copyright (c) 2007 - 2011, Nicolas François
    All rights reserved.
   
    Redistribution and use in source and binary forms, with or without
@@ -281,6 +281,19 @@
 	  </para>
 	</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>
     </variablelist>
     <variablelist remap='IP' condition="no_pam">
       <varlistentry condition="sha_crypt">

Modified: upstream/trunk/src/newusers.c
===================================================================
--- upstream/trunk/src/newusers.c	2011-11-06 18:40:17 UTC (rev 3563)
+++ upstream/trunk/src/newusers.c	2011-11-06 18:40:22 UTC (rev 3564)
@@ -130,6 +130,7 @@
 #endif				/* !USE_PAM */
 	(void) fputs (_("  -h, --help                    display this help message and exit\n"), usageout);
 	(void) fputs (_("  -r, --system                  create system accounts\n"), usageout);
+	(void) fputs (_("  -R, --root CHROOT_DIR         directory to chroot into\n"), usageout);
 #ifndef USE_PAM
 #ifdef USE_SHA_CRYPT
 	(void) fputs (_("  -s, --sha-rounds              number of SHA rounds for the SHA*\n"
@@ -530,6 +531,7 @@
 #endif				/* !USE_PAM */
 		{"help",         no_argument,       NULL, 'h'},
 		{"system",       no_argument,       NULL, 'r'},
+		{"root",         required_argument, NULL, 'R'},
 #ifndef USE_PAM
 #ifdef USE_SHA_CRYPT
 		{"sha-rounds",   required_argument, NULL, 's'},
@@ -561,6 +563,8 @@
 		case 'r':
 			rflg = true;
 			break;
+		case 'R': /* no-op, handled in process_root_flag () */
+			break;
 #ifndef USE_PAM
 #ifdef USE_SHA_CRYPT
 		case 's':
@@ -838,6 +842,9 @@
 	(void) bindtextdomain (PACKAGE, LOCALEDIR);
 	(void) textdomain (PACKAGE);
 
+	/* FIXME: will not work with an input file */
+	process_root_flag ("-R", argc, argv);
+
 	OPENLOG ("newusers");
 
 	process_flags (argc, argv);




More information about the Pkg-shadow-commits mailing list