From: Todd C. Miller Date: Wed, 20 Jul 2016 19:36:45 +0000 (-0600) Subject: In cb_sudoers_locale() actually set the locale in addition to storing X-Git-Tag: SUDO_1_8_18^2~111 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=30f7ecca10c0f36cea91c58f30d4db2f22a754d9;p=sudo In cb_sudoers_locale() actually set the locale in addition to storing its name. Otherwise, it won't take effect until sudoers lookup time. --- diff --git a/plugins/sudoers/sudoers.c b/plugins/sudoers/sudoers.c index d71401b0c..58b7985c7 100644 --- a/plugins/sudoers/sudoers.c +++ b/plugins/sudoers/sudoers.c @@ -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); } /*