Skip to content

Commit 318e0ef

Browse files
committed
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
1 parent ae7dc39 commit 318e0ef

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

plugins/sudoers/defaults.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -233,18 +233,18 @@ parse_default_entry(const struct sudoers_context *ctx,
233233
*/
234234
if (val == NULL) {
235235
switch (def->type & T_MASK) {
236-
case T_FLAG:
237-
break;
238-
case T_TUPLE:
239-
if (ISSET(def->type, T_BOOL))
240-
break;
241-
FALLTHROUGH;
242236
case T_LOGFAC:
243237
if (op == true) {
244238
/* Use default syslog facility if none specified. */
245239
val = LOGFAC;
246240
}
247241
break;
242+
case T_FLAG:
243+
break;
244+
case T_TUPLE:
245+
if (ISSET(def->type, T_BOOL))
246+
break;
247+
FALLTHROUGH;
248248
default:
249249
if (!ISSET(def->type, T_BOOL) || op != false) {
250250
defaults_warnx(ctx, file, line, column, quiet,

0 commit comments

Comments
 (0)