]> granicus.if.org Git - sudo/commitdiff
Make the -s flag be exclusive too. Also reorder the flags in
authorTodd C. Miller <Todd.Miller@courtesan.com>
Wed, 24 Nov 1999 03:52:34 +0000 (03:52 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Wed, 24 Nov 1999 03:52:34 +0000 (03:52 +0000)
the exclusive usage message so they are alphabetical.

sudo.c

diff --git a/sudo.c b/sudo.c
index f332715ef729b9a71e4d267cd6a2edadebea0a19..7ef1c3d88006eb379676d5a0c3b5468c9be3c9fc 100644 (file)
--- a/sudo.c
+++ b/sudo.c
@@ -633,6 +633,9 @@ parse_args()
                break;
            case 's':
                rval |= MODE_SHELL;
+               if (excl && excl != 's')
+                   usage_excl(1);
+               excl = 's';
                if (def_flag(I_SET_HOME))
                    rval |= MODE_RESET_HOME;
                break;
@@ -1043,7 +1046,7 @@ usage_excl(exit_val)
     int exit_val;
 {
     (void) fprintf(stderr,
-       "Only one of the -v, -k, -K, -l, -V and -h options may be used\n");
+       "Only one of the -h, -k, -K, -l, -s, -v or -V options may be used\n");
     usage(exit_val);
 }