mirror of
https://github.com/sudo-project/sudo.git
synced 2025-09-03 07:45:47 +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:
@@ -233,18 +233,18 @@ parse_default_entry(const struct sudoers_context *ctx,
|
|||||||
*/
|
*/
|
||||||
if (val == NULL) {
|
if (val == NULL) {
|
||||||
switch (def->type & T_MASK) {
|
switch (def->type & T_MASK) {
|
||||||
case T_FLAG:
|
|
||||||
break;
|
|
||||||
case T_TUPLE:
|
|
||||||
if (ISSET(def->type, T_BOOL))
|
|
||||||
break;
|
|
||||||
FALLTHROUGH;
|
|
||||||
case T_LOGFAC:
|
case T_LOGFAC:
|
||||||
if (op == true) {
|
if (op == true) {
|
||||||
/* Use default syslog facility if none specified. */
|
/* Use default syslog facility if none specified. */
|
||||||
val = LOGFAC;
|
val = LOGFAC;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case T_FLAG:
|
||||||
|
break;
|
||||||
|
case T_TUPLE:
|
||||||
|
if (ISSET(def->type, T_BOOL))
|
||||||
|
break;
|
||||||
|
FALLTHROUGH;
|
||||||
default:
|
default:
|
||||||
if (!ISSET(def->type, T_BOOL) || op != false) {
|
if (!ISSET(def->type, T_BOOL) || op != false) {
|
||||||
defaults_warnx(ctx, file, line, column, quiet,
|
defaults_warnx(ctx, file, line, column, quiet,
|
||||||
|
Reference in New Issue
Block a user