so warning messages during sudoers loading are displayed in the
user's own locale.
* Uses the C locale unless another is specified in sudoers.
*/
sudoers_setlocale(SUDOERS_LOCALE_SUDOERS, &oldlocale);
+ sudo_warn_set_locale_func(sudoers_warn_setlocale);
TAILQ_FOREACH_SAFE(nss, snl, entries, nss_next) {
if (nss->open(nss) == 0 && nss->parse(nss) == 0) {
sources++;
rval = -1;
/* Restore user's locale. */
+ sudo_warn_set_locale_func(NULL);
sudoers_setlocale(oldlocale, NULL);
debug_return_int(rval);