From: Todd C. Miller Date: Sat, 17 Sep 2011 14:22:32 +0000 (-0400) Subject: Apply MODE_MASK to sudo_mode in the switch statement that handles X-Git-Tag: SUDO_1_7_8~10 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b47c0368e83c7e477b168769a9c9168a2ab8063a;p=sudo Apply MODE_MASK to sudo_mode in the switch statement that handles modes other than MODE_RUN. --HG-- branch : 1.7 --- diff --git a/NEWS b/NEWS index 1a297a589..b63fbeb3f 100644 --- 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 c52163412..aa5ae74c6 100644 --- 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;