summaryrefslogtreecommitdiff
path: root/mail/sendmail/patches/patch-as
blob: e13fc03179b0ce41bd643048fd92cf5182ca67b7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
$NetBSD: patch-as,v 1.2 2021/07/04 07:57:13 jnemeth Exp $

--- sendmail/deliver.c.orig	2020-06-03 05:48:46.000000000 +0000
+++ sendmail/deliver.c
@@ -29,6 +29,10 @@ SM_RCSID("@(#)$Id: deliver.c,v 8.1030 20
 # include "tls.h"
 #endif
 
+#if NAMED_BIND
+extern struct __res_state sm_res;
+#endif
+
 static int	deliver __P((ENVELOPE *, ADDRESS *));
 static void	dup_queue_file __P((ENVELOPE *, ENVELOPE *, int));
 static void	mailfiletimeout __P((int));
@@ -1909,7 +1913,7 @@ deliver(e, firstto)
 
 #if NAMED_BIND
 	if (ConfigLevel < 2)
-		_res.options &= ~(RES_DEFNAMES | RES_DNSRCH);	/* XXX */
+		sm_res.options &= ~(RES_DEFNAMES | RES_DNSRCH);	/* XXX */
 #endif
 
 	if (tTd(11, 1))
@@ -3621,7 +3625,7 @@ do_transfer:
 	}
 #if NAMED_BIND
 	if (ConfigLevel < 2)
-		_res.options |= RES_DEFNAMES | RES_DNSRCH;	/* XXX */
+		sm_res.options |= RES_DEFNAMES | RES_DNSRCH;	/* XXX */
 #endif
 
 	if (tTd(62, 1))
@@ -6017,7 +6021,7 @@ hostsignature(m, host, ad)
 	int hl;
 	char *hp;
 	char *endp;
-	int oldoptions = _res.options;
+	int oldoptions = sm_res.options;
 	char *mxhosts[MAXMXHOSTS + 1];
 	unsigned short mxprefs[MAXMXHOSTS + 1];
 #endif /* NAMED_BIND */
@@ -6087,7 +6091,7 @@ hostsignature(m, host, ad)
 
 #if NAMED_BIND
 	if (ConfigLevel < 2)
-		_res.options &= ~(RES_DEFNAMES | RES_DNSRCH);	/* XXX */
+		sm_res.options &= ~(RES_DEFNAMES | RES_DNSRCH);	/* XXX */
 
 	for (hp = host; hp != NULL; hp = endp)
 	{
@@ -6220,7 +6224,7 @@ hostsignature(m, host, ad)
 	}
 	makelower(s->s_hostsig.hs_sig);
 	if (ConfigLevel < 2)
-		_res.options = oldoptions;
+		sm_res.options = oldoptions;
 #else /* NAMED_BIND */
 	/* not using BIND -- the signature is just the host name */
 	/*