Instead of trying to make weak functions work on all platforms,
just use a registration function for a plugin-specific setlocale function. The sudoers version just wraps sudoers_setlocale().
This commit is contained in:
@@ -228,6 +228,8 @@ sudoers_policy_main(int argc, char * const argv[], int pwflag, char *env_add[],
|
||||
volatile int rval = true;
|
||||
debug_decl(sudoers_policy_main, SUDOERS_DEBUG_PLUGIN)
|
||||
|
||||
sudo_warn_set_locale_func(sudoers_warn_setlocale);
|
||||
|
||||
/* Is root even allowed to run sudo? */
|
||||
if (user_uid == 0 && !def_root_sudo) {
|
||||
/* Not an audit event. */
|
||||
@@ -553,6 +555,8 @@ done:
|
||||
sudo_endpwent();
|
||||
sudo_endgrent();
|
||||
|
||||
sudo_warn_set_locale_func(NULL);
|
||||
|
||||
debug_return_int(rval);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user