Justin Pryzby <jpryzby+d@quoininc.com> for the patch. This fixes Debian's
bug #451518.
+2007-11-17 Nicolas François <nicolas.francois@centraliens.net>
+
+ * src/usermod.c: Make usermod -d and -m work independant of the
+ argument order. Thanks to Justin Pryzby <jpryzby+d@quoininc.com>
+ for the patch. This fixes Debian's bug #451518.
+
2007-11-17 Nicolas François <nicolas.francois@centraliens.net>
* NEWS, lib/nscd.c: Execute nscd -i instead of using the private
Lflg++;
break;
case 'm':
- if (!dflg)
- usage ();
-
mflg++;
break;
case 'o':
exit (E_USAGE);
}
+ if (mflg && !dflg) {
+ fprintf (stderr,
+ _("%s: -m flag is ONLY allowed with the -d flag\n"),
+ Prog);
+ usage ();
+ exit (E_USAGE);
+ }
+
if (dflg && strcmp (user_home, user_newhome) == 0)
dflg = mflg = 0;