1 |
commit: 8146a1f86e72210919cd8a0020aaf19838da0637 |
2 |
Author: Jason A. Donenfeld <zx2c4 <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Mar 2 16:37:51 2016 +0000 |
4 |
Commit: Jason Donenfeld <zx2c4 <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Mar 2 16:38:16 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8146a1f8 |
7 |
|
8 |
mail-mta/opensmtpd: do not crash with libressl |
9 |
|
10 |
...d-5.7.3p2-libressl-arc4random-circularity.patch | 35 ++++++++++++++++++++++ |
11 |
...3_p2-r1.ebuild => opensmtpd-5.7.3_p2-r2.ebuild} | 3 +- |
12 |
2 files changed, 37 insertions(+), 1 deletion(-) |
13 |
|
14 |
diff --git a/mail-mta/opensmtpd/files/opensmtpd-5.7.3p2-libressl-arc4random-circularity.patch b/mail-mta/opensmtpd/files/opensmtpd-5.7.3p2-libressl-arc4random-circularity.patch |
15 |
new file mode 100644 |
16 |
index 0000000..7c35862 |
17 |
--- /dev/null |
18 |
+++ b/mail-mta/opensmtpd/files/opensmtpd-5.7.3p2-libressl-arc4random-circularity.patch |
19 |
@@ -0,0 +1,35 @@ |
20 |
+diff -ru opensmtpd-5.7.3p2/openbsd-compat/arc4random.c opensmtpd-5.7.3p2-fixed/openbsd-compat/arc4random.c |
21 |
+--- opensmtpd-5.7.3p2/openbsd-compat/arc4random.c 2016-02-02 08:40:06.000000000 +0100 |
22 |
++++ opensmtpd-5.7.3p2-fixed/openbsd-compat/arc4random.c 2016-03-02 17:34:24.535030362 +0100 |
23 |
+@@ -188,6 +188,7 @@ |
24 |
+ _ARC4_UNLOCK(); |
25 |
+ } |
26 |
+ |
27 |
++#if 0 |
28 |
+ u_int32_t |
29 |
+ arc4random(void) |
30 |
+ { |
31 |
+@@ -198,12 +199,13 @@ |
32 |
+ _ARC4_UNLOCK(); |
33 |
+ return val; |
34 |
+ } |
35 |
++#endif |
36 |
+ |
37 |
+ /* |
38 |
+ * If we are providing arc4random, then we can provide a more efficient |
39 |
+ * arc4random_buf(). |
40 |
+ */ |
41 |
+-# ifndef HAVE_ARC4RANDOM_BUF |
42 |
++#if 0 |
43 |
+ void |
44 |
+ arc4random_buf(void *buf, size_t n) |
45 |
+ { |
46 |
+@@ -215,7 +217,7 @@ |
47 |
+ #endif /* !HAVE_ARC4RANDOM */ |
48 |
+ |
49 |
+ /* arc4random_buf() that uses platform arc4random() */ |
50 |
+-#if !defined(HAVE_ARC4RANDOM_BUF) && defined(HAVE_ARC4RANDOM) |
51 |
++#if 0 |
52 |
+ void |
53 |
+ arc4random_buf(void *_buf, size_t n) |
54 |
+ { |
55 |
|
56 |
diff --git a/mail-mta/opensmtpd/opensmtpd-5.7.3_p2-r1.ebuild b/mail-mta/opensmtpd/opensmtpd-5.7.3_p2-r2.ebuild |
57 |
similarity index 94% |
58 |
rename from mail-mta/opensmtpd/opensmtpd-5.7.3_p2-r1.ebuild |
59 |
rename to mail-mta/opensmtpd/opensmtpd-5.7.3_p2-r2.ebuild |
60 |
index ef9a286..dc90b46 100644 |
61 |
--- a/mail-mta/opensmtpd/opensmtpd-5.7.3_p2-r1.ebuild |
62 |
+++ b/mail-mta/opensmtpd/opensmtpd-5.7.3_p2-r2.ebuild |
63 |
@@ -1,4 +1,4 @@ |
64 |
-# Copyright 1999-2015 Gentoo Foundation |
65 |
+# Copyright 1999-2016 Gentoo Foundation |
66 |
# Distributed under the terms of the GNU General Public License v2 |
67 |
# $Id$ |
68 |
|
69 |
@@ -47,6 +47,7 @@ S=${WORKDIR}/${MY_P/_} |
70 |
src_prepare() { |
71 |
# Use /run instead of /var/run |
72 |
sed -i -e '/pidfile_path/s:_PATH_VARRUN:"/run/":' openbsd-compat/pidfile.c || die |
73 |
+ use libressl && epatch "${FILESDIR}/${PN}-5.7.3p2-libressl-arc4random-circularity.patch" |
74 |
|
75 |
epatch_user |
76 |
eautoreconf |