2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-28 12:57:50 +00:00

In cb_sudoers_locale() actually set the locale in addition to storing

its name.  Otherwise, it won't take effect until sudoers lookup time.
This commit is contained in:
Todd C. Miller 2016-07-20 13:36:45 -06:00
parent 684161618d
commit 30f7ecca10

View File

@ -1194,7 +1194,11 @@ cb_sudoers_locale(const union sudo_defs_val *sd_un)
{
debug_decl(cb_sudoers_locale, SUDOERS_DEBUG_PLUGIN)
debug_return_bool(sudoers_initlocale(NULL, sd_un->str));
if (sudoers_initlocale(NULL, sd_un->str)) {
if (setlocale(LC_ALL, sd_un->str) != NULL)
debug_return_bool(true);
}
debug_return_bool(false);
}
/*