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.
This commit is contained in:
parent
4aafb131ca
commit
71392cdc8f
@ -1,3 +1,9 @@
|
|||||||
|
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>
|
2007-11-17 Nicolas François <nicolas.francois@centraliens.net>
|
||||||
|
|
||||||
* NEWS, lib/nscd.c: Execute nscd -i instead of using the private
|
* NEWS, lib/nscd.c: Execute nscd -i instead of using the private
|
||||||
|
@ -987,9 +987,6 @@ static void process_flags (int argc, char **argv)
|
|||||||
Lflg++;
|
Lflg++;
|
||||||
break;
|
break;
|
||||||
case 'm':
|
case 'm':
|
||||||
if (!dflg)
|
|
||||||
usage ();
|
|
||||||
|
|
||||||
mflg++;
|
mflg++;
|
||||||
break;
|
break;
|
||||||
case 'o':
|
case 'o':
|
||||||
@ -1059,6 +1056,14 @@ static void process_flags (int argc, char **argv)
|
|||||||
exit (E_USAGE);
|
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)
|
if (dflg && strcmp (user_home, user_newhome) == 0)
|
||||||
dflg = mflg = 0;
|
dflg = mflg = 0;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user