mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-31 14:25:15 +00:00
Fix printing of warning when a Defaults setting is missing a value.
This is a bug in parse_default_entry() introduced in sudo 1.8.19 when support for using the default syslog facility was added at the wrong place in a switch().
This commit is contained in:
@@ -233,18 +233,18 @@ parse_default_entry(const struct sudoers_context *ctx,
|
||||
*/
|
||||
if (val == NULL) {
|
||||
switch (def->type & T_MASK) {
|
||||
case T_FLAG:
|
||||
break;
|
||||
case T_TUPLE:
|
||||
if (ISSET(def->type, T_BOOL))
|
||||
break;
|
||||
FALLTHROUGH;
|
||||
case T_LOGFAC:
|
||||
if (op == true) {
|
||||
/* Use default syslog facility if none specified. */
|
||||
val = LOGFAC;
|
||||
}
|
||||
break;
|
||||
case T_FLAG:
|
||||
break;
|
||||
case T_TUPLE:
|
||||
if (ISSET(def->type, T_BOOL))
|
||||
break;
|
||||
FALLTHROUGH;
|
||||
default:
|
||||
if (!ISSET(def->type, T_BOOL) || op != false) {
|
||||
defaults_warnx(ctx, file, line, column, quiet,
|
||||
|
Reference in New Issue
Block a user