[Pkg-shadow-commits] r2652 - in upstream/trunk: . src
Nicolas FRANÇOIS
nekral-guest at alioth.debian.org
Sat Apr 11 18:39:56 UTC 2009
Author: nekral-guest
Date: 2009-04-11 18:39:56 +0000 (Sat, 11 Apr 2009)
New Revision: 2652
Modified:
upstream/trunk/ChangeLog
upstream/trunk/src/useradd.c
upstream/trunk/src/usermod.c
Log:
* src/usermod.c, src/useraddd.c: Fix the usage string so that it
does not change depending on the configure option. Use a format.
Modified: upstream/trunk/ChangeLog
===================================================================
--- upstream/trunk/ChangeLog 2009-04-11 18:37:59 UTC (rev 2651)
+++ upstream/trunk/ChangeLog 2009-04-11 18:39:56 UTC (rev 2652)
@@ -1,5 +1,10 @@
2009-04-11 Nicolas François <nicolas.francois at centraliens.net>
+ * src/usermod.c, src/useraddd.c: Fix the usage string so that it
+ does not change depending on the configure option. Use a format.
+
+2009-04-11 Nicolas François <nicolas.francois at centraliens.net>
+
* src/gpasswd.c: Fix the usage of the unused macro.
2009-04-11 Nicolas François <nicolas.francois at centraliens.net>
Modified: upstream/trunk/src/useradd.c
===================================================================
--- upstream/trunk/src/useradd.c 2009-04-11 18:37:59 UTC (rev 2651)
+++ upstream/trunk/src/useradd.c 2009-04-11 18:39:56 UTC (rev 2652)
@@ -144,7 +144,8 @@
rflg = false, /* create a system account */
sflg = false, /* shell program for new account */
uflg = false, /* specify user ID for new account */
- Uflg = false; /* create a group having the same name as the user */
+ Uflg = false, /* create a group having the same name as the user */
+ Zflg = false; /* new selinux user */
static bool home_added = false;
@@ -664,7 +665,8 @@
*/
static void usage (void)
{
- fputs (_("Usage: useradd [options] LOGIN\n"
+ fprintf (stderr,
+ _("Usage: useradd [options] LOGIN\n"
"\n"
"Options:\n"
" -b, --base-dir BASE_DIR base directory for the new user account\n"
@@ -698,10 +700,14 @@
" -s, --shell SHELL the login shell for the new user account\n"
" -u, --uid UID force use the UID for the new user account\n"
" -U, --user-group create a group with the same name as the user\n"
+ "%s"
+ "\n"),
#ifdef WITH_SELINUX
- " -Z, --selinux-user SEUSER use a specific SEUSER for the SELinux user mapping\n"
+ _(" -Z, --selinux-user SEUSER use a specific SEUSER for the SELinux user mapping\n")
+#else
+ ""
#endif
- "\n"), stderr);
+ );
exit (E_USAGE);
}
@@ -1173,6 +1179,7 @@
case 'Z':
if (is_selinux_enabled () > 0) {
user_selinux = optarg;
+ Zflg = true;
} else {
fprintf (stderr,
_("%s: -Z requires SELinux enabled kernel\n"),
Modified: upstream/trunk/src/usermod.c
===================================================================
--- upstream/trunk/src/usermod.c 2009-04-11 18:37:59 UTC (rev 2651)
+++ upstream/trunk/src/usermod.c 2009-04-11 18:39:56 UTC (rev 2652)
@@ -300,7 +300,8 @@
*/
static void usage (void)
{
- fputs (_("Usage: usermod [options] LOGIN\n"
+ fprintf (stderr,
+ _("Usage: usermod [options] LOGIN\n"
"\n"
"Options:\n"
" -c, --comment COMMENT new value of the GECOS field\n"
@@ -323,10 +324,14 @@
" -s, --shell SHELL new login shell for the user account\n"
" -u, --uid UID new UID for the user account\n"
" -U, --unlock unlock the user account\n"
+ "%s"
+ "\n"),
#ifdef WITH_SELINUX
- " -Z, --selinux-user new SELinux user mapping for the user account\n"
+ _(" -Z, --selinux-user new SELinux user mapping for the user account\n")
+#else
+ ""
#endif
- "\n"), stderr);
+ );
exit (E_USAGE);
}
More information about the Pkg-shadow-commits
mailing list