2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-31 06:15:37 +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().

--HG--
branch : 1.9
This commit is contained in:
Todd C. Miller
2023-12-16 08:08:44 -07:00
parent ae7dc397b4
commit 318e0eff35

View File

@@ -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,