mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-31 06:15:37 +00:00
Set sudoers locale in log_allowed()
This commit is contained in:
@@ -387,8 +387,12 @@ void
|
||||
log_allowed(int status)
|
||||
{
|
||||
char *logline;
|
||||
int oldlocale;
|
||||
debug_decl(log_allowed, SUDO_DEBUG_LOGGING)
|
||||
|
||||
/* Log and mail messages should be in the sudoers locale. */
|
||||
sudoers_setlocale(SUDOERS_LOCALE_SUDOERS, &oldlocale);
|
||||
|
||||
logline = new_logline(NULL, 0);
|
||||
|
||||
if (should_mail(status))
|
||||
@@ -403,6 +407,9 @@ log_allowed(int status)
|
||||
do_logfile(logline);
|
||||
|
||||
efree(logline);
|
||||
|
||||
sudoers_setlocale(oldlocale, NULL);
|
||||
|
||||
debug_return;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user