* NEWS, src/newusers.c, man/newusers.8.xml: Add --root option.
This commit is contained in:
parent
2a2c8190ec
commit
f3afeb9c04
@ -1,3 +1,7 @@
|
|||||||
|
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>
|
2011-11-06 Nicolas François <nicolas.francois@centraliens.net>
|
||||||
|
|
||||||
* src/vipw.c: Remove unused variable a.
|
* src/vipw.c: Remove unused variable a.
|
||||||
|
2
NEWS
2
NEWS
@ -76,6 +76,8 @@ shadow-4.1.4.3 -> shadow-4.1.5 UNRELEASED
|
|||||||
pam_lastlog.
|
pam_lastlog.
|
||||||
- newgrp, sg
|
- newgrp, sg
|
||||||
* Fix parsing of gshadow entries.
|
* Fix parsing of gshadow entries.
|
||||||
|
- newusers
|
||||||
|
* Add --root option.
|
||||||
- passwd
|
- passwd
|
||||||
* Add --root option.
|
* Add --root option.
|
||||||
- pwpck
|
- pwpck
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!--
|
<!--
|
||||||
Copyright (c) 1991 - 1994, Julianne Frances Haugh
|
Copyright (c) 1991 - 1994, Julianne Frances Haugh
|
||||||
Copyright (c) 2007 - 2009, Nicolas François
|
Copyright (c) 2007 - 2011, Nicolas François
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without
|
Redistribution and use in source and binary forms, with or without
|
||||||
@ -281,6 +281,19 @@
|
|||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</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>
|
||||||
<variablelist remap='IP' condition="no_pam">
|
<variablelist remap='IP' condition="no_pam">
|
||||||
<varlistentry condition="sha_crypt">
|
<varlistentry condition="sha_crypt">
|
||||||
|
@ -130,6 +130,7 @@ static void usage (int status)
|
|||||||
#endif /* !USE_PAM */
|
#endif /* !USE_PAM */
|
||||||
(void) fputs (_(" -h, --help display this help message and exit\n"), usageout);
|
(void) fputs (_(" -h, --help display this help message and exit\n"), usageout);
|
||||||
(void) fputs (_(" -r, --system create system accounts\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
|
#ifndef USE_PAM
|
||||||
#ifdef USE_SHA_CRYPT
|
#ifdef USE_SHA_CRYPT
|
||||||
(void) fputs (_(" -s, --sha-rounds number of SHA rounds for the SHA*\n"
|
(void) fputs (_(" -s, --sha-rounds number of SHA rounds for the SHA*\n"
|
||||||
@ -530,6 +531,7 @@ static void process_flags (int argc, char **argv)
|
|||||||
#endif /* !USE_PAM */
|
#endif /* !USE_PAM */
|
||||||
{"help", no_argument, NULL, 'h'},
|
{"help", no_argument, NULL, 'h'},
|
||||||
{"system", no_argument, NULL, 'r'},
|
{"system", no_argument, NULL, 'r'},
|
||||||
|
{"root", required_argument, NULL, 'R'},
|
||||||
#ifndef USE_PAM
|
#ifndef USE_PAM
|
||||||
#ifdef USE_SHA_CRYPT
|
#ifdef USE_SHA_CRYPT
|
||||||
{"sha-rounds", required_argument, NULL, 's'},
|
{"sha-rounds", required_argument, NULL, 's'},
|
||||||
@ -561,6 +563,8 @@ static void process_flags (int argc, char **argv)
|
|||||||
case 'r':
|
case 'r':
|
||||||
rflg = true;
|
rflg = true;
|
||||||
break;
|
break;
|
||||||
|
case 'R': /* no-op, handled in process_root_flag () */
|
||||||
|
break;
|
||||||
#ifndef USE_PAM
|
#ifndef USE_PAM
|
||||||
#ifdef USE_SHA_CRYPT
|
#ifdef USE_SHA_CRYPT
|
||||||
case 's':
|
case 's':
|
||||||
@ -838,6 +842,9 @@ int main (int argc, char **argv)
|
|||||||
(void) bindtextdomain (PACKAGE, LOCALEDIR);
|
(void) bindtextdomain (PACKAGE, LOCALEDIR);
|
||||||
(void) textdomain (PACKAGE);
|
(void) textdomain (PACKAGE);
|
||||||
|
|
||||||
|
/* FIXME: will not work with an input file */
|
||||||
|
process_root_flag ("-R", argc, argv);
|
||||||
|
|
||||||
OPENLOG ("newusers");
|
OPENLOG ("newusers");
|
||||||
|
|
||||||
process_flags (argc, argv);
|
process_flags (argc, argv);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user