From: Todd C. Miller Date: Wed, 3 May 2017 15:53:03 +0000 (-0600) Subject: Allow the syslog Defaults option to be used in a "true" boolean X-Git-Tag: SUDO_1_8_20^2~21 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2d8717bdd2bd237a98b28f20a5af369709f89717;p=sudo Allow the syslog Defaults option to be used in a "true" boolean context and use the compiled in default log facility in this case. --- diff --git a/plugins/sudoers/defaults.c b/plugins/sudoers/defaults.c index 91b47eebe..0675d9acb 100644 --- a/plugins/sudoers/defaults.c +++ b/plugins/sudoers/defaults.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999-2005, 2007-2016 + * Copyright (c) 1999-2005, 2007-2017 * Todd C. Miller * * 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) {