Call gettext inside log_error et al instead of having the caller do it. This way we can display any messages to the user in their own locale but log in the sudoers local.

This commit is contained in:
Todd C. Miller
2012-11-08 15:37:44 -05:00
parent 595d3b2651
commit a0c53bd751
15 changed files with 167 additions and 121 deletions

View File

@@ -118,7 +118,7 @@ sudo_auth_init(struct passwd *pw)
standalone = IS_STANDALONE(&auth_switch[0]);
if (standalone && auth_switch[1].name != NULL) {
audit_failure(NewArgv, N_("invalid authentication methods"));
log_fatal(0, _("Invalid authentication methods compiled into sudo! "
log_fatal(0, N_("Invalid authentication methods compiled into sudo! "
"You may mix standalone and non-standalone authentication."));
debug_return_int(-1);
}
@@ -203,7 +203,7 @@ verify_user(struct passwd *pw, char *prompt, int validated)
if (auth_switch[0].name == NULL) {
audit_failure(NewArgv, N_("no authentication methods"));
log_error(0,
_("There are no authentication methods compiled into sudo! "
N_("There are no authentication methods compiled into sudo! "
"If you want to turn off authentication, use the "
"--disable-authentication configure option."));
debug_return_int(-1);