summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
authordg <dg@FreeBSD.org>1995-01-27 22:14:38 +0000
committerdg <dg@FreeBSD.org>1995-01-27 22:14:38 +0000
commitd8ba1dd95a1b1caec9fe87992d51aeb1daf2a60a (patch)
tree5bd97989621440f2667093e308848cedd5103481 /usr.sbin
parent35d5f9af69a0a67a612d7f96867451c5cf207654 (diff)
downloadFreeBSD-src-d8ba1dd95a1b1caec9fe87992d51aeb1daf2a60a.zip
FreeBSD-src-d8ba1dd95a1b1caec9fe87992d51aeb1daf2a60a.tar.gz
from Matt Day <mday@artisoft.com>:
> So, the problem is hostnamebyanyaddr() assumes that _res is already > initialized to proper values, but this is no longer true as of BIND > 4.9.3. Here is a patch for sendmail 8.6.9 which changes > hostnamebyanyaddr() to make sure res_init() has been called before using > _res.retry. Submitted by: Matt Day <mday@artisoft.com> via Terry Lambert
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/sendmail/src/daemon.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/usr.sbin/sendmail/src/daemon.c b/usr.sbin/sendmail/src/daemon.c
index 293438b..55e5eb6 100644
--- a/usr.sbin/sendmail/src/daemon.c
+++ b/usr.sbin/sendmail/src/daemon.c
@@ -1406,6 +1406,9 @@ hostnamebyanyaddr(sap)
int saveretry;
#if NAMED_BIND
+ /* need to make sure _res.retry is initialized before using it */
+ if ((_res.options & RES_INIT) == 0)
+ res_init();
/* shorten name server timeout to avoid higher level timeouts */
saveretry = _res.retry;
_res.retry = 3;
OpenPOWER on IntegriCloud