summaryrefslogtreecommitdiff
path: root/mail/sendmail/patches/patch-aw
blob: 674f43f09ddc69d2318507cd1c8cacaddb1cd0d8 (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
$NetBSD: patch-aw,v 1.6 2020/04/12 09:11:42 jnemeth Exp $

--- sendmail/readcf.c.orig	2015-06-17 16:51:58.000000000 +0000
+++ sendmail/readcf.c
@@ -20,6 +20,10 @@ SM_RCSID("@(#)$Id: readcf.c,v 8.692 2013
 # include <arpa/inet.h>
 #endif /* NETINET || NETINET6 */
 
+#if NAMED_BIND
+extern struct __res_state sm_res;
+#endif
+
 
 #define SECONDS
 #define MINUTES	* 60
@@ -2910,6 +2914,8 @@ static struct optioninfo
 #endif
 #define O_USECOMPRESSEDIPV6ADDRESSES 0xec
 	{ "UseCompressedIPv6Addresses",	O_USECOMPRESSEDIPV6ADDRESSES, OI_NONE },
+# define O_BLACKLIST	0xf2
+	{ "UseBlacklist",             O_BLACKLIST,    OI_NONE },
 
 	{ NULL,				'\0',		OI_NONE	}
 };
@@ -3318,13 +3324,13 @@ setoption(opt, val, safe, sticky, e)
 			if (rfp->rf_name == NULL)
 				syserr("readcf: I option value %s unrecognized", q);
 			else if (clearmode)
-				_res.options &= ~rfp->rf_bits;
+				sm_res.options &= ~rfp->rf_bits;
 			else
-				_res.options |= rfp->rf_bits;
+				sm_res.options |= rfp->rf_bits;
 		}
 		if (tTd(8, 2))
 			sm_dprintf("_res.options = %x, HasWildcardMX = %d\n",
-				   (unsigned int) _res.options, HasWildcardMX);
+				   (unsigned int) sm_res.options, HasWildcardMX);
 #else /* NAMED_BIND */
 		usrerr("name server (I option) specified but BIND not compiled in");
 #endif /* NAMED_BIND */
@@ -4540,6 +4546,10 @@ setoption(opt, val, safe, sticky, e)
 		UseCompressedIPv6Addresses = atobool(val);
 		break;
 
+	  case O_BLACKLIST:
+		UseBlacklist = atobool(val);
+		break;
+
 	  default:
 		if (tTd(37, 1))
 		{