diff options
Diffstat (limited to 'mail-filter/libspf2')
-rw-r--r-- | mail-filter/libspf2/Manifest | 3 | ||||
-rw-r--r-- | mail-filter/libspf2/files/libspf2-1.2.9-ipv6.patch | 61 | ||||
-rw-r--r-- | mail-filter/libspf2/libspf2-1.2.9-r3.ebuild | 42 |
3 files changed, 106 insertions, 0 deletions
diff --git a/mail-filter/libspf2/Manifest b/mail-filter/libspf2/Manifest index 4bd776b45f44..c2e721cbb6c0 100644 --- a/mail-filter/libspf2/Manifest +++ b/mail-filter/libspf2/Manifest @@ -1,4 +1,7 @@ AUX libspf2-1.2.10-gcc5.patch 1080 BLAKE2B ce085a71cba9f6a493c7b276dada02dceb8efdb75df9d0062b74acd9b0e9d5a9c56cdd970743cc9e4860a4714e24d0e4687d9a2c5d321e320a6888c06f88e6c3 SHA512 cd2af129e334e0e1efcd722680f8f7cb064e6f5581ce41c791cb4f5f34d1eb4ac0dc586114b3017b4fd2ba350f11972f78a4029a8fc03118cf74c4f1276cd12b +AUX libspf2-1.2.9-ipv6.patch 1796 BLAKE2B 939a59e17a9e06b4eb4cab62ad555e493d733d940527c549a050b36384f340a9ed21e916aa3ac90812205d06b2e9f50b6f2c548b7186e38f6862991347d8d0f0 SHA512 d79187ba3bdf6f093600f5ad9a530e17791689e141861b09486ee4a54a9c54d9c100c19ab45839c28aa8535fb6af9b2bbcac937a2b4b2519feaff52d51515ded DIST libspf2-1.2.10.tar.gz 508842 BLAKE2B d15a44f64c5e3da20aa349e61a6cc02a15f83ed3acff93fe4c23970e30533d6424b1db35d7d60ff488c9a239d343f8544426fbf8fcb66271237155e0b57df1b5 SHA512 162ce382628c6fcadac3e11f5a12442db622bb23f7ec503e16f5ba7fc88afdd777bce6b093c12a58210355985fd11b74b140f08fab347334d82d953dd183b130 +DIST libspf2-1.2.9.tar.gz 518001 BLAKE2B 711a10d8d7799a09f4f0a801ed7a4c7e82611bd8a6dd9a55f616827548761dae9924ca65c64c7271f8cf0f6f605ccb98ff5e8e3035fc3776ee4e7604ec0a02cd SHA512 3137571f438704c176c5251e7b93fd0a8b6b04e52ad37218685b42b1fc5da6286baee578da1a14291d185216bd2a909cca3e55d64ffe580e71be059d1043a248 EBUILD libspf2-1.2.10.ebuild 1219 BLAKE2B 85afd0c834ce4a81635a7535ad0f218cffe3bd445112c4add6e6a7864995daf44912ff57dab5a203209a30f1377d6054844b51c81050657aa501468e607ea14a SHA512 99e4467440c5ed53ecf255d0fcd95eaf6731b51dcd3e18b0e858a0de1a3ac2cc19cb7596950bd457b127521abe63c74bcc16d764bcc9be99280cb734377f6a38 +EBUILD libspf2-1.2.9-r3.ebuild 1124 BLAKE2B d50b3f79242b706dc9bcf3142dbc53cd4ee0a0220cb1502d815014c4384b153efa25bce1d8785f9736748b7cce27678a7bf56d8326ea48dede11ce6176e4efce SHA512 f82a8f69f82bef84a33c512e434f6a683e5ddb97689c6c317c6d372cfa7b528be49ac7757c824c1bf393dd8d064eb869137839fe61717832ebc7786b22ae2abc MISC metadata.xml 588 BLAKE2B f2a34d6c55b8678f9ef69824ccce32a51508fe251af758d4d4c3ae05b51498b543e5f60757764a4a47dbc98587bc2b57faced4965d8c401e35f8e36605313a4c SHA512 8328d959a8b69fa3e10108f21cf2c53a3daf4aacbd9646af8e5af95ec818eeb6aebc20185b991e4ce6a3a2d0101bf67ce47b7af85dec4b06c2748d5f4fafd18e diff --git a/mail-filter/libspf2/files/libspf2-1.2.9-ipv6.patch b/mail-filter/libspf2/files/libspf2-1.2.9-ipv6.patch new file mode 100644 index 000000000000..76e8cd37c27d --- /dev/null +++ b/mail-filter/libspf2/files/libspf2-1.2.9-ipv6.patch @@ -0,0 +1,61 @@ +$NetBSD: patch-aa,v 1.1 2009/09/08 10:36:27 tron Exp $ + +Fix an abort() caused by miscalculating the size of an internal buffer. +This can crash applications using "libspf2" (e.g. "milter-greylist") +in an e-mail gets delivered via SMTP over IPv6 depending on the +remote machine's IPv6 address. + +--- src/libspf2/spf_expand.c.orig 2008-11-03 21:29:00.000000000 +0000 ++++ src/libspf2/spf_expand.c 2009-09-08 11:27:52.000000000 +0100 +@@ -245,7 +245,7 @@ + case PARM_CLIENT_IP: /* SMTP client IP */ + #ifdef COMPUTE + if (compute_length) { +- len = sizeof(ip6_buf); ++ len = sizeof(ip6_rbuf); + if (d->dv.url_encode) + len *= 3; + buflen += len; + +http://www.gossamer-threads.com/lists/spf/devel/35098 + +--- src/libspf2/spf_compile.c 2008-11-03 15:37:33.000000000 -0500 ++++ src/libspf2/spf_compile.c 2009-09-07 23:46:02.000000000 -0400 +@@ -778,7 +778,7 @@ + const char *end; + const char *p; + +- char buf[ INET_ADDRSTRLEN ]; ++ char buf[ INET6_ADDRSTRLEN ]; + size_t len; + int err; + +--- src/libspf2/spf_interpret.c 2008-10-22 11:47:43.000000000 -0400 ++++ src/libspf2/spf_interpret.c 2009-09-08 00:42:25.000000000 -0400 +@@ -505,7 +505,7 @@ + char dst_ip6_buf[ INET6_ADDRSTRLEN ]; + + struct in6_addr src_ipv6; +- int cidr, mask; ++ int cidr, cidr_save, mask; + int i; + int match; + +@@ -517,6 +517,7 @@ + cidr = SPF_i_mech_cidr(spf_request, mech); + if ( cidr == 0 ) + cidr = 128; ++ cidr_save = cidr; + + match = TRUE; + for( i = 0; i < array_elem( ipv6.s6_addr ) && match; i++ ) +@@ -538,7 +539,7 @@ + INET_NTOP(AF_INET6, &ipv6.s6_addr, + dst_ip6_buf, sizeof(dst_ip6_buf)); + SPF_debugf( "ip_match: %s == %s (/%d): %d", +- src_ip6_buf, dst_ip6_buf, cidr, match ); ++ src_ip6_buf, dst_ip6_buf, cidr_save, match ); + } + + return match; + diff --git a/mail-filter/libspf2/libspf2-1.2.9-r3.ebuild b/mail-filter/libspf2/libspf2-1.2.9-r3.ebuild new file mode 100644 index 000000000000..6e99cae55055 --- /dev/null +++ b/mail-filter/libspf2/libspf2-1.2.9-r3.ebuild @@ -0,0 +1,42 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=4 +inherit eutils autotools + +DESCRIPTION="libspf2 implements the Sender Policy Framework, a part of the SPF/SRS protocols" +HOMEPAGE="http://www.libspf2.org" +SRC_URI="http://www.libspf2.org/spf/libspf2-${PV}.tar.gz" + +LICENSE="|| ( LGPL-2.1 BSD-2 )" +SLOT="0" +KEYWORDS="alpha amd64 hppa ia64 ppc ppc64 sparc x86 ~x86-fbsd" +IUSE="static static-libs" + +DEPEND="" +RDEPEND="!dev-perl/Mail-SPF-Query" +REQUIRED_USE="static? ( static-libs )" + +src_prepare() { + epatch "${FILESDIR}/${P}-ipv6.patch" + if ! use static; then + sed -i -e '/bin_PROGRAMS/s/spfquery_static//' src/spfquery/Makefile.am \ + -e '/bin_PROGRAMS/s/spftest_static//' src/spftest/Makefile.am \ + -e '/bin_PROGRAMS/s/spfd_static//' src/spfd/Makefile.am \ + -e '/bin_PROGRAMS/s/spf_example_static//' src/spf_example/Makefile.am \ + || die + eautoreconf + fi +} + +src_configure() { + econf \ + $(use_enable static-libs static) +} + +src_install() { + emake DESTDIR="${D}" install + dodoc README TODO INSTALL + + use static-libs || rm -f "${D}"/usr/lib*/libspf2.la +} |