Allow the syslog Defaults option to be used in a "true" boolean

context and use the compiled in default log facility in this case.
This commit is contained in:
Todd C. Miller
2017-05-03 09:53:03 -06:00
parent 631d458b6f
commit 2d8717bdd2

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 1999-2005, 2007-2016
* Copyright (c) 1999-2005, 2007-2017
* Todd C. Miller <Todd.Miller@courtesan.com>
*
* Permission to use, copy, modify, and distribute this software for any
@@ -250,6 +250,12 @@ parse_default_entry(struct sudo_defs_types *def, const char *val, int op,
if (ISSET(def->type, T_BOOL))
break;
/* FALLTHROUGH */
case T_LOGFAC:
if (op == true) {
/* Use default syslog facility if none specified. */
val = LOGFAC;
}
break;
default:
if (!ISSET(def->type, T_BOOL) || op != false) {
if (!quiet) {