pkgsrc/mail/sendmail/patches/patch-ay
jnemeth 282034c653 Update to sendmail 8.14.9nb1: this is a pkgsrc bugfix update
- remove some HTML cruft from netbsd-proto.mc
- stop trying to set file ownership and group during stage-install
- initialize sm_res earlier and test before calling res_ninit()
- clear SSL_OP_TLSEXT_PADDING by defualt to fix interoperability issues
- eliminate stray call to res_search()
  - verified with nm that all deprecated resolver functions have been eradicated

The above should address the folling PRs:

- PR/47207 - Richard Palo -- attempt to set ownership when unprivileged
- PR/48566 - Emmanuel Dreyfus -- problem with TLS timeouts
- PR/48913 - Matthias Scheler -- attempt to set ownership when unprivileged
2014-06-20 05:24:32 +00:00

63 lines
1.8 KiB
Text

$NetBSD: patch-ay,v 1.2 2014/06/20 05:24:32 jnemeth Exp $
--- sendmail/sm_resolve.c.orig 2014-05-16 20:40:15.000000000 +0000
+++ sendmail/sm_resolve.c
@@ -54,2 +54,6 @@ SM_RCSID("$Id: sm_resolve.c,v 8.40 2013-
+#if NAMED_BIND
+extern struct __res_state sm_res;
+#endif
+
static struct stot
@@ -410,4 +414,4 @@ dns_lookup_int(domain, rr_class, rr_type
{
- old_options = _res.options;
- _res.options |= RES_DEBUG;
+ old_options = sm_res.options;
+ sm_res.options |= RES_DEBUG;
sm_dprintf("dns_lookup(%s, %d, %s)\n", domain,
@@ -417,4 +421,4 @@ dns_lookup_int(domain, rr_class, rr_type
{
- save_retrans = _res.retrans;
- _res.retrans = retrans;
+ save_retrans = sm_res.retrans;
+ sm_res.retrans = retrans;
}
@@ -422,4 +426,4 @@ dns_lookup_int(domain, rr_class, rr_type
{
- save_retry = _res.retry;
- _res.retry = retry;
+ save_retry = sm_res.retry;
+ sm_res.retry = retry;
}
@@ -428,3 +432,7 @@ dns_lookup_int(domain, rr_class, rr_type
reply = (unsigned char *)&reply_buf;
+#if NAMED_RESN
+ len = res_nsearch(&sm_res, domain, rr_class, rr_type, reply, SMRBSIZE);
+#else
len = res_search(domain, rr_class, rr_type, reply, SMRBSIZE);
+#endif
if (len >= SMRBSIZE)
@@ -448,4 +456,9 @@ dns_lookup_int(domain, rr_class, rr_type
else
+#if NAMED_RESN
+ len = res_nsearch(&sm_res, domain, rr_class,
+ rr_type, reply, IP_MAXPACKET);
+#else
len = res_search(domain, rr_class, rr_type,
reply, IP_MAXPACKET);
+#endif
}
@@ -454,3 +467,3 @@ dns_lookup_int(domain, rr_class, rr_type
{
- _res.options = old_options;
+ sm_res.options = old_options;
sm_dprintf("dns_lookup(%s, %d, %s) --> %d\n",
@@ -466,5 +479,5 @@ dns_lookup_int(domain, rr_class, rr_type
if (retrans > 0)
- _res.retrans = save_retrans;
+ sm_res.retrans = save_retrans;
if (retry > 0)
- _res.retry = save_retry;
+ sm_res.retry = save_retry;
return r;