summaryrefslogtreecommitdiff
path: root/mail-filter/procmail
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2019-04-05 21:17:31 +0100
committerV3n3RiX <venerix@redcorelinux.org>2019-04-05 21:17:31 +0100
commitdc7cbdfa65fd814b3b9aa3c56257da201109e807 (patch)
treec85d72f6f31f21f178069c9d41d41a7c1ff4b362 /mail-filter/procmail
parent0706fc6986773f4e4d391deff4ad5143c464ea4e (diff)
gentoo resync : 05.04.2019
Diffstat (limited to 'mail-filter/procmail')
-rw-r--r--mail-filter/procmail/Manifest6
-rw-r--r--mail-filter/procmail/files/procmail-3.22-CVE-2014-3618.patch18
-rw-r--r--mail-filter/procmail/files/procmail-3.22-CVE-2017-16844.patch13
-rw-r--r--mail-filter/procmail/files/procmail-3.22-crash-fix.patch58
-rw-r--r--mail-filter/procmail/metadata.xml5
-rw-r--r--mail-filter/procmail/procmail-3.22-r14.ebuild126
6 files changed, 221 insertions, 5 deletions
diff --git a/mail-filter/procmail/Manifest b/mail-filter/procmail/Manifest
index 969195edc9d3..ca77b2593085 100644
--- a/mail-filter/procmail/Manifest
+++ b/mail-filter/procmail/Manifest
@@ -1,4 +1,7 @@
AUX gentoo-maildir3.diff 461 BLAKE2B fe88378c71c00191a2eda8b21b32e554f5c1175ff7acbc628a099f77a79d67ab0aa1a054950133f4b7c342e78ec7a12ccb07f6f944df907087f9109173fbb3be SHA512 3736e55e95cab67be23281b343456aa9d9624d14e23b1f293014abc5e711c715f362e5a8464a8779dc01f1e6fb5560a346d265b334ee87f65bd0664f87bc09be
+AUX procmail-3.22-CVE-2014-3618.patch 521 BLAKE2B 9d20eed1e2cc19c963ceac83a8ecb79dd09a494d7665613d00cb998264ff317b3ce014ff06ac61649d462ca0efffd6dde55795ad3d0886704a88e8b7be9102e7 SHA512 b8937c393cf7b1c285bc0ffe09dd2dd7521d29e690343594684841374493e8bf51487f17bddf7e71bfd2b067c18c81523ef87398f5316ac321cca05dba594f7c
+AUX procmail-3.22-CVE-2017-16844.patch 530 BLAKE2B bd671bc54740441d083be01dda8bec2c1844cb81ba807fc230cc4e56993f6f0b515b820ae1d7ad93644dc2e9b4481b287a83114f5ca6d1a11b8ead0b18b80ec4 SHA512 fe463bb0e3482f9d86d7336494ccaf5ef5c9a30fb8ad4f3c427ed4274bd2684ae0d77fd91fbd12924c9f183a3497c45cd350ec5d940cd220eadf59058ef643b4
+AUX procmail-3.22-crash-fix.patch 2452 BLAKE2B c2e74c75cea37c37f69600435b7eadaa22208c496c92f7cd7422a356ccf72c69bc526bf1e72572fe0d5b893b2caa660e98cd87a40b3d648ed6801ada1a83f52b SHA512 a9b64cedad4a3c5d96d36761bdde971b4d5aad867ee8040d7ad008b3dcbaf46a969cf42d78c5c68a1de6d471813abf3836473e80cb8b9d1646f22809926dd36a
AUX procmail-3.22-glibc-2.10.patch 2840 BLAKE2B d2bbe3a987e07a47bdf8feda7639cb9b1607be870418474d46dfb4add70fbce528429f64ea32b925d42f7674300769f9bc7fac11747ffecc2d20ceefe97a92b3 SHA512 44a5f7c3c6cf1b2f9241eb45e64322abd7b685ecd4909f0b126ababe9f14c9c0e7978daa9f5218d3255359d46760c628085a77ee7e3c61a272830477d21adeb9
AUX procmail-comsat-segfault.diff 822 BLAKE2B 307b0bdf7ae224f99d289ee6e343f40a3d997ed412b9a1b682f62c01561866de2610d2347584e6f4999f9696bde44dc6448d69518f70b05338f5f6ba69b353ae SHA512 2a306dbce15cf7fe71e3f20a4707a9b326431da20638b29365090ae4a6c444483046d2f8940f5a8db7120708414c3386bea3254aea6b397633f04b6babc6d581
AUX procmail-lazy-bindings.diff 622 BLAKE2B 97ef84c92640506f6b6b004b610e98305782c02e256eccb3979f72b60ecb603e3b4cccd73a8ba44278e3578ead7a023a4c8396361b6b53bd2984d3c7028fc76d SHA512 aea07c42ec87b7b8d04a5f0f514d4d14aedf8e60f116c4106d29c36de7858cb345930778b38385cf03e5b5a4af230947798625ebec54759f506b4b7b9df826f4
@@ -8,4 +11,5 @@ AUX procmail-prefix.patch 5748 BLAKE2B c25d1de87d59771f959940d59195096711e70cc2a
DIST procmail-3.22.tar.gz 226817 BLAKE2B 4fd4641abcd3a897ea19bd8f76446f88806d22649d5221f8cef6f9efc29f7fcc02c9707cbf00c32fe247f16579d28fd887d3c18c4d3a2f8877c351bf92e85866 SHA512 3d0658329a55957a8d5741e03b0853b030c4524acef30641663213aa9eefc8264f8cc2b68a00a89e5f9f0f7c916c41a42e1b6c8df562c545ba97d8ab9049a936
EBUILD procmail-3.22-r10.ebuild 2974 BLAKE2B 3be993b59382cd089b785b048efeb7eeed3f6c165b8abeee189618d5b3b13d307f9a29de1923c44e33b758e71767aa340bdae3483d512db8ff3917ea1b311aa4 SHA512 cce27ee51e5447af58414314ba955d089bbc637fb7cf53392c1f22a70a72686b8aef385b74155f4e14163f88dc469c4e5d9c76c508a7b39a5eb74cfc1c5ee02f
EBUILD procmail-3.22-r11.ebuild 3474 BLAKE2B f2a7a2a648a12e80588f44a321fe084bc2f2decb7034b77a6a2dada6f57e13061d5a942dd00248d74c8c2806250273f7912c7f9040d85554f1903ac9bb67ca16 SHA512 8b664a9979b4180c5b7814b84387f9fb8793ffc71b7b36ab662ec1eacb5d2774a49e80d60a78c782f74ad889736bbbd4fc215cad3aa6e7ab0f10572448873b97
-MISC metadata.xml 240 BLAKE2B eeb6099e7ebc29b81588528b970830d2461fa16783bda673672d405615e46d240dcd806b3d18b6207ef8e5365f8860aa20c304394c3f5b267c5ea4dc739cb94b SHA512 97824dbce22630efb21e647b55212b7a8a19d8e38b5bf05cb0b8078530bbbaaf4dc91284e2a11beab7dfcfb779df82b87b49d11a746c7a4f6dc71f2fda8942db
+EBUILD procmail-3.22-r14.ebuild 3666 BLAKE2B 71535ffe867c6231fd8c2873fb5ec952fe6426d02a1060209dc9ef1cd3a9d4d72b2270d22e6dce206c86025d18103ca8cc34b000a28093aee804f90587f37ab0 SHA512 f11648b6078ebc1d158c566aaac82bd5847765d17708231493a13ba5ecc4665238a334d2bb7906f8010c8f712b4d088ae94b3ff8d64ffe10a0b43c47826cc1ab
+MISC metadata.xml 166 BLAKE2B c254f1fb642881aba57637be14fb0a89b10384f91a128feaec3a8c870d76efc2cbacb92caccc0dee2dd19a5ac5eaf8643080dafa05c4e2ac96a68568927e5afd SHA512 a56648c974a1d14dd4c18237532773c72057a13ab90c58b5da04f185e3c12a8bd8d5c21fb06053507f31766291a82dc7d87b34cd65fd94cfe2af7295c813ef84
diff --git a/mail-filter/procmail/files/procmail-3.22-CVE-2014-3618.patch b/mail-filter/procmail/files/procmail-3.22-CVE-2014-3618.patch
new file mode 100644
index 000000000000..124d1f996852
--- /dev/null
+++ b/mail-filter/procmail/files/procmail-3.22-CVE-2014-3618.patch
@@ -0,0 +1,18 @@
+diff --git a/src/formisc.c b/src/formisc.c
+index 338733b..c48df52 100644
+--- a/src/formisc.c
++++ b/src/formisc.c
+@@ -84,12 +84,11 @@ normal: *target++= *start++;
+ case '"':*target++=delim='"';start++;
+ }
+ ;{ int i;
+- do
++ while(*start) /* anything? */
+ if((i= *target++= *start++)==delim) /* corresponding delimiter? */
+ break;
+ else if(i=='\\'&&*start) /* skip quoted character */
+ *target++= *start++;
+- while(*start); /* anything? */
+ }
+ hitspc=2;
+ }
diff --git a/mail-filter/procmail/files/procmail-3.22-CVE-2017-16844.patch b/mail-filter/procmail/files/procmail-3.22-CVE-2017-16844.patch
new file mode 100644
index 000000000000..5e610d723da0
--- /dev/null
+++ b/mail-filter/procmail/files/procmail-3.22-CVE-2017-16844.patch
@@ -0,0 +1,13 @@
+diff --git a/src/formisc.c b/src/formisc.c
+index 5c2869d..54fd013 100644
+--- a/src/formisc.c
++++ b/src/formisc.c
+@@ -103,7 +103,7 @@ void loadsaved(sp)const struct saved*const sp; /* load some saved text */
+ }
+ /* append to buf */
+ void loadbuf(text,len)const char*const text;const size_t len;
+-{ if(buffilled+len>buflen) /* buf can't hold the text */
++{ while(buffilled+len>buflen) /* buf can't hold the text */
+ buf=realloc(buf,buflen+=Bsize);
+ tmemmove(buf+buffilled,text,len);buffilled+=len;
+ }
diff --git a/mail-filter/procmail/files/procmail-3.22-crash-fix.patch b/mail-filter/procmail/files/procmail-3.22-crash-fix.patch
new file mode 100644
index 000000000000..8563ea3d1d4c
--- /dev/null
+++ b/mail-filter/procmail/files/procmail-3.22-crash-fix.patch
@@ -0,0 +1,58 @@
+diff --git a/src/cstdio.c b/src/cstdio.c
+index 7b6fe6d..0a0bd5b 100644
+--- a/src/cstdio.c
++++ b/src/cstdio.c
+@@ -144,7 +144,7 @@ int getbl(p,end)char*p,*end; /* my gets */
+ { case '\n':case EOF:*q='\0';
+ return overflow?-1:p!=q; /* did we read anything at all? */
+ }
+- if(q==end) /* check here so that a trailing backslash won't be lost */
++ if(q>=end) /* check here so that a trailing backslash won't be lost */
+ q=p,overflow=1;
+ *q++=i;
+ }
+@@ -199,7 +199,7 @@ int getlline(target,end)char*target,*end;
+ if(*(target=strchr(target,'\0')-1)=='\\')
+ { if(chp2!=target) /* non-empty line? */
+ target++; /* then preserve the backslash */
+- if(target>end-2) /* space enough for getbl? */
++ if(target>=end-2) /* space enough for getbl? */
+ target=end-linebuf,overflow=1; /* toss what we have */
+ continue;
+ }
+diff --git a/src/formail.c b/src/formail.c
+index 1f5c9dd..49b9967 100644
+--- a/src/formail.c
++++ b/src/formail.c
+@@ -219,7 +219,8 @@ static char*getsender(namep,fldp,headreply)char*namep;struct field*fldp;
+ if(i>=0&&(i!=maxindex(sest)||fldp==rdheader)) /* found anything? */
+ { char*saddr;char*tmp; /* determine the weight */
+ nowm=areply&&headreply?headreply==1?sest[i].wrepl:sest[i].wrrepl:i;chp+=j;
+- tmp=malloc(j=fldp->Tot_len-j);tmemmove(tmp,chp,j);(chp=tmp)[j-1]='\0';
++ tmp=malloc((j=fldp->Tot_len-j) + 1);tmemmove(tmp,chp,j);(chp=tmp)[j-1]='\0';
++ chp[j]='\0';
+ if(sest[i].head==From_)
+ { char*pastad;
+ if(strchr(saddr=chp,'\n')) /* multiple From_ lines */
+@@ -364,7 +365,7 @@ static PROGID;
+
+ int main(lastm,argv)int lastm;const char*const argv[];
+ { int i,split=0,force=0,bogus=1,every=0,headreply=0,digest=0,nowait=0,keepb=0,
+- minfields=(char*)progid-(char*)progid,conctenate=0,babyl=0,babylstart,
++ minfields=(char*)progid-(char*)progid,conctenate=0,babyl=0,babylstart=0,
+ berkeley=0,forgetclen;
+ long maxlen,ctlength;FILE*idcache=0;pid_t thepid;
+ size_t j,lnl,escaplen;char*chp,*namep,*escap=ESCAP;
+diff --git a/src/formisc.c b/src/formisc.c
+index c48df52..5c2869d 100644
+--- a/src/formisc.c
++++ b/src/formisc.c
+@@ -66,7 +66,7 @@ inc: start++;
+ retz: *target='\0';
+ ret: return start;
+ }
+- if(*start=='\\')
++ if(*start=='\\' && *(start + 1))
+ *target++='\\',start++;
+ hitspc=2;
+ goto normal; /* normal word */
diff --git a/mail-filter/procmail/metadata.xml b/mail-filter/procmail/metadata.xml
index 9a6d80e5da48..6f49eba8f496 100644
--- a/mail-filter/procmail/metadata.xml
+++ b/mail-filter/procmail/metadata.xml
@@ -1,8 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
-<maintainer type="project">
- <email>net-mail@gentoo.org</email>
- <name>Net-Mail</name>
-</maintainer>
+<!-- maintainer-needed -->
</pkgmetadata>
diff --git a/mail-filter/procmail/procmail-3.22-r14.ebuild b/mail-filter/procmail/procmail-3.22-r14.ebuild
new file mode 100644
index 000000000000..c23341b477e8
--- /dev/null
+++ b/mail-filter/procmail/procmail-3.22-r14.ebuild
@@ -0,0 +1,126 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit flag-o-matic toolchain-funcs prefix
+
+DESCRIPTION="Mail delivery agent/filter"
+HOMEPAGE="http://www.procmail.org/"
+SRC_URI="http://www.procmail.org/${P}.tar.gz"
+
+LICENSE="|| ( Artistic GPL-2 )"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x86-solaris"
+IUSE="mbox selinux"
+
+DEPEND="virtual/mta"
+RDEPEND="selinux? ( sec-policy/selinux-procmail )"
+
+src_prepare() {
+ # disable flock, using both fcntl and flock style locking
+ # doesn't work with NFS with 2.6.17+ kernels, bug #156493
+
+ sed -e "s:/\*#define NO_flock_LOCK:#define NO_flock_LOCK:" \
+ -i config.h || die "sed failed"
+
+ if ! use mbox ; then
+ echo "# Use maildir-style mailbox in user's home directory" > "${S}"/procmailrc || die
+ echo 'DEFAULT=$HOME/.maildir/' >> "${S}"/procmailrc || die
+ cd "${S}" || die
+ eapply "${FILESDIR}/gentoo-maildir3.diff"
+ else
+ echo '# Use mbox-style mailbox in /var/spool/mail' > "${S}"/procmailrc || die
+ echo 'DEFAULT=${EPREFIX}/var/spool/mail/$LOGNAME' >> "${S}"/procmailrc || die
+ fi
+
+ # Do not use lazy bindings on lockfile and procmail
+ if [[ ${CHOST} != *-darwin* ]]; then
+ eapply -p0 "${FILESDIR}/${PN}-lazy-bindings.diff"
+ fi
+
+ # Fix for bug #102340
+ eapply -p0 "${FILESDIR}/${PN}-comsat-segfault.diff"
+
+ # Fix for bug #119890
+ eapply -p0 "${FILESDIR}/${PN}-maxprocs-fix.diff"
+
+ # Prefixify config.h
+ eapply -p0 "${FILESDIR}"/${PN}-prefix.patch
+ eprefixify config.h Makefile src/autoconf src/recommend.c
+
+ # Fix for bug #200006
+ eapply "${FILESDIR}/${PN}-pipealloc.diff"
+
+ # Fix for bug #270551
+ eapply "${FILESDIR}/${PN}-3.22-glibc-2.10.patch"
+
+ # Fix security bugs #522114 and #638108
+ eapply "${FILESDIR}/${PN}-3.22-CVE-2014-3618.patch"
+ eapply "${FILESDIR}/${PN}-3.22-CVE-2017-16844.patch"
+
+ eapply "${FILESDIR}/${PN}-3.22-crash-fix.patch"
+
+ eapply_user
+}
+
+src_compile() {
+ # -finline-functions (implied by -O3) leaves strstr() in an infinite loop.
+ # To work around this, we append -fno-inline-functions to CFLAGS
+ # Since GCC 4.7 we also need -fno-ipa-cp-clone (bug #466552)
+ # If it's clang, ignore -fno-ipa-cp-clone, as clang doesn't support this
+ case "$(tc-getCC)" in
+ "clang") append-flags -fno-inline-functions ;;
+ "gcc"|*) append-flags -fno-inline-functions -fno-ipa-cp-clone ;;
+ esac
+
+ sed -e "s:CFLAGS0 = -O:CFLAGS0 = ${CFLAGS}:" \
+ -e "s:LDFLAGS0= -s:LDFLAGS0 = ${LDFLAGS}:" \
+ -e "s:LOCKINGTEST=__defaults__:#LOCKINGTEST=__defaults__:" \
+ -e "s:#LOCKINGTEST=/tmp:LOCKINGTEST=/tmp:" \
+ -i Makefile || die "sed failed"
+
+ emake CC="$(tc-getCC)"
+}
+
+src_install() {
+ cd "${S}"/new || die
+ insinto /usr/bin
+ insopts -m 6755
+ doins procmail
+
+ doins lockfile
+ fowners root:mail /usr/bin/lockfile
+ fperms 2755 /usr/bin/lockfile
+
+ dobin formail mailstat
+ insopts -m 0644
+
+ doman *.1 *.5
+
+ cd "${S}" || die
+ dodoc FAQ FEATURES HISTORY INSTALL KNOWN_BUGS README
+
+ insinto /etc
+ doins procmailrc
+
+ docinto examples
+ dodoc examples/*
+}
+
+pkg_postinst() {
+ if ! use mbox ; then
+ elog "Starting with mail-filter/procmail-3.22-r9 you'll need to ensure"
+ elog "that you configure a mail storage location using DEFAULT in"
+ elog "/etc/procmailrc, for example:"
+ elog "\tDEFAULT=\$HOME/.maildir/"
+ fi
+ if has sfperms ${FEATURES}; then
+ ewarn "FEATURES=sfperms removes the read-bit for others from"
+ ewarn " /usr/bin/procmail"
+ ewarn " /usr/bin/lockfile"
+ ewarn "If you use procmail from an MTA like Exim, you need to"
+ ewarn "re-add the read-bit or avoid the MTA checking the binary"
+ ewarn "exists."
+ fi
+}