From 64c461c0e23d98b957defc7f38fb611470b1fe0a Mon Sep 17 00:00:00 2001 From: Jaroslav Škarvada Date: Mar 23 2017 18:09:43 +0000 Subject: Explicitly enabled sm-client statistics Related: rhbz#890585 Fixed compilation with -Werror=format-security which seems to be the default in f27+ --- diff --git a/sendmail-8.15.2-compile-fix.patch b/sendmail-8.15.2-compile-fix.patch new file mode 100644 index 0000000..dd994bf --- /dev/null +++ b/sendmail-8.15.2-compile-fix.patch @@ -0,0 +1,100 @@ +diff --git a/sendmail/envelope.c b/sendmail/envelope.c +index bae6b00..beb91a1 100644 +--- a/sendmail/envelope.c ++++ b/sendmail/envelope.c +@@ -323,7 +323,7 @@ dropenvelope(e, fulldrop, split) + + /* don't free, allocated from e_rpool */ + e->e_message = sm_rpool_strdup_x(e->e_rpool, buf); +- message(buf); ++ message("%s", buf); + e->e_flags |= EF_CLRQUEUE; + } + if (msg_timeout == MSG_NOT_BY) +@@ -420,7 +420,7 @@ dropenvelope(e, fulldrop, split) + /* don't free, allocated from e_rpool */ + e->e_message = sm_rpool_strdup_x(e->e_rpool, + buf); +- message(buf); ++ message("%s", buf); + e->e_flags |= EF_WARNING; + } + if (msg_timeout == MSG_WARN_BY) +diff --git a/sendmail/parseaddr.c b/sendmail/parseaddr.c +index 2adb39c..ba99414 100644 +--- a/sendmail/parseaddr.c ++++ b/sendmail/parseaddr.c +@@ -218,7 +218,7 @@ parseaddr(addr, a, flags, delim, delimptr, e, isrcpt) + msg = "Deferring message until queue run"; + if (tTd(20, 1)) + sm_dprintf("parseaddr: queueing message\n"); +- message(msg); ++ message("%s", msg); + if (e->e_message == NULL && e->e_sendmode != SM_DEFER) + e->e_message = sm_rpool_strdup_x(e->e_rpool, msg); + a->q_state = QS_QUEUEUP; +diff --git a/sendmail/srvrsmtp.c b/sendmail/srvrsmtp.c +index ba636a8..2821532 100644 +--- a/sendmail/srvrsmtp.c ++++ b/sendmail/srvrsmtp.c +@@ -578,13 +578,13 @@ static bool smtp_data __P((SMTP_T *, ENVELOPE *)); + bool tsave = QuickAbort; \ + \ + QuickAbort = false; \ +- usrerr(response); \ ++ usrerr("%s", response); \ + QuickAbort = tsave; \ + e->e_sendqueue = NULL; \ + goto doquit; \ + } \ + else \ +- usrerr(response); \ ++ usrerr("%s", response); \ + break; \ + \ + case SMFIR_REJECT: \ +@@ -931,7 +931,7 @@ smtp(nullserver, d_flags, e) + } + else if (strncmp(nullserver, "421 ", 4) == 0) + { +- message(nullserver); ++ message("%s", nullserver); + goto doquit; + } + +@@ -1849,7 +1849,7 @@ smtp(nullserver, d_flags, e) + if (nullserver != NULL) + { + if (ISSMTPREPLY(nullserver)) +- usrerr(nullserver); ++ usrerr("%s", nullserver); + else + usrerr("550 5.0.0 %s", + nullserver); +@@ -2449,7 +2449,7 @@ smtp(nullserver, d_flags, e) + tempfail = true; + smtp.sm_milterize = false; + if (response != NULL) +- usrerr(response); ++ usrerr("%s", response); + else + message("421 4.7.0 %s closing connection", + MyHostName); +@@ -3656,7 +3656,7 @@ smtp_data(smtp, e) + (void) extenhsc(response + 4, ' ', e->e_enhsc); + #endif /* _FFR_MILTER_ENHSC */ + +- usrerr(response); ++ usrerr("%s", response); + if (strncmp(response, "421 ", 4) == 0 + || strncmp(response, "421-", 4) == 0) + { +@@ -3776,7 +3776,7 @@ smtp_data(smtp, e) + if (ISSMTPCODE(response)) + (void) extenhsc(response + 4, ' ', e->e_enhsc); + #endif /* _FFR_MILTER_ENHSC */ +- usrerr(response); ++ usrerr("%s", response); + if (strncmp(response, "421 ", 4) == 0 + || strncmp(response, "421-", 4) == 0) + rv = false; diff --git a/sendmail.spec b/sendmail.spec index d9d1f4e..b5c36a3 100644 --- a/sendmail.spec +++ b/sendmail.spec @@ -87,6 +87,7 @@ Patch26: sendmail-8.15.2-libmilter-socket-activation.patch # patch provided by upstream Patch27: sendmail-8.15.2-smtp-session-reuse-fix.patch Patch28: sendmail-8.15.2-openssl-1.1.0-fix.patch +Patch29: sendmail-8.15.2-compile-fix.patch Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: tcp_wrappers-devel BuildRequires: libdb-devel @@ -213,6 +214,7 @@ cp devtools/M4/UNIX/{,shared}library.m4 %patch26 -p1 -b .libmilter-socket-activation %patch27 -p1 -b .smtp-session-reuse-fix %patch28 -p1 -b .openssl-1.1.0-fix +%patch29 -p1 -b .compile-fix for f in RELEASE_NOTES contrib/etrn.0; do iconv -f iso8859-1 -t utf8 -o ${f}{_,} && @@ -734,6 +736,8 @@ fi * Thu Mar 23 2017 Jaroslav Škarvada - 8.15.2-15 - Explicitly enabled sm-client statistics Related: rhbz#890585 +- Fixed compilation with -Werror=format-security which seems to be the + default in f27+ * Thu Feb 23 2017 Jaroslav Škarvada - 8.15.2-14 - Also removed the systemd restart limit from the sm-client service