From 2d8717bdd2bd237a98b28f20a5af369709f89717 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Wed, 3 May 2017 09:53:03 -0600 Subject: [PATCH] Allow the syslog Defaults option to be used in a "true" boolean context and use the compiled in default log facility in this case. --- plugins/sudoers/defaults.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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) { -- 2.40.0