]> granicus.if.org Git - sudo/commitdiff
Apply MODE_MASK to sudo_mode in the switch statement that handles
authorTodd C. Miller <Todd.Miller@courtesan.com>
Sat, 17 Sep 2011 14:22:32 +0000 (10:22 -0400)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Sat, 17 Sep 2011 14:22:32 +0000 (10:22 -0400)
modes other than MODE_RUN.

--HG--
branch : 1.7

NEWS
sudo.c

diff --git a/NEWS b/NEWS
index 1a297a58930a978c53c133e9b9637d397244aa19..b63fbeb3f9a43fcc15408e7c3b07b269d6e7f549 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -21,6 +21,9 @@ What's new in Sudo 1.7.8?
  * Sudo now honors the "DEREF" setting in ldap.conf which controls
    how alias dereferencing is done during an LDAP search.
 
+ * Using the -n option may in conjunction with the -v or -l option
+   no longer results in a usage error.
+
 What's new in Sudo 1.7.7
 
  * I/O logging is now supported for commands run in background mode
diff --git a/sudo.c b/sudo.c
index c52163412693200dc16a2d26aab215771e27a32b..aa5ae74c65ce448e94b9762925d665b0415a03bd 100644 (file)
--- a/sudo.c
+++ b/sudo.c
@@ -231,7 +231,7 @@ main(argc, argv, envp)
     else if (ISSET(sudo_mode, MODE_EDIT))
        user_cmnd = "sudoedit";
     else {
-       switch (sudo_mode) {
+       switch (sudo_mode & MODE_MASK) {
            case MODE_VERSION:
                show_version();
                break;