summaryrefslogtreecommitdiff
path: root/mail
diff options
context:
space:
mode:
authormanu <manu@pkgsrc.org>2020-04-24 14:33:08 +0000
committermanu <manu@pkgsrc.org>2020-04-24 14:33:08 +0000
commit599f46a1c2363b467163322c1d03462706421954 (patch)
treeed86c962381dcec9da0fd71cfbfe1b7948942a0c /mail
parentfb8af2de7818c47aea3d6fb6ea3c5f4b0b9bbad5 (diff)
downloadpkgsrc-599f46a1c2363b467163322c1d03462706421954.tar.gz
Bug fix, submitted upstream
Add missing curly brackets that caused res_ninit() to be called with non-zeroed state structure. In NetBSD, res_ninit() detects the mistake and quickly calls res_ndestroy(), which will close file descriptors based on the random data provided in the state structure. The result at mine is sendmail going mute after the MAIL FROM command.
Diffstat (limited to 'mail')
-rw-r--r--mail/sendmail/Makefile4
-rw-r--r--mail/sendmail/distinfo3
-rw-r--r--mail/sendmail/patches/patch-sendmail_domain.c31
3 files changed, 35 insertions, 3 deletions
diff --git a/mail/sendmail/Makefile b/mail/sendmail/Makefile
index a579c871fc9..2e097d19738 100644
--- a/mail/sendmail/Makefile
+++ b/mail/sendmail/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.136 2020/04/12 09:11:41 jnemeth Exp $
+# $NetBSD: Makefile,v 1.137 2020/04/24 14:33:08 manu Exp $
PKGNAME= sendmail-${DIST_VERS}
-PKGREVISION= 8
+PKGREVISION= 9
COMMENT= The well known Mail Transport Agent
CONFLICTS+= courier-mta-[0-9]* fastforward>=0.51nb2 postfix-[0-9]*
diff --git a/mail/sendmail/distinfo b/mail/sendmail/distinfo
index ee91f533a23..02f89e3867b 100644
--- a/mail/sendmail/distinfo
+++ b/mail/sendmail/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.62 2020/04/12 09:11:41 jnemeth Exp $
+$NetBSD: distinfo,v 1.63 2020/04/24 14:33:08 manu Exp $
SHA1 (sendmail.8.15.2.tar.gz) = 5801d4b06f4e38ef228a5954a44d17636eaa5a16
RMD160 (sendmail.8.15.2.tar.gz) = 1fe2210e1ded1fe2ee640fceb1de29f19ceaa8e4
@@ -38,3 +38,4 @@ SHA1 (patch-bo) = d338b035b54f87fc2e786ed85204c565fcc2c140
SHA1 (patch-bp) = 9a1daac264aba6c4fc39a63a464b942dd25b06eb
SHA1 (patch-bq) = 548bf6d373cb49958437548a65803b6f3c6b35d2
SHA1 (patch-br) = 1f0b9716906b91ce2b867bf65e5c06ad16749e36
+SHA1 (patch-sendmail_domain.c) = fafb14fb647d2f1600895aa8dc9464106906b447
diff --git a/mail/sendmail/patches/patch-sendmail_domain.c b/mail/sendmail/patches/patch-sendmail_domain.c
new file mode 100644
index 00000000000..365497d769c
--- /dev/null
+++ b/mail/sendmail/patches/patch-sendmail_domain.c
@@ -0,0 +1,31 @@
+$NetBSD: patch-sendmail_domain.c,v 1.1 2020/04/24 14:33:08 manu Exp $
+
+Add missing curly brackets that caused res_ninit() to be called
+with non-zeroed state structure. In NetBSD, res_ninit() detects
+the mistake and quickly calls res_ndestroy(), which will close file
+descriptors based on the random data provided in the state structure.
+The result at mine is sendmail going mute after the MAIL FROM
+command.
+
+--- sendmail/domain.c.orig
++++ sendmail/domain.c
+@@ -802,17 +802,18 @@
+
+ if (tTd(8, 2))
+ sm_dprintf("dns_getcanonname(%s, trymx=%d)\n", host, trymx);
+
+- if ((sm_res.options & RES_INIT) == 0)
++ if ((sm_res.options & RES_INIT) == 0) {
+ # if NAMED_RESN
+ memset(&sm_res, 0, sizeof(sm_res));
+ if (res_ninit(&sm_res) == -1) {
+ # else
+ if (res_init() == -1) {
+ # endif
+ *statp = EX_UNAVAILABLE;
+ return false;
++ }
+ }
+
+ *statp = EX_OK;
+