+2011-11-06 Nicolas François <nicolas.francois@centraliens.net>
+
+ * NEWS, src/newusers.c, man/newusers.8.xml: Add --root option.
+
2011-11-06 Nicolas François <nicolas.francois@centraliens.net>
* src/vipw.c: Remove unused variable a.
<?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
</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">
#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"
#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'},
case 'r':
rflg = true;
break;
+ case 'R': /* no-op, handled in process_root_flag () */
+ break;
#ifndef USE_PAM
#ifdef USE_SHA_CRYPT
case 's':
(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);