mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-31 22:35:10 +00:00
audit_failure() now calls gettext itself using the sudoers locale.
This commit is contained in:
@@ -65,12 +65,16 @@ void
|
||||
audit_failure(char *exec_args[], char const *const fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
int oldlocale;
|
||||
debug_decl(audit_success, SUDO_DEBUG_AUDIT)
|
||||
|
||||
/* Audit error messages should be in the sudoers locale. */
|
||||
sudoers_setlocale(SUDOERS_LOCALE_SUDOERS, &oldlocale);
|
||||
|
||||
if (exec_args != NULL) {
|
||||
va_start(ap, fmt);
|
||||
#ifdef HAVE_BSM_AUDIT
|
||||
bsm_audit_failure(exec_args, fmt, ap);
|
||||
bsm_audit_failure(exec_args, _(fmt), ap);
|
||||
#endif
|
||||
#ifdef HAVE_LINUX_AUDIT
|
||||
linux_audit_command(exec_args, 0);
|
||||
@@ -78,5 +82,7 @@ audit_failure(char *exec_args[], char const *const fmt, ...)
|
||||
va_end(ap);
|
||||
}
|
||||
|
||||
sudoers_setlocale(oldlocale, NULL);
|
||||
|
||||
debug_return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user