[Pkg-shadow-commits] r1362 - in upstream/trunk: . src
nekral-guest at alioth.debian.org
nekral-guest at alioth.debian.org
Sat Nov 17 14:40:54 UTC 2007
Author: nekral-guest
Date: 2007-11-17 14:40:54 +0000 (Sat, 17 Nov 2007)
New Revision: 1362
Modified:
upstream/trunk/ChangeLog
upstream/trunk/NEWS
upstream/trunk/src/usermod.c
Log:
Make usermod -o and -u work independently of the argument order.
Modified: upstream/trunk/ChangeLog
===================================================================
--- upstream/trunk/ChangeLog 2007-11-17 14:33:26 UTC (rev 1361)
+++ upstream/trunk/ChangeLog 2007-11-17 14:40:54 UTC (rev 1362)
@@ -1,12 +1,17 @@
2007-11-17 Nicolas François <nicolas.francois at centraliens.net>
+ * src/usermod.c: Make usermod -o and -u work independently of the
+ argument order.
+
+2007-11-17 Nicolas François <nicolas.francois at centraliens.net>
+
* src/usermod.c: Validate that two of the -L, -p, and -U options
are not used at the same time after the parsing of options. -U
used to be allowed after -p or -L, but not before.
2007-11-17 Nicolas François <nicolas.francois at centraliens.net>
- * src/usermod.c: Make usermod -d and -m work independent of the
+ * src/usermod.c: Make usermod -d and -m work independently of the
argument order. Thanks to Justin Pryzby <jpryzby+d at quoininc.com>
for the patch. This fixes Debian's bug #451518.
Modified: upstream/trunk/NEWS
===================================================================
--- upstream/trunk/NEWS 2007-11-17 14:33:26 UTC (rev 1361)
+++ upstream/trunk/NEWS 2007-11-17 14:40:54 UTC (rev 1362)
@@ -32,6 +32,7 @@
writing the passwd files.
- Flush the nscd tables using nscd -i instead of the private glibc socket.
(RedHat patches shadow-4.0.16-nscd.c and shadow-4.0.17-notInheritFd.patch)
+- usermod: Make usermod options independent of the argument order.
shadow-4.0.18.1 -> shadow-4.0.18.2 28-10-2007
Modified: upstream/trunk/src/usermod.c
===================================================================
--- upstream/trunk/src/usermod.c 2007-11-17 14:33:26 UTC (rev 1361)
+++ upstream/trunk/src/usermod.c 2007-11-17 14:40:54 UTC (rev 1362)
@@ -987,9 +987,6 @@
mflg++;
break;
case 'o':
- if (!uflg)
- usage ();
-
oflg++;
break;
case 'p':
@@ -1055,6 +1052,14 @@
exit (E_USAGE);
}
+ if (oflg && !uflg) {
+ fprintf (stderr,
+ _("%s: -o flag is ONLY allowed with the -u flag\n"),
+ Prog);
+ usage ();
+ exit (E_USAGE);
+ }
+
if (mflg && !dflg) {
fprintf (stderr,
_("%s: -m flag is ONLY allowed with the -d flag\n"),
More information about the Pkg-shadow-commits
mailing list