]> granicus.if.org Git - shadow/commitdiff
The -c, -e, and -m options are exclusives.
authornekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Tue, 20 Nov 2007 13:09:55 +0000 (13:09 +0000)
committernekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Tue, 20 Nov 2007 13:09:55 +0000 (13:09 +0000)
ChangeLog
src/chgpasswd.c
src/chpasswd.c

index 49b432ce19f6fbf0ef52857e6b2f035b2e475ac2..9b9a741c5d386f76a696a6956921b78a627d70af 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
index c6d6fc0371e586d93a2b7114c6b72a66a9fe5506..9a37565c9d7217534b90cb82d43a8285f8e37b3c 100644 (file)
@@ -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 ();
        }
index 653b7227a960507c3205c78538791f8ab7660963..dd8f1a9614fb005580658b4ef956e2a243f6bad9 100644 (file)
@@ -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 ();
        }