[gentoo-commits] repo/gentoo:master commit in: mail-mta/opensmtpd/files/, mail-mta/opensmtpd/

2024-04-14 Thread Matthew Smith
commit: 650f13dce660ef67fd90b7e6134a9ab79fa36c2c
Author: NHOrus  yahoo  com>
AuthorDate: Mon Apr  1 07:51:45 2024 +
Commit: Matthew Smith  gentoo  org>
CommitDate: Sun Apr 14 16:06:28 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=650f13dc

mail-mta/opensmtpd: Add missing include

Fixes GCC-14 build error implicit declaration of function snprintf

Closes: https://bugs.gentoo.org/922951
Signed-off-by: NHOrus  yahoo.com>
Closes: https://github.com/gentoo/gentoo/pull/36035
Signed-off-by: Matthew Smith  gentoo.org>

 .../opensmtpd/files/opensmtpd-7.4.0-missing-include.patch | 11 +++
 mail-mta/opensmtpd/opensmtpd-7.4.0_p1.ebuild  |  2 ++
 2 files changed, 13 insertions(+)

diff --git a/mail-mta/opensmtpd/files/opensmtpd-7.4.0-missing-include.patch 
b/mail-mta/opensmtpd/files/opensmtpd-7.4.0-missing-include.patch
new file mode 100644
index ..b11d62456743
--- /dev/null
+++ b/mail-mta/opensmtpd/files/opensmtpd-7.4.0-missing-include.patch
@@ -0,0 +1,11 @@
+diff -ur '--exclude=*.o' 
opensmtpd-7.4.0p1.orig/openbsd-compat/getdtablecount.c 
opensmtpd-7.4.0p1/openbsd-compat/getdtablecount.c
+--- a/openbsd-compat/getdtablecount.c  2024-04-01 07:25:41.230753002 +
 b/openbsd-compat/getdtablecount.c  2024-04-01 07:27:23.556124378 +
+@@ -20,6 +20,7 @@
+ 
+ #include 
+ #include 
++#include 
+ 
+ void fatal(const char *, ...);
+ void fatalx(const char *, ...);

diff --git a/mail-mta/opensmtpd/opensmtpd-7.4.0_p1.ebuild 
b/mail-mta/opensmtpd/opensmtpd-7.4.0_p1.ebuild
index c5b98eddea63..9dfe3df3f2c5 100644
--- a/mail-mta/opensmtpd/opensmtpd-7.4.0_p1.ebuild
+++ b/mail-mta/opensmtpd/opensmtpd-7.4.0_p1.ebuild
@@ -57,6 +57,8 @@ QA_CONFIG_IMPL_DECL_SKIP=( closefrom )
 
 DOCS=( {CHANGES,README}.md )
 
+PATCHES=( "${FILESDIR}/${PN}-7.4.0-missing-include.patch" )
+
 src_unpack() {
if use verify-sig; then
# Too many levels of symbolic links



[gentoo-commits] repo/gentoo:master commit in: mail-mta/opensmtpd/files/, mail-mta/opensmtpd/

2023-09-05 Thread David Seifert
commit: f571d35d15b7e75c0606e3faa6ef5aa25b8c15ec
Author: David Seifert  gentoo  org>
AuthorDate: Tue Sep  5 14:36:51 2023 +
Commit: David Seifert  gentoo  org>
CommitDate: Tue Sep  5 14:36:51 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f571d35d

mail-mta/opensmtpd: drop 6.8.0_p2-r2, 6.8.0_p2-r3

Closes: https://bugs.gentoo.org/881701
Closes: https://bugs.gentoo.org/899788
Closes: https://bugs.gentoo.org/913144
Signed-off-by: David Seifert  gentoo.org>

 mail-mta/opensmtpd/Manifest|   1 -
 .../opensmtpd/files/opensmtpd-6.8.0_p2-ar.patch|  42 ---
 ...pd-6.8.0_p2-implicit-function-declaration.patch | 303 -
 .../opensmtpd-6.8.0_p2-strict-prototypes.patch |  74 -
 mail-mta/opensmtpd/files/smtpd.service |  10 -
 mail-mta/opensmtpd/files/smtpd.socket  |   8 -
 mail-mta/opensmtpd/opensmtpd-6.8.0_p2-r2.ebuild|  78 --
 mail-mta/opensmtpd/opensmtpd-6.8.0_p2-r3.ebuild|  91 ---
 8 files changed, 607 deletions(-)

diff --git a/mail-mta/opensmtpd/Manifest b/mail-mta/opensmtpd/Manifest
index 2b92b99ea427..5c6919669ac9 100644
--- a/mail-mta/opensmtpd/Manifest
+++ b/mail-mta/opensmtpd/Manifest
@@ -1,2 +1 @@
-DIST opensmtpd-6.8.0p2.tar.gz 860189 BLAKE2B 
603e8516860eddefb1694ea4cb5631cec2df2a19fa3193b25388caf73c41e82d44e57847fc95b5187488cae629542e72ff2d5a17badc15cef1647bdb173d7827
 SHA512 
48f152b75575146fdd09bdf47123041ea62fefb6e5de33a69826bf91a2126a918f8db1caffadb2f142a1a21de8126d492de88cb65bdf169e61c0b22d3e78d290
 DIST opensmtpd-7.3.0p1.tar.gz 849026 BLAKE2B 
bdb83468df12af2a2b39664a4408acfaf0cd81551074fb3823f7eb1b0d30ce79d812876fcea2ff940ddaac8b1a96700e1f4d2c275beab106fed010b733cff5c2
 SHA512 
2106de43e4b7435e49df759570ec758672ca8271dc451e30a261c250b41908b6ffe28e571a5f52e2ac14f59af132d1df45b272f8fcafeab04fcfb6bd5db970bb

diff --git a/mail-mta/opensmtpd/files/opensmtpd-6.8.0_p2-ar.patch 
b/mail-mta/opensmtpd/files/opensmtpd-6.8.0_p2-ar.patch
deleted file mode 100644
index fbd6ca925945..
--- a/mail-mta/opensmtpd/files/opensmtpd-6.8.0_p2-ar.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-https://github.com/OpenSMTPD/OpenSMTPD/pull/1199
-https://bugs.gentoo.org/720782
-
-From 92ada4471602fc737113b8dfe1b9b8e8e0aab7e0 Mon Sep 17 00:00:00 2001
-From: orbea 
-Date: Tue, 25 Apr 2023 09:13:51 -0700
-Subject: [PATCH] configure: Use AM_PROG_AR
-
-Automake provides AM_PROG_AR as a standard way of finding ar(1).
-
-Reference: 
https://www.gnu.org/software/automake/manual/html_node/Public-Macros.html
-
-Closes: https://github.com/OpenSMTPD/OpenSMTPD/pull/1177

- configure.ac | 7 +--
- 1 file changed, 1 insertion(+), 6 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 00450485..5b12b67e 100644
 a/configure.ac
-+++ b/configure.ac
-@@ -67,7 +67,7 @@ AC_C_BIGENDIAN
- AC_PROG_CPP
- AC_PROG_INSTALL
- AC_PROG_LIBTOOL
--AC_PATH_PROG([AR], [ar])
-+AM_PROG_AR
- AC_PATH_PROG([CAT], [cat])
- AC_PATH_PROG([CHMOD], [chmod])
- AC_PATH_PROG([CHOWN], [chown])
-@@ -84,11 +84,6 @@ AC_PROG_YACC
- 
- AC_SUBST([ZCAT])
- 
--
--if test -z "$AR"; then
--  AC_MSG_ERROR([*** 'ar' missing, please install or fix your \$PATH ***])
--fi
--
- if test -z "$LD"; then
-   LD=$CC
- fi

diff --git 
a/mail-mta/opensmtpd/files/opensmtpd-6.8.0_p2-implicit-function-declaration.patch
 
b/mail-mta/opensmtpd/files/opensmtpd-6.8.0_p2-implicit-function-declaration.patch
deleted file mode 100644
index 11af2aa7630c..
--- 
a/mail-mta/opensmtpd/files/opensmtpd-6.8.0_p2-implicit-function-declaration.patch
+++ /dev/null
@@ -1,303 +0,0 @@
-https://github.com/OpenSMTPD/OpenSMTPD/pull/1195
-https://bugs.gentoo.org/727260
-https://bugs.gentoo.org/896050
-https://bugs.gentoo.org/899876
-
-From 7abe6305f864113aec4c6fc55cccabdc55959252 Mon Sep 17 00:00:00 2001
-From: orbea 
-Date: Thu, 13 Apr 2023 11:04:14 -0700
-Subject: [PATCH] build: Fix -Werror=implicit-function-declaration
-
-On a system with musl these functions are not available, but they are
-found by the build system inside of libbsd instead. However many of the
-relevant headers are never incuded resulting in many implicit function
-declarations. Additionally clang-16 is more strict about these turning
-them into errors.
-
-* While libbsd contains symbols for inet_net_pton() they do not have any
-  headers with the function prototype. Upstream has marked this function
-  for removal since it is now provided in glibc even when musl doesn't
-  have it. This can be fixed by not looking for inet_net_pton() in libbsd.

- configure.ac| 6 +-
- openbsd-compat/openbsd-compat.h | 4 +++-
- usr.sbin/smtpd/aliases.c| 3 +++
- usr.sbin/smtpd/config.c | 6 ++
- usr.sbin/smtpd/control.c| 3 +++
- usr.sbin/smtpd/envelope.c   | 3 +++
- usr.sbin/smtpd/forward.c| 3 +++
- usr.sbin/smtpd/mail.maildir.c   | 1 +
- usr.sbin/smtpd/mda.c| 2 ++
- usr.sbin/smtpd/mda_variables.c  | 3 +++
- usr.sbin/

[gentoo-commits] repo/gentoo:master commit in: mail-mta/opensmtpd/files/, mail-mta/opensmtpd/

2023-08-26 Thread David Seifert
commit: 1c72dffdc796b9aa428abc9e9d557f817f6f9baa
Author: David Seifert  gentoo  org>
AuthorDate: Sat Aug 26 14:21:08 2023 +
Commit: David Seifert  gentoo  org>
CommitDate: Sat Aug 26 14:21:08 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1c72dffd

mail-mta/opensmtpd: add 7.3.0_p1

Bug: https://bugs.gentoo.org/779076
Bug: https://bugs.gentoo.org/881701
Bug: https://bugs.gentoo.org/899788
Bug: https://bugs.gentoo.org/908836
Signed-off-by: David Seifert  gentoo.org>

 mail-mta/opensmtpd/Manifest  |  1 +
 mail-mta/opensmtpd/files/smtpd-r1.service| 11 
 mail-mta/opensmtpd/opensmtpd-7.3.0_p1.ebuild | 91 
 3 files changed, 103 insertions(+)

diff --git a/mail-mta/opensmtpd/Manifest b/mail-mta/opensmtpd/Manifest
index f7a170bf9339..2b92b99ea427 100644
--- a/mail-mta/opensmtpd/Manifest
+++ b/mail-mta/opensmtpd/Manifest
@@ -1 +1,2 @@
 DIST opensmtpd-6.8.0p2.tar.gz 860189 BLAKE2B 
603e8516860eddefb1694ea4cb5631cec2df2a19fa3193b25388caf73c41e82d44e57847fc95b5187488cae629542e72ff2d5a17badc15cef1647bdb173d7827
 SHA512 
48f152b75575146fdd09bdf47123041ea62fefb6e5de33a69826bf91a2126a918f8db1caffadb2f142a1a21de8126d492de88cb65bdf169e61c0b22d3e78d290
+DIST opensmtpd-7.3.0p1.tar.gz 849026 BLAKE2B 
bdb83468df12af2a2b39664a4408acfaf0cd81551074fb3823f7eb1b0d30ce79d812876fcea2ff940ddaac8b1a96700e1f4d2c275beab106fed010b733cff5c2
 SHA512 
2106de43e4b7435e49df759570ec758672ca8271dc451e30a261c250b41908b6ffe28e571a5f52e2ac14f59af132d1df45b272f8fcafeab04fcfb6bd5db970bb

diff --git a/mail-mta/opensmtpd/files/smtpd-r1.service 
b/mail-mta/opensmtpd/files/smtpd-r1.service
new file mode 100644
index ..fccd88f31472
--- /dev/null
+++ b/mail-mta/opensmtpd/files/smtpd-r1.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=OpenSMTPD
+After=network.target
+
+[Service]
+Type=forking
+ExecStart=/usr/sbin/smtpd
+PIDFile=/run/smtpd.pid
+
+[Install]
+WantedBy=multi-user.target

diff --git a/mail-mta/opensmtpd/opensmtpd-7.3.0_p1.ebuild 
b/mail-mta/opensmtpd/opensmtpd-7.3.0_p1.ebuild
new file mode 100644
index ..25cf7cb2f25c
--- /dev/null
+++ b/mail-mta/opensmtpd/opensmtpd-7.3.0_p1.ebuild
@@ -0,0 +1,91 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools pam systemd
+
+DESCRIPTION="Lightweight but featured SMTP daemon from OpenBSD"
+HOMEPAGE="https://www.opensmtpd.org";
+SRC_URI="https://www.opensmtpd.org/archives/${P/_}.tar.gz";
+S="${WORKDIR}/${P/_}"
+
+LICENSE="ISC BSD BSD-1 BSD-2 BSD-4"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86"
+IUSE="berkdb +mta pam split-usr"
+
+RDEPEND="
+   acct-user/smtpd
+   acct-user/smtpq
+   app-misc/ca-certificates
+   dev-libs/libbsd
+   dev-libs/libevent:=
+   dev-libs/openssl:=
+   net-libs/libasr
+   net-mail/mailbase
+   sys-libs/zlib
+   virtual/libcrypt:=
+   berkdb? ( sys-libs/db:= )
+   elibc_musl? ( sys-libs/fts-standalone )
+   pam? ( sys-libs/pam )
+   !mail-mta/courier
+   !mail-mta/esmtp
+   !mail-mta/exim
+   !mail-mta/msmtp[mta]
+   !mail-mta/netqmail
+   !mail-mta/nullmailer
+   !mail-mta/postfix
+   !mail-mta/sendmail
+   !mail-mta/ssmtp[mta]
+"
+DEPEND="${RDEPEND}"
+BDEPEND="app-alternatives/yacc"
+
+QA_CONFIG_IMPL_DECL_SKIP=(
+   # LibreSSL link check
+   SSLeay_add_all_algorithms
+)
+
+src_prepare() {
+   default
+   eautoreconf
+}
+
+src_configure() {
+   econf \
+   --sysconfdir="${EPREFIX}"/etc/smtpd \
+   --with-path-mbox="${EPREFIX}"/var/spool/mail \
+   --with-path-empty="${EPREFIX}"/var/empty \
+   --with-path-socket=/run \
+   
--with-path-CAfile="${EPREFIX}"/etc/ssl/certs/ca-certificates.crt \
+   --with-user-smtpd=smtpd \
+   --with-user-queue=smtpq \
+   --with-group-queue=smtpq \
+   --with-libevent="${EPREFIX}"/usr/$(get_libdir) \
+   --with-libssl="${EPREFIX}"/usr/$(get_libdir) \
+   $(use_with pam auth-pam) \
+   $(use_with berkdb table-db)
+}
+
+src_install() {
+   default
+
+   newinitd "${FILESDIR}"/smtpd.initd smtpd
+   systemd_newunit "${FILESDIR}"/smtpd-r1.service smtpd.service
+
+   use pam && newpamd "${FILESDIR}"/smtpd.pam smtpd
+
+   dosym smtpctl /usr/sbin/makemap
+   dosym smtpctl /usr/sbin/newaliases
+
+   if use mta ; then
+   dodir /usr/sbin
+   dosym smtpctl /usr/sbin/sendmail
+   # on USE="-split-usr" system sbin and bin are merged
+   # so symlink made above will collide with one below
+   use split-usr && dosym ../sbin/smtpctl /usr/bin/sendmail
+   dodir /usr/$(get_libdir)
+   dosym -r /usr/sbin/smtpctl /usr/$(get_libdir)/sendmail
+   fi
+}



[gentoo-commits] repo/gentoo:master commit in: mail-mta/opensmtpd/files/, mail-mta/opensmtpd/

2023-04-25 Thread Sam James
commit: a05af7c36a3e4e74879cad3c03ef4ca2e3601b82
Author: orbea  riseup  net>
AuthorDate: Tue Apr 25 14:38:02 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Wed Apr 26 03:51:12 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a05af7c3

mail-mta/opensmtpd: Build fixes

Fixes some build issues:

* Build failure on musl systems
* Build failure with clang-16
* Uses AM_PROG_AR to find ar(1) during configure
* Uses configure arguments to find libevent and libssl on multilib
  systems.

Closes: https://bugs.gentoo.org/720782
Closes: https://bugs.gentoo.org/727260
Closes: https://bugs.gentoo.org/739876
Closes: https://bugs.gentoo.org/896050
Closes: https://bugs.gentoo.org/899876
Upstream-Issue: https://github.com/OpenSMTPD/OpenSMTPD/issues/1065
Upstream-PR: https://github.com/OpenSMTPD/OpenSMTPD/pull/1195
Upstream-PR: https://github.com/OpenSMTPD/OpenSMTPD/pull/1198
Upstream-PR: https://github.com/OpenSMTPD/OpenSMTPD/pull/1199
Signed-off-by: orbea  riseup.net>
Closes: https://github.com/gentoo/gentoo/pull/30750
Signed-off-by: Sam James  gentoo.org>

 .../opensmtpd/files/opensmtpd-6.8.0_p2-ar.patch|  42 +++
 ...pd-6.8.0_p2-implicit-function-declaration.patch | 303 +
 .../opensmtpd-6.8.0_p2-strict-prototypes.patch |  74 +
 mail-mta/opensmtpd/opensmtpd-6.8.0_p2-r3.ebuild|  91 +++
 4 files changed, 510 insertions(+)

diff --git a/mail-mta/opensmtpd/files/opensmtpd-6.8.0_p2-ar.patch 
b/mail-mta/opensmtpd/files/opensmtpd-6.8.0_p2-ar.patch
new file mode 100644
index ..fbd6ca925945
--- /dev/null
+++ b/mail-mta/opensmtpd/files/opensmtpd-6.8.0_p2-ar.patch
@@ -0,0 +1,42 @@
+https://github.com/OpenSMTPD/OpenSMTPD/pull/1199
+https://bugs.gentoo.org/720782
+
+From 92ada4471602fc737113b8dfe1b9b8e8e0aab7e0 Mon Sep 17 00:00:00 2001
+From: orbea 
+Date: Tue, 25 Apr 2023 09:13:51 -0700
+Subject: [PATCH] configure: Use AM_PROG_AR
+
+Automake provides AM_PROG_AR as a standard way of finding ar(1).
+
+Reference: 
https://www.gnu.org/software/automake/manual/html_node/Public-Macros.html
+
+Closes: https://github.com/OpenSMTPD/OpenSMTPD/pull/1177
+---
+ configure.ac | 7 +--
+ 1 file changed, 1 insertion(+), 6 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 00450485..5b12b67e 100644
+--- a/configure.ac
 b/configure.ac
+@@ -67,7 +67,7 @@ AC_C_BIGENDIAN
+ AC_PROG_CPP
+ AC_PROG_INSTALL
+ AC_PROG_LIBTOOL
+-AC_PATH_PROG([AR], [ar])
++AM_PROG_AR
+ AC_PATH_PROG([CAT], [cat])
+ AC_PATH_PROG([CHMOD], [chmod])
+ AC_PATH_PROG([CHOWN], [chown])
+@@ -84,11 +84,6 @@ AC_PROG_YACC
+ 
+ AC_SUBST([ZCAT])
+ 
+-
+-if test -z "$AR"; then
+-  AC_MSG_ERROR([*** 'ar' missing, please install or fix your \$PATH ***])
+-fi
+-
+ if test -z "$LD"; then
+   LD=$CC
+ fi

diff --git 
a/mail-mta/opensmtpd/files/opensmtpd-6.8.0_p2-implicit-function-declaration.patch
 
b/mail-mta/opensmtpd/files/opensmtpd-6.8.0_p2-implicit-function-declaration.patch
new file mode 100644
index ..11af2aa7630c
--- /dev/null
+++ 
b/mail-mta/opensmtpd/files/opensmtpd-6.8.0_p2-implicit-function-declaration.patch
@@ -0,0 +1,303 @@
+https://github.com/OpenSMTPD/OpenSMTPD/pull/1195
+https://bugs.gentoo.org/727260
+https://bugs.gentoo.org/896050
+https://bugs.gentoo.org/899876
+
+From 7abe6305f864113aec4c6fc55cccabdc55959252 Mon Sep 17 00:00:00 2001
+From: orbea 
+Date: Thu, 13 Apr 2023 11:04:14 -0700
+Subject: [PATCH] build: Fix -Werror=implicit-function-declaration
+
+On a system with musl these functions are not available, but they are
+found by the build system inside of libbsd instead. However many of the
+relevant headers are never incuded resulting in many implicit function
+declarations. Additionally clang-16 is more strict about these turning
+them into errors.
+
+* While libbsd contains symbols for inet_net_pton() they do not have any
+  headers with the function prototype. Upstream has marked this function
+  for removal since it is now provided in glibc even when musl doesn't
+  have it. This can be fixed by not looking for inet_net_pton() in libbsd.
+---
+ configure.ac| 6 +-
+ openbsd-compat/openbsd-compat.h | 4 +++-
+ usr.sbin/smtpd/aliases.c| 3 +++
+ usr.sbin/smtpd/config.c | 6 ++
+ usr.sbin/smtpd/control.c| 3 +++
+ usr.sbin/smtpd/envelope.c   | 3 +++
+ usr.sbin/smtpd/forward.c| 3 +++
+ usr.sbin/smtpd/mail.maildir.c   | 1 +
+ usr.sbin/smtpd/mda.c| 2 ++
+ usr.sbin/smtpd/mda_variables.c  | 3 +++
+ usr.sbin/smtpd/mta_session.c| 3 +++
+ usr.sbin/smtpd/parse.y  | 3 +++
+ usr.sbin/smtpd/smtp_session.c   | 2 ++
+ usr.sbin/smtpd/ssl.c| 6 ++
+ usr.sbin/smtpd/table.c  | 3 +++
+ usr.sbin/smtpd/to.c | 3 +++
+ usr.sbin/smtpd/util.c   | 3 +++
+ 17 files changed, 55 insertions(+), 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index c215f3bf..cf6fa675 100644
+--- a/configure.ac
 b/configure.ac
+@@ -119,6 +119,10 @

[gentoo-commits] repo/gentoo:master commit in: mail-mta/opensmtpd/files/, mail-mta/opensmtpd/

2020-01-29 Thread Jason A. Donenfeld
commit: fabf7b6f4a9b8240f1ae4cef4dde4a2300722c9c
Author: Jason A. Donenfeld  gentoo  org>
AuthorDate: Wed Jan 29 08:51:03 2020 +
Commit: Jason A. Donenfeld  gentoo  org>
CommitDate: Wed Jan 29 08:51:26 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fabf7b6f

mail-mta/opensmtpd: bump for security disaster

Package-Manager: Portage-2.3.84, Repoman-2.3.20
Signed-off-by: Jason A. Donenfeld  gentoo.org>

 .../files/opensmtpd-6.0.3_p1-security-fixes.patch  | 91 ++
 ...3_p1-r1.ebuild => opensmtpd-6.0.3_p1-r2.ebuild} |  3 +-
 2 files changed, 93 insertions(+), 1 deletion(-)

diff --git a/mail-mta/opensmtpd/files/opensmtpd-6.0.3_p1-security-fixes.patch 
b/mail-mta/opensmtpd/files/opensmtpd-6.0.3_p1-security-fixes.patch
new file mode 100644
index 000..58f3ed8c38b
--- /dev/null
+++ b/mail-mta/opensmtpd/files/opensmtpd-6.0.3_p1-security-fixes.patch
@@ -0,0 +1,91 @@
+diff -ru OpenSMTPD-opensmtpd-6.0.3/smtpd/mta_session.c 
OpenSMTPD-opensmtpd-6.0.3-fixed/smtpd/mta_session.c
+--- OpenSMTPD-opensmtpd-6.0.3/smtpd/mta_session.c  2018-01-04 
23:24:01.0 +0100
 OpenSMTPD-opensmtpd-6.0.3-fixed/smtpd/mta_session.c2020-01-29 
09:47:24.607457717 +0100
+@@ -1290,40 +1290,20 @@
+   break;
+ 
+   case IO_ERROR:
++  case IO_TLSERROR:
+   log_debug("debug: mta: %p: IO error: %s", s, io_error(io));
+-  if (!s->ready) {
+-  mta_error(s, "IO Error: %s", io_error(io));
+-  mta_connect(s);
+-  break;
+-  }
+-  else if (!(s->flags & 
(MTA_FORCE_TLS|MTA_FORCE_SMTPS|MTA_FORCE_ANYSSL))) {
+-  /* error in non-strict SSL negotiation, downgrade to 
plain */
+-  if (s->flags & MTA_TLS) {
+-  log_info("smtp-out: Error on session %016"PRIx64
+-  ": opportunistic TLS failed, "
+-  "downgrading to plain", s->id);
+-  s->flags &= ~MTA_TLS;
+-  s->flags |= MTA_DOWNGRADE_PLAIN;
+-  mta_connect(s);
+-  break;
+-  }
+-  }
+-  mta_error(s, "IO Error: %s", io_error(io));
+-  mta_free(s);
+-  break;
+ 
+-  case IO_TLSERROR:
+-  log_debug("debug: mta: %p: TLS IO error: %s", s, io_error(io));
+-  if (!(s->flags & 
(MTA_FORCE_TLS|MTA_FORCE_SMTPS|MTA_FORCE_ANYSSL))) {
++  if (s->state == MTA_STARTTLS && s->use_smtp_tls) {
+   /* error in non-strict SSL negotiation, downgrade to 
plain */
+-  log_info("smtp-out: TLS Error on session %016"PRIx64
+-  ": TLS failed, "
++  log_info("smtp-out: Error on session %016"PRIx64
++  ": opportunistic TLS failed, "
+   "downgrading to plain", s->id);
+   s->flags &= ~MTA_TLS;
+   s->flags |= MTA_DOWNGRADE_PLAIN;
+   mta_connect(s);
+   break;
+   }
++
+   mta_error(s, "IO Error: %s", io_error(io));
+   mta_free(s);
+   break;
+diff -ru OpenSMTPD-opensmtpd-6.0.3/smtpd/smtp_session.c 
OpenSMTPD-opensmtpd-6.0.3-fixed/smtpd/smtp_session.c
+--- OpenSMTPD-opensmtpd-6.0.3/smtpd/smtp_session.c 2018-01-04 
23:24:01.0 +0100
 OpenSMTPD-opensmtpd-6.0.3-fixed/smtpd/smtp_session.c   2020-01-29 
09:47:24.610791335 +0100
+@@ -2004,25 +2004,23 @@
+   memmove(maddr->user, p, strlen(p) + 1);
+   }
+ 
+-  if (!valid_localpart(maddr->user) ||
+-  !valid_domainpart(maddr->domain)) {
+-  /* accept empty return-path in MAIL FROM, required for bounces 
*/
+-  if (mailfrom && maddr->user[0] == '\0' && maddr->domain[0] == 
'\0')
+-  return (1);
++  /* accept empty return-path in MAIL FROM, required for bounces */
++  if (mailfrom && maddr->user[0] == '\0' && maddr->domain[0] == '\0')
++  return (1);
+ 
+-  /* no user-part, reject */
+-  if (maddr->user[0] == '\0')
+-  return (0);
+-
+-  /* no domain, local user */
+-  if (maddr->domain[0] == '\0') {
+-  (void)strlcpy(maddr->domain, domain,
+-  sizeof(maddr->domain));
+-  return (1);
+-  }
++  /* no or invalid user-part, reject */
++  if (maddr->user[0] == '\0' || !valid_localpart(maddr->user))
+   return (0);
++
++  /* no domain part, local user */
++  if (maddr->domain[0] == '\0') {
++  (void)strlcpy(maddr->domain, domain,
++  sizeof(maddr->domain));
+   }
+ 
++  if

[gentoo-commits] repo/gentoo:master commit in: mail-mta/opensmtpd/files/, mail-mta/opensmtpd/

2019-01-02 Thread Jason A. Donenfeld
commit: 84dd7ff3292161696670435a2e1bda4dc2091cbd
Author: Jason A. Donenfeld  gentoo  org>
AuthorDate: Wed Jan  2 19:07:17 2019 +
Commit: Jason A. Donenfeld  gentoo  org>
CommitDate: Wed Jan  2 19:11:04 2019 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=84dd7ff3

mail-mta/opensmtpd: port to openssl 1.1

Package-Manager: Portage-2.3.53, Repoman-2.3.12
Signed-off-by: Jason A. Donenfeld  gentoo.org>

 .../opensmtpd-6.0.3_p1-fix-crash-on-auth.patch |  43 ++
 .../files/opensmtpd-6.0.3_p1-openssl_1.1.patch | 722 +
 0.3_p1.ebuild => opensmtpd-6.0.3_p1-r1.ebuild} |   6 +-
 3 files changed, 770 insertions(+), 1 deletion(-)

diff --git 
a/mail-mta/opensmtpd/files/opensmtpd-6.0.3_p1-fix-crash-on-auth.patch 
b/mail-mta/opensmtpd/files/opensmtpd-6.0.3_p1-fix-crash-on-auth.patch
new file mode 100644
index 000..c20b5e0a0ef
--- /dev/null
+++ b/mail-mta/opensmtpd/files/opensmtpd-6.0.3_p1-fix-crash-on-auth.patch
@@ -0,0 +1,43 @@
+From 9b5f70b93e038df5446bd37a4adac5a0380748e7 Mon Sep 17 00:00:00 2001
+From: johannes 
+Date: Wed, 21 Feb 2018 23:57:11 +0100
+Subject: [PATCH] crypt_checkpass: include HAVE_CRYPT_H definition, add NULL
+ check
+
+---
+ openbsd-compat/crypt_checkpass.c | 9 -
+ 1 file changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/openbsd-compat/crypt_checkpass.c 
b/openbsd-compat/crypt_checkpass.c
+index dafd2dae..d10b3a57 100644
+--- a/openbsd-compat/crypt_checkpass.c
 b/openbsd-compat/crypt_checkpass.c
+@@ -1,5 +1,6 @@
+ /* OPENBSD ORIGINAL: lib/libc/crypt/cryptutil.c */
+ 
++#include "includes.h"
+ #include 
+ #ifdef HAVE_CRYPT_H
+ #include 
+@@ -10,6 +11,8 @@
+ int
+ crypt_checkpass(const char *pass, const char *goodhash)
+ {
++  char *c;
++
+   if (goodhash == NULL)
+   goto fail;
+ 
+@@ -17,7 +20,11 @@ crypt_checkpass(const char *pass, const char *goodhash)
+   if (strlen(goodhash) == 0 && strlen(pass) == 0)
+   return 0;
+ 
+-  if (strcmp(crypt(pass, goodhash), goodhash) == 0)
++  c = crypt(pass, goodhash);
++  if (c == NULL)
++  goto fail;
++
++  if (strcmp(c, goodhash) == 0)
+   return 0;
+ 
+ fail:

diff --git a/mail-mta/opensmtpd/files/opensmtpd-6.0.3_p1-openssl_1.1.patch 
b/mail-mta/opensmtpd/files/opensmtpd-6.0.3_p1-openssl_1.1.patch
new file mode 100644
index 000..40a62ae9251
--- /dev/null
+++ b/mail-mta/opensmtpd/files/opensmtpd-6.0.3_p1-openssl_1.1.patch
@@ -0,0 +1,722 @@
+Description: Enable support for OpenSSL 1.1
+Author: Sebastian Andrzej Siewior 
+Ryan Kavanagh 
+Origin: Debian
+Bug: https://github.com/OpenSMTPD/OpenSMTPD/issues/738
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=859544
+Forwarded: https://github.com/OpenSMTPD/OpenSMTPD/pull/825
+Last-Update: 2018-03-18
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+diff --git a/openbsd-compat/libressl.c b/openbsd-compat/libressl.c
+index f4f2b52e..d06e006f 100644
+--- a/openbsd-compat/libressl.c
 b/openbsd-compat/libressl.c
+@@ -81,14 +81,14 @@ SSL_CTX_use_certificate_chain(SSL_CTX *ctx, char *buf, 
off_t len)
+   x = ca = NULL;
+ 
+   if ((in = BIO_new_mem_buf(buf, len)) == NULL) {
+-  SSLerr(SSL_F_SSL_CTX_USE_CERTIFICATE_CHAIN_FILE, ERR_R_BUF_LIB);
++  SSLerr(SSL_F_SSL_CTX_USE_CERTIFICATE_FILE, ERR_R_BUF_LIB);
+   goto end;
+   }
+ 
+   if ((x = PEM_read_bio_X509(in, NULL,
+-  ctx->default_passwd_callback,
+-  ctx->default_passwd_callback_userdata)) == NULL) {
+-  SSLerr(SSL_F_SSL_CTX_USE_CERTIFICATE_CHAIN_FILE, ERR_R_PEM_LIB);
++  SSL_CTX_get_default_passwd_cb(ctx),
++  SSL_CTX_get_default_passwd_cb_userdata(ctx))) == NULL) {
++  SSLerr(SSL_F_SSL_CTX_USE_CERTIFICATE_FILE, ERR_R_PEM_LIB);
+   goto end;
+   }
+ 
+@@ -99,14 +99,11 @@ SSL_CTX_use_certificate_chain(SSL_CTX *ctx, char *buf, 
off_t len)
+* the CA certificates.
+*/
+ 
+-  if (ctx->extra_certs != NULL) {
+-  sk_X509_pop_free(ctx->extra_certs, X509_free);
+-  ctx->extra_certs = NULL;
+-  }
++  SSL_CTX_clear_extra_chain_certs(ctx);
+ 
+   while ((ca = PEM_read_bio_X509(in, NULL,
+-  ctx->default_passwd_callback,
+-  ctx->default_passwd_callback_userdata)) != NULL) {
++  SSL_CTX_get_default_passwd_cb(ctx),
++  SSL_CTX_get_default_passwd_cb_userdata(ctx))) != NULL) {
+ 
+   if (!SSL_CTX_add_extra_chain_cert(ctx, ca))
+   goto end;
+diff --git a/smtpd/ca.c b/smtpd/ca.c
+index e383c6a1..29a44b9b 100644
+--- a/smtpd/ca.c
 b/smtpd/ca.c
+@@ -170,6 +170,190 @@ ca_verify_cb(int ok, X509_STORE_CTX *ctx)
+   return ok;
+ }
+ 
++#if (OPENSSL_VERSION_NUMBER < 0x1010L) || defined(LIBRESSL_VERSION_NUMBER)
++
++static int RSA_meth_get_flags(RSA_METHOD 

[gentoo-commits] repo/gentoo:master commit in: mail-mta/opensmtpd/files/, net-libs/libasr/, mail-mta/opensmtpd/

2018-10-30 Thread Jason Donenfeld
commit: 7bbc2084f926426b4a69e810c01f5b1f90d1970e
Author: Jason A. Donenfeld  gentoo  org>
AuthorDate: Tue Oct 30 17:54:16 2018 +
Commit: Jason Donenfeld  gentoo  org>
CommitDate: Tue Oct 30 18:54:50 2018 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7bbc2084

mail-mta/opensmtpd: bump ebuilds

Package-Manager: Portage-2.3.51, Repoman-2.3.11
Signed-off-by: Jason A. Donenfeld  gentoo.org>

 mail-mta/opensmtpd/Manifest|   3 +-
 .../files/opensmtpd-6.0.2_p1-autoconf.patch|  46 --
 .../files/opensmtpd-6.0.2_p1-libressl.patch| 101 -
 .../opensmtpd/files/opensmtpd-6.0.2_p1-musl.patch  |  51 ---
 mail-mta/opensmtpd/opensmtpd-6.0.2_p1-r2.ebuild|  98 
 0.2_p1-r1.ebuild => opensmtpd-6.0.3_p1.ebuild} |  24 ++---
 ...d-6.0.2_p1.ebuild => opensmtpd-6.4.0_p1.ebuild} |  26 ++
 net-libs/libasr/Manifest   |   2 -
 net-libs/libasr/libasr-1.0.1.201505061057.ebuild   |  20 
 net-libs/libasr/libasr-1.0.1.ebuild|  16 
 10 files changed, 17 insertions(+), 370 deletions(-)

diff --git a/mail-mta/opensmtpd/Manifest b/mail-mta/opensmtpd/Manifest
index 44fdee8bd41..7ade143bda4 100644
--- a/mail-mta/opensmtpd/Manifest
+++ b/mail-mta/opensmtpd/Manifest
@@ -1 +1,2 @@
-DIST opensmtpd-6.0.2p1.tar.gz 695513 BLAKE2B 
ad048364943c3abd3e0f40b06bc77831c91b8d1bfe8bc95753a0c5e5add4eacf6288aa7c7613a07979b04c0d34fad4f26e65cba8cbe3a060c9d8dbca734b75e7
 SHA512 
1e4275795dd2c43174ffa268398a0d9864ce4cb7d370330f7b8c55a9b40e757616bbd280919a409ebde403769e3dea62047857dc2ff98d7ecce660b459c7ff1c
+DIST opensmtpd-6.0.3p1.tar.gz 699702 BLAKE2B 
49f08e8329adc049a562b6ef7efa4c0a39cbcfe8a158cb905cfc726a7302ffe9833ccfb52041340767d55d0f2ae2087e8eac92b7359016c6c76b4d963a334558
 SHA512 
e579818a0ddbe637deb5a4e40f43eaf797783903ceac18fd89a57581b135b9e407d424e1a70ff7b4b06a0ee50bafb6e8ab2451371917887904b06ff1b55d320f
+DIST opensmtpd-6.4.0p1.tar.gz 718638 BLAKE2B 
23c1c286a865efcbd16461ec8930f5325a6e164a58ceb7bbe0feb9088bcf615b7fd7e2eb6820bcde161864c476087b39c289c75ea5ca0b18c46710f9723b3dd7
 SHA512 
c60dbac857925041769104adae33393f526a328767e19bc78d06e45a13b7dd50f3eefdaa3811b8da330c24a670e98da74e18af5ac486266dade6255a6f3b5135

diff --git a/mail-mta/opensmtpd/files/opensmtpd-6.0.2_p1-autoconf.patch 
b/mail-mta/opensmtpd/files/opensmtpd-6.0.2_p1-autoconf.patch
deleted file mode 100644
index d490a902919..000
--- a/mail-mta/opensmtpd/files/opensmtpd-6.0.2_p1-autoconf.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From 9370e962bfa1032ab16c48c79977536eae665d75 Mon Sep 17 00:00:00 2001
-From: Freddy DISSAUX 
-Date: Sat, 17 Sep 2016 08:50:14 +0200
-Subject: [PATCH] Fix expression, as explain in
-
-https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.69/html_node/Generic-Declarations.html#Generic-Declarations
-
-"Unlike the other `AC_CHECK_*S' macros, when a symbol is not
-declared, HAVE_DECL_symbol is defined to `0' instead of
-leaving HAVE_DECL_symbol undeclared."

- openbsd-compat/defines.h| 2 +-
- openbsd-compat/openbsd-compat.h | 4 ++--
- 2 files changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/openbsd-compat/defines.h b/openbsd-compat/defines.h
-index 0a94d76..bda39e9 100644
 a/openbsd-compat/defines.h
-+++ b/openbsd-compat/defines.h
-@@ -85,7 +85,7 @@
- # define STDERR_FILENO   2
- #endif
- 
--#if defined(HAVE_DECL_O_NONBLOCK) && HAVE_DECL_O_NONBLOCK == 0
-+#if !HAVE_DECL_O_NONBLOCK
- # define O_NONBLOCK  4/* Non Blocking Open */
- #endif
- 
-diff --git a/openbsd-compat/openbsd-compat.h b/openbsd-compat/openbsd-compat.h
-index fd931d0..1ef2925 100644
 a/openbsd-compat/openbsd-compat.h
-+++ b/openbsd-compat/openbsd-compat.h
-@@ -212,11 +212,11 @@ void errc(int, int, const char *, ...);
- #define pledge(promises, paths) 0
- #endif
- 
--#ifndef HAVE_DECL_AF_LOCAL
-+#if !HAVE_DECL_AF_LOCAL
- #define AF_LOCAL AF_UNIX
- #endif
- 
--#ifndef HAVE_DECL_WAIT_MYPGRP
-+#if !HAVE_DECL_WAIT_MYPGRP
- #define WAIT_MYPGRP 0
- #endif
- 

diff --git a/mail-mta/opensmtpd/files/opensmtpd-6.0.2_p1-libressl.patch 
b/mail-mta/opensmtpd/files/opensmtpd-6.0.2_p1-libressl.patch
deleted file mode 100644
index e1656b94040..000
--- a/mail-mta/opensmtpd/files/opensmtpd-6.0.2_p1-libressl.patch
+++ /dev/null
@@ -1,101 +0,0 @@
-From f948b923873a93472dea9b786cf60a3472b0ddc8 Mon Sep 17 00:00:00 2001
-From: Samuel Holland 
-Date: Wed, 11 Jan 2017 17:35:29 -0600
-Subject: [PATCH] fix compatibility with libressl
-
-These functions are exported by libcrypto from libressl, due to its
-similar OpenBSD compatibility layer, but they are not present in any
-header files. Thus, while we can use the existing compiled function,
-and do not need to provide our own, we do need to provide the prototype
-for it.
-
-This avoids implicit function declarations and the resulting crashes due
-to pointer truncation.
-
-The patch is based on an equivalent patch for OpenSSH

[gentoo-commits] repo/gentoo:master commit in: mail-mta/opensmtpd/files/, mail-mta/opensmtpd/

2017-04-12 Thread Jason Donenfeld
commit: 8a8806e399ae2045c5946bdabc203d67208d
Author: Samuel Holland  sholland  org>
AuthorDate: Wed Jan 11 23:19:19 2017 +
Commit: Jason Donenfeld  gentoo  org>
CommitDate: Wed Apr 12 14:05:23 2017 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8a8806e3

mail-mta/opensmtpd: revbump to fix libressl and musl

One patch is a backport from upstream. The other two have been submitted
upstream as pull requests.

Gentoo-Bug: 598822
Fixes: #3438

 .../files/opensmtpd-6.0.2_p1-autoconf.patch|  46 ++
 .../files/opensmtpd-6.0.2_p1-libressl.patch| 101 +
 .../opensmtpd/files/opensmtpd-6.0.2_p1-musl.patch  |  51 +++
 mail-mta/opensmtpd/opensmtpd-6.0.2_p1-r2.ebuild|  98 
 4 files changed, 296 insertions(+)

diff --git a/mail-mta/opensmtpd/files/opensmtpd-6.0.2_p1-autoconf.patch 
b/mail-mta/opensmtpd/files/opensmtpd-6.0.2_p1-autoconf.patch
new file mode 100644
index 000..d490a902919
--- /dev/null
+++ b/mail-mta/opensmtpd/files/opensmtpd-6.0.2_p1-autoconf.patch
@@ -0,0 +1,46 @@
+From 9370e962bfa1032ab16c48c79977536eae665d75 Mon Sep 17 00:00:00 2001
+From: Freddy DISSAUX 
+Date: Sat, 17 Sep 2016 08:50:14 +0200
+Subject: [PATCH] Fix expression, as explain in
+
+https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.69/html_node/Generic-Declarations.html#Generic-Declarations
+
+"Unlike the other `AC_CHECK_*S' macros, when a symbol is not
+declared, HAVE_DECL_symbol is defined to `0' instead of
+leaving HAVE_DECL_symbol undeclared."
+---
+ openbsd-compat/defines.h| 2 +-
+ openbsd-compat/openbsd-compat.h | 4 ++--
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/openbsd-compat/defines.h b/openbsd-compat/defines.h
+index 0a94d76..bda39e9 100644
+--- a/openbsd-compat/defines.h
 b/openbsd-compat/defines.h
+@@ -85,7 +85,7 @@
+ # define STDERR_FILENO   2
+ #endif
+ 
+-#if defined(HAVE_DECL_O_NONBLOCK) && HAVE_DECL_O_NONBLOCK == 0
++#if !HAVE_DECL_O_NONBLOCK
+ # define O_NONBLOCK  4/* Non Blocking Open */
+ #endif
+ 
+diff --git a/openbsd-compat/openbsd-compat.h b/openbsd-compat/openbsd-compat.h
+index fd931d0..1ef2925 100644
+--- a/openbsd-compat/openbsd-compat.h
 b/openbsd-compat/openbsd-compat.h
+@@ -212,11 +212,11 @@ void errc(int, int, const char *, ...);
+ #define pledge(promises, paths) 0
+ #endif
+ 
+-#ifndef HAVE_DECL_AF_LOCAL
++#if !HAVE_DECL_AF_LOCAL
+ #define AF_LOCAL AF_UNIX
+ #endif
+ 
+-#ifndef HAVE_DECL_WAIT_MYPGRP
++#if !HAVE_DECL_WAIT_MYPGRP
+ #define WAIT_MYPGRP 0
+ #endif
+ 

diff --git a/mail-mta/opensmtpd/files/opensmtpd-6.0.2_p1-libressl.patch 
b/mail-mta/opensmtpd/files/opensmtpd-6.0.2_p1-libressl.patch
new file mode 100644
index 000..e1656b94040
--- /dev/null
+++ b/mail-mta/opensmtpd/files/opensmtpd-6.0.2_p1-libressl.patch
@@ -0,0 +1,101 @@
+From f948b923873a93472dea9b786cf60a3472b0ddc8 Mon Sep 17 00:00:00 2001
+From: Samuel Holland 
+Date: Wed, 11 Jan 2017 17:35:29 -0600
+Subject: [PATCH] fix compatibility with libressl
+
+These functions are exported by libcrypto from libressl, due to its
+similar OpenBSD compatibility layer, but they are not present in any
+header files. Thus, while we can use the existing compiled function,
+and do not need to provide our own, we do need to provide the prototype
+for it.
+
+This avoids implicit function declarations and the resulting crashes due
+to pointer truncation.
+
+The patch is based on an equivalent patch for OpenSSH from
+https://bugzilla.mindrot.org/show_bug.cgi?id=2465
+Also see
+https://github.com/libressl-portable/portable/issues/109
+
+Fixes #691
+---
+ openbsd-compat/defines.h|  9 -
+ openbsd-compat/openbsd-compat.h | 25 +++--
+ 2 files changed, 15 insertions(+), 19 deletions(-)
+
+diff --git a/openbsd-compat/defines.h b/openbsd-compat/defines.h
+index 2cbfbca..3ffcc81 100644
+--- a/openbsd-compat/defines.h
 b/openbsd-compat/defines.h
+@@ -422,15 +422,6 @@ typedef uint16_t  in_port_t;
+ #define INET6_ADDRSTRLEN 46
+ #endif
+ 
+-/*
+- * Platforms that have arc4random_uniform() and not arc4random_stir()
+- * shouldn't need the latter.
+- */
+-#if defined(HAVE_ARC4RANDOM) && defined(HAVE_ARC4RANDOM_UNIFORM) && \
+-!defined(HAVE_ARC4RANDOM_STIR)
+-# define arc4random_stir()
+-#endif
+-
+ #ifndef HAVE_VA_COPY
+ # ifdef HAVE___VA_COPY
+ #  define va_copy(dest, src) __va_copy(dest, src)
+diff --git a/openbsd-compat/openbsd-compat.h b/openbsd-compat/openbsd-compat.h
+index a51385b..51f33bb 100644
+--- a/openbsd-compat/openbsd-compat.h
 b/openbsd-compat/openbsd-compat.h
+@@ -119,20 +119,25 @@ int  BSDoptind;  /* index into parent 
argv vector */
+ int getpeereid(int , uid_t *, gid_t *);
+ #endif 
+ 
+-#ifdef HAVE_ARC4RANDOM
+-# ifndef HAVE_ARC4RANDOM_STIR
+-#  define arc4random_stir()
+-# endif
+-#else
++#if !defined(HAVE_ARC4RANDOM) || defined(LIBRESSL_VERSION_NUMBER)
+ unsigned int arc4random(void);
++#en

[gentoo-commits] repo/gentoo:master commit in: mail-mta/opensmtpd/files/, mail-mta/opensmtpd/

2016-06-25 Thread Jason Donenfeld
commit: 5f4012dfa79841e434eaac595d78759ce8f56bfa
Author: Jason A. Donenfeld  gentoo  org>
AuthorDate: Sat Jun 25 14:54:08 2016 +
Commit: Jason Donenfeld  gentoo  org>
CommitDate: Sat Jun 25 14:55:27 2016 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5f4012df

mail-mta/opensmtpd: snapshot version bump

Package-Manager: portage-2.3.0_rc1

 mail-mta/opensmtpd/Manifest|  2 +-
 ...smtpd-5.9.2.201606071034_p1-ipv6-net-pton.patch | 50 
 .../opensmtpd-5.9.2.201606071034_p1-r1.ebuild  | 94 --
 ...uild => opensmtpd-5.9.2.201606220754_p1.ebuild} |  0
 4 files changed, 1 insertion(+), 145 deletions(-)

diff --git a/mail-mta/opensmtpd/Manifest b/mail-mta/opensmtpd/Manifest
index 0ddb06a..8af3860 100644
--- a/mail-mta/opensmtpd/Manifest
+++ b/mail-mta/opensmtpd/Manifest
@@ -1,3 +1,3 @@
 DIST opensmtpd-201606071034p1.tar.gz 692683 SHA256 
e4a63195cb67fd705bc0ddfc3b7bcaff63b16ec141782fff1f5056050b1ad3f3 SHA512 
5cb40279222a7fd610bc40ab20f28cc5d638497815a6c25b0dcae6ee1ffd0e1d35a9942c853cca4970e34a9ffb91f419e8c245bbcbbd9487e6128af8969569cb
 WHIRLPOOL 
e644854a6341fb962006d4b33522a9a3f22e8b4a6dc7d636cd34c854878d4c067577caecc24b4f95b5ff8fd467cf086df5fcee4cffcc00b8c237f2a91b5c98af
-DIST opensmtpd-201606152203p1.tar.gz 692715 SHA256 
f91a91a6936bd634ba0643dea91b189d454b03d3c454f38f365bf73921aaf222 SHA512 
3573424d7ac32ad2061c8c46a947377825c907368d060d14b16a886e46de90ce3b11b4be097bce692fce86f54072133a39d9644566a1e10e33d7a21bccf08f0f
 WHIRLPOOL 
1fa23b57ef2700d4c21cc60ee37083afeb0270749db65a18eebf69f9ad72e0c38e1ec7aa27c5ee5e88bfeff0855ce4d39860cc431867febdaf97d0fbd1b4b6b6
+DIST opensmtpd-201606220754p1.tar.gz 692879 SHA256 
4057ab61396b0a9de50fb2087aac3997757fa95f49de5d71db3a8ad49a9ae163 SHA512 
33eba331d2dcbdf00e69f213b17175ad378108a7e8344e379a042bc6308300eda9c0d16cf15617beda003938b806937575ccad579113bc978877c212e87d3089
 WHIRLPOOL 
a6f446fbfdec7ad017e9347ae0a452ab6d1e9f4dbb775acc781022c226c9423aa43aa5dd8f79726d5d202fe6d93cca94077a987817425c283c5f3337a7440b09
 DIST opensmtpd-5.9.2p1.tar.gz 681855 SHA256 
3522f273c1630c781facdb2b921228e338ed4e651909316735df775d6a70a71d SHA512 
99ca15101557848aa6d642f0c0171b152d805192e6839a97410b19431c981a21a5c0dc011e2c8cd91f3e6f6acb37a77f0f4c8e68114bf9808240392fe2b5d375
 WHIRLPOOL 
4d50474eb9f845633d152c065a0e70f3d41fba97134b33d3eb5164d39bdc58eeb4133b2f951a1815143a468144fb631f5f0b2960f57e7ba18a65321413fb5b6f

diff --git 
a/mail-mta/opensmtpd/files/opensmtpd-5.9.2.201606071034_p1-ipv6-net-pton.patch 
b/mail-mta/opensmtpd/files/opensmtpd-5.9.2.201606071034_p1-ipv6-net-pton.patch
deleted file mode 100644
index 9841a7e..000
--- 
a/mail-mta/opensmtpd/files/opensmtpd-5.9.2.201606071034_p1-ipv6-net-pton.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From 988cff352d6b3dd5fe3224d7ebce361fca5c0b4f Mon Sep 17 00:00:00 2001
-From: gilles 
-Date: Wed, 8 Jun 2016 08:23:02 +0200
-Subject: [PATCH] on systems with a broken inet_net_pton() that does not
- support IPv6, fallback to broken_net_inet_pton_ipv6() when errno ==
- EAFNOSUPPORT
-

- smtpd/to.c | 14 ++
- 1 file changed, 10 insertions(+), 4 deletions(-)
-
-diff --git a/smtpd/to.c b/smtpd/to.c
-index 4a6a765..4b592be 100644
 a/smtpd/to.c
-+++ b/smtpd/to.c
-@@ -60,7 +60,7 @@ static int alias_is_filename(struct expandnode *, const char 
*, size_t);
- static int alias_is_include(struct expandnode *, const char *, size_t);
- static int alias_is_error(struct expandnode *, const char *, size_t);
- 
--static int temp_inet_net_pton_ipv6(const char *, void *, size_t);
-+static int broken_inet_net_pton_ipv6(const char *, void *, size_t);
- 
- const char *
- sockaddr_to_text(struct sockaddr *sa)
-@@ -301,8 +301,14 @@ text_to_netaddr(struct netaddr *netaddr, const char *s)
-   } else {
-   bits = inet_net_pton(AF_INET6, s, &ssin6.sin6_addr,
-   sizeof(struct in6_addr));
--  if (bits == -1)
--  return 0;
-+  if (bits == -1) {
-+  if (errno != EAFNOSUPPORT)
-+  return 0;
-+  bits = broken_inet_net_pton_ipv6(s, &ssin6.sin6_addr,
-+  sizeof(struct in6_addr));
-+  if (bits == -1)
-+  return 0;
-+  }
-   ssin6.sin6_family = AF_INET6;
-   memcpy(&ss, &ssin6, sizeof(ssin6));
- #ifdef HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN
-@@ -896,7 +902,7 @@ alias_is_error(struct expandnode *alias, const char *line, 
size_t len)
- }
- 
- static int
--temp_inet_net_pton_ipv6(const char *src, void *dst, size_t size)
-+broken_inet_net_pton_ipv6(const char *src, void *dst, size_t size)
- {
-   int ret;
-   int bits;

diff --git a/mail-mta/opensmtpd/opensmtpd-5.9.2.201606071034_p1-r1.ebuild 
b/mail-mta/opensmtpd/opensmtpd-5.9.2.201606071034_p1-r1.ebuild
deleted file mode 100644
index bec67bd..000
--- a/mail-mta/opensmtpd

[gentoo-commits] repo/gentoo:master commit in: mail-mta/opensmtpd/files/

2016-06-08 Thread Jason Donenfeld
commit: 75cc291bf7ab80a7aae9911f818ed111c3f85b3c
Author: Jason A. Donenfeld  gentoo  org>
AuthorDate: Wed Jun  8 08:10:46 2016 +
Commit: Jason Donenfeld  gentoo  org>
CommitDate: Wed Jun  8 08:10:46 2016 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=75cc291b

mail-mta/opensmtpd: remove old patches

 ...d-5.7.3p2-libressl-arc4random-circularity.patch | 35 --
 1 file changed, 35 deletions(-)

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
deleted file mode 100644
index 7c35862..000
--- 
a/mail-mta/opensmtpd/files/opensmtpd-5.7.3p2-libressl-arc4random-circularity.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-diff -ru opensmtpd-5.7.3p2/openbsd-compat/arc4random.c 
opensmtpd-5.7.3p2-fixed/openbsd-compat/arc4random.c
 opensmtpd-5.7.3p2/openbsd-compat/arc4random.c  2016-02-02 
08:40:06.0 +0100
-+++ opensmtpd-5.7.3p2-fixed/openbsd-compat/arc4random.c2016-03-02 
17:34:24.535030362 +0100
-@@ -188,6 +188,7 @@
-   _ARC4_UNLOCK();
- }
- 
-+#if 0
- u_int32_t
- arc4random(void)
- {
-@@ -198,12 +199,13 @@
-   _ARC4_UNLOCK();
-   return val;
- }
-+#endif
- 
- /*
-  * If we are providing arc4random, then we can provide a more efficient 
-  * arc4random_buf().
-  */
--# ifndef HAVE_ARC4RANDOM_BUF
-+#if 0
- void
- arc4random_buf(void *buf, size_t n)
- {
-@@ -215,7 +217,7 @@
- #endif /* !HAVE_ARC4RANDOM */
- 
- /* arc4random_buf() that uses platform arc4random() */
--#if !defined(HAVE_ARC4RANDOM_BUF) && defined(HAVE_ARC4RANDOM)
-+#if 0
- void
- arc4random_buf(void *_buf, size_t n)
- {



[gentoo-commits] repo/gentoo:master commit in: mail-mta/opensmtpd/files/

2016-06-07 Thread Jason Donenfeld
commit: 329b8d12e35936429586c2f34ee1cd0e056258d5
Author: Jason A. Donenfeld  gentoo  org>
AuthorDate: Tue Jun  7 09:08:14 2016 +
Commit: Jason Donenfeld  gentoo  org>
CommitDate: Tue Jun  7 09:08:14 2016 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=329b8d12

mail-mta/opensmtpd: more robust openrc script

 mail-mta/opensmtpd/files/smtpd.initd | 9 ++---
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/mail-mta/opensmtpd/files/smtpd.initd 
b/mail-mta/opensmtpd/files/smtpd.initd
index 6d254f1..9dd01a7 100644
--- a/mail-mta/opensmtpd/files/smtpd.initd
+++ b/mail-mta/opensmtpd/files/smtpd.initd
@@ -1,17 +1,12 @@
 #!/sbin/openrc-run
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
 command="smtpd"
-start_stop_daemon_args="--pidfile=/run/smtpd.pid"
+pidfile="/run/smtpd.pid"
 description="SMTP daemon from OpenBSD"
 
 depend() {
need net
 }
-stop() {
-   ebegin "Stopping smtpd"
-   smtpctl stop
-   eend $?
-}



[gentoo-commits] repo/gentoo:master commit in: mail-mta/opensmtpd/files/, mail-mta/opensmtpd/

2015-10-05 Thread Jason Donenfeld
commit: 1d914fbcf38e35f7e66c8f0a4c78b903e2f216db
Author: Jason A. Donenfeld  gentoo  org>
AuthorDate: Mon Oct  5 15:10:38 2015 +
Commit: Jason Donenfeld  gentoo  org>
CommitDate: Mon Oct  5 15:11:06 2015 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1d914fbc

mail-mta/opensmtpd: Bump version, with more security fixes, so stablize it too.

Package-Manager: portage-2.2.22
RepoMan-Options: --force

 mail-mta/opensmtpd/Manifest|  2 +-
 .../opensmtpd-5.7.2-remote-header-crash.patch  | 26 --
 7.2_p1-r1.ebuild => opensmtpd-5.7.3_p1.ebuild} |  2 --
 3 files changed, 1 insertion(+), 29 deletions(-)

diff --git a/mail-mta/opensmtpd/Manifest b/mail-mta/opensmtpd/Manifest
index 1e736f2..f33bba9 100644
--- a/mail-mta/opensmtpd/Manifest
+++ b/mail-mta/opensmtpd/Manifest
@@ -1 +1 @@
-DIST opensmtpd-5.7.2p1.tar.gz 708991 SHA256 
daae044488d456b33aa9c84ebcc79aef2f9ab2d17ebe0c0f09e41e1f4b60d992 SHA512 
ef9487ba38711fd2a4076022c8fef89c4daf0aac346a72814a9c17f20f830bcd3cba4d85da53867cbc726d2c10fd6773c907ae533e0e022165d7f4aa3bdf1260
 WHIRLPOOL 
3d5d3fff0f15b898219af62eb4152666120d60d528f3afa99d347be0fcdd58b9fe36694471cd4485d51041de53ee6249f4510e5a0af254794fe7465b8642cd44
+DIST opensmtpd-5.7.3p1.tar.gz 709178 SHA256 
848a3c72dd22b216bb924b69dc356fc297e8b3671ec30856978950208cba74dd SHA512 
e75ed2e148d25716df3af7b6746332c475eb671b91d3832b9a56b11a1e567749065f1332cd06d928cf6bd5122427cd33cc3e0f5f4e2bec0f2269db695be65b7e
 WHIRLPOOL 
191fe5e30f71aa1076434f95b46c1ffbc893ef15d355c485bbb2df503d0af986af6602424ab04f984a9041ca6074cf975289e7708e1362fa483f423a6c1e0d51

diff --git a/mail-mta/opensmtpd/files/opensmtpd-5.7.2-remote-header-crash.patch 
b/mail-mta/opensmtpd/files/opensmtpd-5.7.2-remote-header-crash.patch
deleted file mode 100644
index f9da33b..000
--- a/mail-mta/opensmtpd/files/opensmtpd-5.7.2-remote-header-crash.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-diff --git a/smtpd/filter.c b/smtpd/filter.c
-index 062f00f..8af6eab 100644
 a/smtpd/filter.c
-+++ b/smtpd/filter.c
-@@ -726,7 +726,6 @@ filter_tx_io(struct io *io, int evt)
-   struct filter_session   *s = io->arg;
-   size_t   len, n;
-   char*data;
--  charbuf[65535];
- 
-   log_trace(TRACE_FILTERS, "filter: filter_tx_io(%p, %s)", s, 
io_strevent(evt));
- 
-@@ -734,10 +733,9 @@ filter_tx_io(struct io *io, int evt)
-   case IO_DATAIN:
-   data = iobuf_data(&s->ibuf);
-   len = iobuf_len(&s->ibuf);
--  memmove(buf, data, len);
--  buf[len] = 0;
--  log_trace(TRACE_FILTERS, "filter: filter_tx_io: datain (%zu) 
for req %016"PRIx64": %s",
--  len, s->id, buf);
-+
-+  log_trace(TRACE_FILTERS, "filter: filter_tx_io: datain (%zu) 
for req %016"PRIx64"",
-+  len, s->id);
- 
-   n = fwrite(data, 1, len, s->ofile);
-   if (n != len) {

diff --git a/mail-mta/opensmtpd/opensmtpd-5.7.2_p1-r1.ebuild 
b/mail-mta/opensmtpd/opensmtpd-5.7.3_p1.ebuild
similarity index 97%
rename from mail-mta/opensmtpd/opensmtpd-5.7.2_p1-r1.ebuild
rename to mail-mta/opensmtpd/opensmtpd-5.7.3_p1.ebuild
index deba857..fe35e0f 100644
--- a/mail-mta/opensmtpd/opensmtpd-5.7.2_p1-r1.ebuild
+++ b/mail-mta/opensmtpd/opensmtpd-5.7.3_p1.ebuild
@@ -47,8 +47,6 @@ src_prepare() {
# Use /run instead of /var/run
sed -i -e '/pidfile_path/s:_PATH_VARRUN:"/run/":' 
openbsd-compat/pidfile.c || die
 
-   epatch "${FILESDIR}"/"${PN}"-5.7.2-remote-header-crash.patch
-
epatch_user
eautoreconf
 }



[gentoo-commits] repo/gentoo:master commit in: mail-mta/opensmtpd/files/, mail-mta/opensmtpd/

2015-10-05 Thread Jason Donenfeld
commit: 3f8e2fe24f3ff174d8515b82607e951e054f68f6
Author: Jason A. Donenfeld  gentoo  org>
AuthorDate: Mon Oct  5 08:42:58 2015 +
Commit: Jason Donenfeld  gentoo  org>
CommitDate: Mon Oct  5 08:44:18 2015 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3f8e2fe2

mail-mta/opensmtpd: bump release for urgent security issue

Committing this as stable and removing the old version too, because it's
being exploited in the wild.

Package-Manager: portage-2.2.22

 .../opensmtpd-5.7.2-remote-header-crash.patch  | 26 ++
 7.2_p1.ebuild => opensmtpd-5.7.2_p1-r1.ebuild} |  2 ++
 2 files changed, 28 insertions(+)

diff --git a/mail-mta/opensmtpd/files/opensmtpd-5.7.2-remote-header-crash.patch 
b/mail-mta/opensmtpd/files/opensmtpd-5.7.2-remote-header-crash.patch
new file mode 100644
index 000..f9da33b
--- /dev/null
+++ b/mail-mta/opensmtpd/files/opensmtpd-5.7.2-remote-header-crash.patch
@@ -0,0 +1,26 @@
+diff --git a/smtpd/filter.c b/smtpd/filter.c
+index 062f00f..8af6eab 100644
+--- a/smtpd/filter.c
 b/smtpd/filter.c
+@@ -726,7 +726,6 @@ filter_tx_io(struct io *io, int evt)
+   struct filter_session   *s = io->arg;
+   size_t   len, n;
+   char*data;
+-  charbuf[65535];
+ 
+   log_trace(TRACE_FILTERS, "filter: filter_tx_io(%p, %s)", s, 
io_strevent(evt));
+ 
+@@ -734,10 +733,9 @@ filter_tx_io(struct io *io, int evt)
+   case IO_DATAIN:
+   data = iobuf_data(&s->ibuf);
+   len = iobuf_len(&s->ibuf);
+-  memmove(buf, data, len);
+-  buf[len] = 0;
+-  log_trace(TRACE_FILTERS, "filter: filter_tx_io: datain (%zu) 
for req %016"PRIx64": %s",
+-  len, s->id, buf);
++
++  log_trace(TRACE_FILTERS, "filter: filter_tx_io: datain (%zu) 
for req %016"PRIx64"",
++  len, s->id);
+ 
+   n = fwrite(data, 1, len, s->ofile);
+   if (n != len) {

diff --git a/mail-mta/opensmtpd/opensmtpd-5.7.2_p1.ebuild 
b/mail-mta/opensmtpd/opensmtpd-5.7.2_p1-r1.ebuild
similarity index 97%
rename from mail-mta/opensmtpd/opensmtpd-5.7.2_p1.ebuild
rename to mail-mta/opensmtpd/opensmtpd-5.7.2_p1-r1.ebuild
index fe35e0f..deba857 100644
--- a/mail-mta/opensmtpd/opensmtpd-5.7.2_p1.ebuild
+++ b/mail-mta/opensmtpd/opensmtpd-5.7.2_p1-r1.ebuild
@@ -47,6 +47,8 @@ src_prepare() {
# Use /run instead of /var/run
sed -i -e '/pidfile_path/s:_PATH_VARRUN:"/run/":' 
openbsd-compat/pidfile.c || die
 
+   epatch "${FILESDIR}"/"${PN}"-5.7.2-remote-header-crash.patch
+
epatch_user
eautoreconf
 }