From: Todd C. Miller Date: Thu, 3 Jun 2010 13:48:39 +0000 (-0400) Subject: Always use a printf format string for send_mail() X-Git-Tag: SUDO_1_8_0~538 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8ebd909982ca361d5e563ede5f399f1dfda810ec;p=sudo Always use a printf format string for send_mail() --- diff --git a/plugins/sudoers/logging.c b/plugins/sudoers/logging.c index 8a79f6063..98756e00f 100644 --- a/plugins/sudoers/logging.c +++ b/plugins/sudoers/logging.c @@ -271,7 +271,7 @@ log_denial(int status, int inform_user) logline = new_logline(message, 0); if (should_mail(status)) - send_mail(logline); /* send mail based on status */ + send_mail("%s", logline); /* send mail based on status */ /* Inform the user if they failed to authenticate. */ if (inform_user) { @@ -318,7 +318,7 @@ log_allowed(int status) logline = new_logline(NULL, 0); if (should_mail(status)) - send_mail(logline); /* send mail based on status */ + send_mail("%s", logline); /* send mail based on status */ /* * Log via syslog and/or a file. @@ -368,7 +368,7 @@ log_error(int flags, const char *fmt, ...) * Send a copy of the error via mail. */ if (!ISSET(flags, NO_MAIL)) - send_mail(logline); + send_mail("%s", logline); /* * Log to syslog and/or a file.