Expand def_mailsub in the sudoers locale, not the user's.
This commit is contained in:
@@ -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));
|
||||
|
@@ -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)) {
|
||||
|
Reference in New Issue
Block a user