pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mail/sendmail Bug fix, submitted upstream



details:   https://anonhg.NetBSD.org/pkgsrc/rev/6b843d88d137
branches:  trunk
changeset: 428089:6b843d88d137
user:      manu <manu%pkgsrc.org@localhost>
date:      Fri Apr 24 14:33:08 2020 +0000

description:
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:

 mail/sendmail/Makefile                        |   4 +-
 mail/sendmail/distinfo                        |   3 +-
 mail/sendmail/patches/patch-sendmail_domain.c |  31 +++++++++++++++++++++++++++
 3 files changed, 35 insertions(+), 3 deletions(-)

diffs (62 lines):

diff -r 77ce34fbe7f0 -r 6b843d88d137 mail/sendmail/Makefile
--- a/mail/sendmail/Makefile    Fri Apr 24 13:27:48 2020 +0000
+++ b/mail/sendmail/Makefile    Fri Apr 24 14:33:08 2020 +0000
@@ -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 -r 77ce34fbe7f0 -r 6b843d88d137 mail/sendmail/distinfo
--- a/mail/sendmail/distinfo    Fri Apr 24 13:27:48 2020 +0000
+++ b/mail/sendmail/distinfo    Fri Apr 24 14:33:08 2020 +0000
@@ -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-bp) = 9a1daac264aba6c4fc39a63a464b942dd25b06eb
 SHA1 (patch-bq) = 548bf6d373cb49958437548a65803b6f3c6b35d2
 SHA1 (patch-br) = 1f0b9716906b91ce2b867bf65e5c06ad16749e36
+SHA1 (patch-sendmail_domain.c) = fafb14fb647d2f1600895aa8dc9464106906b447
diff -r 77ce34fbe7f0 -r 6b843d88d137 mail/sendmail/patches/patch-sendmail_domain.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/sendmail/patches/patch-sendmail_domain.c     Fri Apr 24 14:33:08 2020 +0000
@@ -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;
+ 



Home | Main Index | Thread Index | Old Index