Gentoo Archives: gentoo-commits

From: Fabian Groffen <grobian@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: mail-filter/opendmarc/files/, mail-filter/opendmarc/
Date: Thu, 19 Sep 2019 18:46:31
Message-Id: 1568918777.4d5480baf0d90e1a33e9b8dde0c9ba7051f989ef.grobian@gentoo
1 commit: 4d5480baf0d90e1a33e9b8dde0c9ba7051f989ef
2 Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
3 AuthorDate: Thu Sep 19 18:46:01 2019 +0000
4 Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
5 CommitDate: Thu Sep 19 18:46:17 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4d5480ba
7
8 mail-filter/opendmarc: revbump with fix for CVE-2019-16378
9
10 Bug: https://bugs.gentoo.org/694968
11 Package-Manager: Portage-2.3.69, Repoman-2.3.16
12 Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>
13
14 .../files/opendmarc-1.3.2-multiple-From.patch | 35 +++++++++++
15 mail-filter/opendmarc/opendmarc-1.3.2-r3.ebuild | 72 ++++++++++++++++++++++
16 2 files changed, 107 insertions(+)
17
18 diff --git a/mail-filter/opendmarc/files/opendmarc-1.3.2-multiple-From.patch b/mail-filter/opendmarc/files/opendmarc-1.3.2-multiple-From.patch
19 new file mode 100644
20 index 00000000000..28b2f852f39
21 --- /dev/null
22 +++ b/mail-filter/opendmarc/files/opendmarc-1.3.2-multiple-From.patch
23 @@ -0,0 +1,35 @@
24 +From f6b615e345037408b88b2ffd1acd03239af8a858 Mon Sep 17 00:00:00 2001
25 +From: Marcin Seremak <panpilkarz@××××××××××.com>
26 +Date: Tue, 30 Jul 2019 08:05:28 +0200
27 +Subject: [PATCH] Fix multiple addresses in From vulnerability
28 +
29 +---
30 + libopendmarc/tests/test_finddomain.c | 1 +
31 + opendmarc/opendmarc.c | 2 +-
32 + 2 files changed, 2 insertions(+), 1 deletion(-)
33 +
34 +diff --git a/libopendmarc/tests/test_finddomain.c b/libopendmarc/tests/test_finddomain.c
35 +index 50cf405..8447463 100644
36 +--- a/libopendmarc/tests/test_finddomain.c
37 ++++ b/libopendmarc/tests/test_finddomain.c
38 +@@ -23,6 +23,7 @@ main(int argc, char **argv)
39 + /* 11 */ {"(,) joe@×××.com", "joe.com"},
40 + /* 12 */ {"\"( bob@×××.com)\" joe@×××.com", "joe.com"},
41 + /* 12 */ {"From: Davide D'Marco <user@××××.com>", "blah.com"},
42 ++ /* 13 */ {"blah.com", "blah.com"},
43 + {NULL, NULL},
44 + };
45 + u_char dbuf[256];
46 +diff --git a/opendmarc/opendmarc.c b/opendmarc/opendmarc.c
47 +index 419c15a..9b7fe3a 100644
48 +--- a/opendmarc/opendmarc.c
49 ++++ b/opendmarc/opendmarc.c
50 +@@ -2193,7 +2193,7 @@ mlfi_eom(SMFICTX *ctx)
51 + strncpy(dfc->mctx_fromdomain, domain, sizeof dfc->mctx_fromdomain - 1);
52 +
53 + ostatus = opendmarc_policy_store_from_domain(cc->cctx_dmarc,
54 +- from->hdr_value);
55 ++ dfc->mctx_fromdomain);
56 + if (ostatus != DMARC_PARSE_OKAY)
57 + {
58 + if (conf->conf_dolog)
59
60 diff --git a/mail-filter/opendmarc/opendmarc-1.3.2-r3.ebuild b/mail-filter/opendmarc/opendmarc-1.3.2-r3.ebuild
61 new file mode 100644
62 index 00000000000..2482aed4e1f
63 --- /dev/null
64 +++ b/mail-filter/opendmarc/opendmarc-1.3.2-r3.ebuild
65 @@ -0,0 +1,72 @@
66 +# Copyright 1999-2019 Gentoo Authors
67 +# Distributed under the terms of the GNU General Public License v2
68 +
69 +EAPI=6
70 +
71 +inherit user multilib systemd
72 +
73 +DESCRIPTION="Open source DMARC implementation "
74 +HOMEPAGE="http://www.trusteddomain.org/opendmarc/"
75 +SRC_URI="mirror://sourceforge/opendmarc/${P}.tar.gz"
76 +
77 +LICENSE="BSD"
78 +SLOT="0"
79 +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
80 +IUSE="spf +reports static-libs"
81 +
82 +DEPEND="reports? ( dev-perl/DBI )
83 + || ( mail-filter/libmilter mail-mta/sendmail )"
84 +RDEPEND="${DEPEND}
85 + reports? (
86 + dev-perl/DBD-mysql
87 + dev-perl/HTTP-Message
88 + dev-perl/Switch
89 + )
90 + spf? ( mail-filter/libspf2 )"
91 +
92 +PATCHES=(
93 + "${FILESDIR}"/${P}-multiple-From.patch
94 +)
95 +
96 +pkg_setup() {
97 + enewgroup milter
98 + enewuser milter -1 -1 /var/lib/milter milter
99 +}
100 +
101 +src_prepare() {
102 + default
103 + if use !reports ; then
104 + sed -i -e '/^SUBDIRS =/s/reports//' Makefile.in || die
105 + fi
106 +}
107 +
108 +src_configure() {
109 + econf \
110 + --docdir="${EPREFIX}"/usr/share/doc/${PF} \
111 + --htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \
112 + $(use_with spf) \
113 + $(use_with spf spf2-include "${EPREFIX}"/usr/include/spf2) \
114 + $(use_with spf spf2-lib "${EPREFIX}"/usr/$(get_libdir)) \
115 + $(use_enable static-libs static)
116 +}
117 +
118 +src_install() {
119 + default
120 +
121 + use static-libs || rm -f "${ED}"/usr/$(get_libdir)/*.la
122 +
123 + newinitd "${FILESDIR}"/opendmarc.initd opendmarc
124 + newconfd "${FILESDIR}"/opendmarc.confd opendmarc
125 + systemd_dounit "${FILESDIR}/${PN}.service"
126 +
127 + dodir /etc/opendmarc
128 +
129 + # create config file
130 + sed \
131 + -e 's:^# UserID .*$:UserID milter:' \
132 + -e "s:^# PidFile .*:PidFile ${EPREFIX}/var/run/opendmarc/opendmarc.pid:" \
133 + -e '/^# Socket /s:^# ::' \
134 + "${S}"/opendmarc/opendmarc.conf.sample \
135 + > "${ED}"/etc/opendmarc/opendmarc.conf \
136 + || die
137 +}