From cac7ca6a6997322569f476da5129e1e2989aafc3 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Thu, 8 Nov 2012 16:39:44 -0500 Subject: [PATCH] Expand def_mailsub in the sudoers locale, not the user's. --- plugins/sudoers/defaults.c | 2 +- plugins/sudoers/logging.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/sudoers/defaults.c b/plugins/sudoers/defaults.c index 81bedb5cf..bcbcefaea 100644 --- a/plugins/sudoers/defaults.c +++ b/plugins/sudoers/defaults.c @@ -452,7 +452,7 @@ init_defaults(void) /* Now do the strings */ def_mailto = estrdup(MAILTO); - def_mailsub = estrdup(_(MAILSUBJECT)); + def_mailsub = estrdup(N_(MAILSUBJECT)); def_badpass_message = estrdup(_(INCORRECT_PASSWORD)); def_timestampdir = estrdup(_PATH_SUDO_TIMEDIR); def_passprompt = estrdup(_(PASSPROMPT)); diff --git a/plugins/sudoers/logging.c b/plugins/sudoers/logging.c index 7e5288323..2dbd0f7be 100644 --- a/plugins/sudoers/logging.c +++ b/plugins/sudoers/logging.c @@ -681,7 +681,7 @@ send_mail(const char *fmt, ...) /* Pipes are all setup, send message. */ (void) fprintf(mail, "To: %s\nFrom: %s\nAuto-Submitted: %s\nSubject: ", def_mailto, def_mailfrom ? def_mailfrom : user_name, "auto-generated"); - for (p = def_mailsub; *p; p++) { + for (p = _(def_mailsub); *p; p++) { /* Expand escapes in the subject */ if (*p == '%' && *(p+1) != '%') { switch (*(++p)) { -- 2.40.0