The -c, -e, and -m options are exclusives.

This commit is contained in:
nekral-guest 2007-11-20 13:09:55 +00:00
parent 6e3ad7a275
commit a30c0a8192
3 changed files with 11 additions and 4 deletions

View File

@ -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> 2007-11-20 Nicolas François <nicolas.francois@centraliens.net>
* man/chpasswd.8.xml, man/chgpasswd.8.xml: Document how the * man/chpasswd.8.xml, man/chgpasswd.8.xml: Document how the

View File

@ -184,9 +184,10 @@ int main (int argc, char **argv)
Prog, "-s", "-c"); Prog, "-s", "-c");
usage (); usage ();
} }
if (md5flg && cflg) { if ((eflg && (md5flg || cflg)) ||
md5flg && cflg) {
fprintf (stderr, fprintf (stderr,
_("%s: the -m and -c flags are exclusive\n"), _("%s: the -c, -e, and -m flags are exclusive\n"),
Prog); Prog);
usage (); usage ();
} }

View File

@ -178,9 +178,10 @@ int main (int argc, char **argv)
Prog, "-s", "-c"); Prog, "-s", "-c");
usage (); usage ();
} }
if (md5flg && cflg) { if ((eflg && (md5flg || cflg)) ||
md5flg && cflg) {
fprintf (stderr, fprintf (stderr,
_("%s: the -m and -c flags are exclusive\n"), _("%s: the -c, -e, and -m flags are exclusive\n"),
Prog); Prog);
usage (); usage ();
} }