]> granicus.if.org Git - sudo/commitdiff
Allow the syslog Defaults option to be used in a "true" boolean
authorTodd C. Miller <Todd.Miller@courtesan.com>
Wed, 3 May 2017 15:53:03 +0000 (09:53 -0600)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Wed, 3 May 2017 15:53:03 +0000 (09:53 -0600)
context and use the compiled in default log facility in this case.

plugins/sudoers/defaults.c

index 91b47eebe711f44cd1d11aaaeb0f7dfa92e714eb..0675d9acb6b1956c80787ac9f2b7ab999d60316b 100644 (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) {