From 230d2c7df64ba3e8bc6f0d9bc3a087426f1b9fd5 Mon Sep 17 00:00:00 2001 From: garbled Date: Tue, 26 Feb 2013 19:56:18 +0000 Subject: Add fix from PR44656 to fix sig6 in postfix/smtp when compiled with any type of DB support (like mysql, postgres, etc). Also fixes PR43637 Tested by me. --- mail/postfix/distinfo | 3 +- mail/postfix/patches/patch-src_dns_dns__lookup.c | 47 ++++++++++++++++++++++++ 2 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 mail/postfix/patches/patch-src_dns_dns__lookup.c (limited to 'mail') diff --git a/mail/postfix/distinfo b/mail/postfix/distinfo index c827db7da72..4b07da34b18 100644 --- a/mail/postfix/distinfo +++ b/mail/postfix/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.148 2013/02/13 14:31:31 taca Exp $ +$NetBSD: distinfo,v 1.149 2013/02/26 19:56:18 garbled Exp $ SHA1 (postfix-2.9.6.tar.gz) = 9d7af8670fd13fd5e5290ff2e3f00d724178f0fb RMD160 (postfix-2.9.6.tar.gz) = e3148a42f246c4f54c82cf387b7467805edcd2cd @@ -6,3 +6,4 @@ Size (postfix-2.9.6.tar.gz) = 3767309 bytes SHA1 (patch-aa) = 2115fd7af5776a14fdbfc88a5ad3bc668a6762db SHA1 (patch-ag) = 60d752b6c8db971d92ca0017c63329ad446209c5 SHA1 (patch-ai) = 1bd3682b74de11e5d420e453f3df088d965452d6 +SHA1 (patch-src_dns_dns__lookup.c) = 70147b43a683aa6fd99317d7bae36dfe9beb2d8d diff --git a/mail/postfix/patches/patch-src_dns_dns__lookup.c b/mail/postfix/patches/patch-src_dns_dns__lookup.c new file mode 100644 index 00000000000..4949cde55f2 --- /dev/null +++ b/mail/postfix/patches/patch-src_dns_dns__lookup.c @@ -0,0 +1,47 @@ +$NetBSD: patch-src_dns_dns__lookup.c,v 1.1 2013/02/26 19:56:18 garbled Exp $ + +--- src/dns/dns_lookup.c.orig 2013-02-26 19:34:50.000000000 +0000 ++++ src/dns/dns_lookup.c +@@ -153,6 +153,8 @@ + + /* Local stuff. */ + ++struct __res_state rstate; ++ + /* + * Structure to keep track of things while decoding a name server reply. + */ +@@ -192,7 +194,7 @@ static int dns_query(const char *name, i + /* + * Initialize the name service. + */ +- if ((_res.options & RES_INIT) == 0 && res_init() < 0) { ++ if ((rstate.options & RES_INIT) == 0 && res_ninit(&rstate) < 0) { + if (why) + vstring_strcpy(why, "Name service initialization failure"); + return (DNS_FAIL); +@@ -206,18 +208,18 @@ static int dns_query(const char *name, i + + if ((flags & USER_FLAGS) != flags) + msg_panic("dns_query: bad flags: %d", flags); +- saved_options = (_res.options & USER_FLAGS); ++ saved_options = (rstate.options & USER_FLAGS); + + /* + * Perform the lookup. Claim that the information cannot be found if and + * only if the name server told us so. + */ + for (;;) { +- _res.options &= ~saved_options; +- _res.options |= flags; +- len = res_search((char *) name, C_IN, type, reply->buf, reply->buf_len); +- _res.options &= ~flags; +- _res.options |= saved_options; ++ rstate.options &= ~saved_options; ++ rstate.options |= flags; ++ len = res_nsearch(&rstate, (char *) name, C_IN, type, reply->buf, reply->buf_len); ++ rstate.options &= ~flags; ++ rstate.options |= saved_options; + if (len < 0) { + if (why) + vstring_sprintf(why, "Host or domain name not found. " -- cgit v1.2.3