mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-31 14:25:15 +00:00
Add SLOG_AUDIT flag for log_warningx() to also audit the message.
This lets us combine audit_failure() and log_warningx() calls with the same message.
This commit is contained in:
@@ -502,6 +502,13 @@ vlog_warning(int flags, int errnum, const char *fmt, va_list ap)
|
||||
int len;
|
||||
debug_decl(vlog_warning, SUDOERS_DEBUG_LOGGING);
|
||||
|
||||
/* Do auditing first (audit_failure() handles the locale itself). */
|
||||
if (ISSET(flags, SLOG_AUDIT)) {
|
||||
va_copy(ap2, ap);
|
||||
vaudit_failure(NewArgv, fmt, ap2);
|
||||
va_end(ap2);
|
||||
}
|
||||
|
||||
/* Need extra copy of ap for sudo_vwarn()/sudo_vwarnx() below. */
|
||||
va_copy(ap2, ap);
|
||||
|
||||
|
Reference in New Issue
Block a user