From 986d39007dc48d1663f44236fabed98faf79f5fb Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Fri, 5 Jan 2024 22:07:48 +0100 Subject: [PATCH] rebuilt with libesmtp 1.1.0 [release 1.2-2mamba;Sat Nov 27 2021] --- ...-fix-segfault-on-empty-to-in-headers.patch | 24 ++++++++++++++ esmtp-1.2-libesmtp-1.1.0.patch | 31 +++++++++++++++++++ esmtp.spec | 22 ++++++++----- 3 files changed, 70 insertions(+), 7 deletions(-) create mode 100644 esmtp-1.2-fix-segfault-on-empty-to-in-headers.patch create mode 100644 esmtp-1.2-libesmtp-1.1.0.patch diff --git a/esmtp-1.2-fix-segfault-on-empty-to-in-headers.patch b/esmtp-1.2-fix-segfault-on-empty-to-in-headers.patch new file mode 100644 index 0000000..99a9b1b --- /dev/null +++ b/esmtp-1.2-fix-segfault-on-empty-to-in-headers.patch @@ -0,0 +1,24 @@ +Description: Don't segfault if recipient header is empty +Origin: vendor +Bug-Debian: https://bugs.debian.org/636346 +Forwarded: no +Author: Salvatore Bonaccorso +Last-Update: 2011-08-02 + +--- a/local.c ++++ b/local.c +@@ -106,7 +106,13 @@ + } + p += written; + } +- names[--nameslen] = '\0'; /* chop trailing space */ ++ if(nameslen > 0) ++ { ++ names[--nameslen] = '\0'; /* chop trailing space */ ++ } else { ++ fprintf(stderr, "Failed to parse recipient header\n"); ++ exit(EX_DATAERR); ++ } + } else { + nameslen = (strlen(force_mda) + 3); // 'force_mda' + names = (char *)xmalloc(nameslen + 1); // 'force_mda'\0 diff --git a/esmtp-1.2-libesmtp-1.1.0.patch b/esmtp-1.2-libesmtp-1.1.0.patch new file mode 100644 index 0000000..48551e6 --- /dev/null +++ b/esmtp-1.2-libesmtp-1.1.0.patch @@ -0,0 +1,31 @@ +From 32bf86868c32ddbb94d3c337005d3ac7fb41ecdf Mon Sep 17 00:00:00 2001 +From: a821 +Date: Mon, 16 Aug 2021 12:02:14 +0200 +Subject: [PATCH] Fix configure.ac since libesmtp-config was removed + +--- + configure.ac | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 64b19b4..696d861 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -30,11 +30,11 @@ then + AC_CHECK_HEADER(libesmtp.h, ,[AC_MSG_ERROR([libesmtp.h not found in $with_libesmtp])]) + fi + AC_MSG_CHECKING(for libESMTP) +-if libesmtp-config --version > /dev/null 2>&1 ++if pkg-config libesmtp-1.0 > /dev/null 2>&1 + then + AC_MSG_RESULT(yes) +- CFLAGS="$CFLAGS `libesmtp-config --cflags`" +- LIBS="$LIBS `libesmtp-config --libs`" ++ CFLAGS="$CFLAGS `pkg-config libesmtp-1.0 --cflags`" ++ LIBS="$LIBS `pkg-config libesmtp-1.0 --libs`" + else + AC_MSG_RESULT(no) + AC_MSG_ERROR(libESMTP library not found) +-- +2.32.0 + diff --git a/esmtp.spec b/esmtp.spec index e80508f..a22f5f4 100644 --- a/esmtp.spec +++ b/esmtp.spec @@ -1,6 +1,6 @@ Name: esmtp Version: 1.2 -Release: 1mamba +Release: 2mamba Summary: A user configurable relay-only MTA with a sendmail-compatible syntax Group: System/Servers Vendor: openmamba @@ -8,12 +8,14 @@ Distribution: openmamba Packager: Silvan Calarco URL: http://esmtp.sourceforge.net/ Source: http://downloads.sourceforge.net/project/esmtp/esmtp/%{version}/esmtp-%{version}.tar.bz2 +Patch0: esmtp-1.2-libesmtp-1.1.0.patch +Patch1: esmtp-1.2-fix-segfault-on-empty-to-in-headers.patch License: GPL ## AUTOBUILDREQ-BEGIN BuildRequires: glibc-devel BuildRequires: libesmtp-devel ## AUTOBUILDREQ-END -BuildRoot: %{_tmppath}/%{name}-%{version}-root +BuildRequires: libesmtp-devel >= 1.1.0 %description ESMTP MTA is a user configurable relay-only MTA with a sendmail-compatible syntax, based on libESMTP and supporting the AUTH (including the CRAM-MD5 and NTLM SASL mechanisms) and the StartTLS SMTP extensions. @@ -22,6 +24,9 @@ ESMTP MTA is a user configurable relay-only MTA with a sendmail-compatible synta %prep %setup -q +%patch0 -p1 +%patch1 -p1 -b .fix-segfault-on-empty-to-in-headers +autoconf %build %configure @@ -41,13 +46,16 @@ ESMTP MTA is a user configurable relay-only MTA with a sendmail-compatible synta %{_bindir}/newaliases %{_libdir}/sendmail %{_sbindir}/sendmail -%{_mandir}/man1/esmtp.1.gz -%{_mandir}/man1/mailq.1.gz -%{_mandir}/man1/newaliases.1.gz -%{_mandir}/man1/sendmail.1.gz -%{_mandir}/man5/esmtprc.5.gz +%{_mandir}/man1/esmtp.1* +%{_mandir}/man1/mailq.1* +%{_mandir}/man1/newaliases.1* +%{_mandir}/man1/sendmail.1* +%{_mandir}/man5/esmtprc.5* %doc AUTHORS COPYING %changelog +* Sat Nov 27 2021 Silvan Calarco 1.2-2mamba +- rebuilt with libesmtp 1.1.0 + * Sat Jan 26 2013 Silvan Calarco 1.2-1mamba - package created by silvan using the webbuild interface