The -c, -e, and -m options are exclusives.
This commit is contained in:
parent
6e3ad7a275
commit
a30c0a8192
@ -1,3 +1,8 @@
|
||||
2007-11-20 Nicolas François <nicolas.francois@centraliens.net>
|
||||
|
||||
* src/chgpasswd.c, src/chpasswd.c: The -c, -e, and -m options are
|
||||
exclusives.
|
||||
|
||||
2007-11-20 Nicolas François <nicolas.francois@centraliens.net>
|
||||
|
||||
* man/chpasswd.8.xml, man/chgpasswd.8.xml: Document how the
|
||||
|
@ -184,9 +184,10 @@ int main (int argc, char **argv)
|
||||
Prog, "-s", "-c");
|
||||
usage ();
|
||||
}
|
||||
if (md5flg && cflg) {
|
||||
if ((eflg && (md5flg || cflg)) ||
|
||||
md5flg && cflg) {
|
||||
fprintf (stderr,
|
||||
_("%s: the -m and -c flags are exclusive\n"),
|
||||
_("%s: the -c, -e, and -m flags are exclusive\n"),
|
||||
Prog);
|
||||
usage ();
|
||||
}
|
||||
|
@ -178,9 +178,10 @@ int main (int argc, char **argv)
|
||||
Prog, "-s", "-c");
|
||||
usage ();
|
||||
}
|
||||
if (md5flg && cflg) {
|
||||
if ((eflg && (md5flg || cflg)) ||
|
||||
md5flg && cflg) {
|
||||
fprintf (stderr,
|
||||
_("%s: the -m and -c flags are exclusive\n"),
|
||||
_("%s: the -c, -e, and -m flags are exclusive\n"),
|
||||
Prog);
|
||||
usage ();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user