Allow syslog priority to be negated or set to "none" to disable

logging successes or failures.
This commit is contained in:
Todd C. Miller
2016-11-30 16:26:10 -07:00
parent cb1f044017
commit 00b6be9dfa
7 changed files with 62 additions and 25 deletions

View File

@@ -94,6 +94,10 @@ do_syslog(int pri, char *msg)
int oldlocale;
debug_decl(do_syslog, SUDOERS_DEBUG_LOGGING)
/* A priority of -1 corresponds to "none". */
if (pri == -1)
debug_return;
sudoers_setlocale(SUDOERS_LOCALE_SUDOERS, &oldlocale);
/*