From 28e6ef293e17995d56f1510cdf4f510b84034a83 Mon Sep 17 00:00:00 2001 From: Tony Finch Date: Fri, 10 Jun 2005 18:59:34 +0000 Subject: [PATCH] A minor code clean-up and a comment fix for the CSA patch arising from a bug report by John Horne. The lack of initialization of the found variable in acl_verify_csa() was not a bug but I've fixed it because it's risky. Bug ID 26 --- src/src/acl.c | 3 ++- src/src/lookups/dnsdb.c | 16 ++++++++-------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/src/acl.c b/src/src/acl.c index f2b1aaa13..bfd66e3bb 100644 --- a/src/src/acl.c +++ b/src/src/acl.c @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/src/acl.c,v 1.37 2005/05/31 17:07:39 fanf2 Exp $ */ +/* $Cambridge: exim/src/src/acl.c,v 1.38 2005/06/10 18:59:34 fanf2 Exp $ */ /************************************************* * Exim - an Internet mail transport agent * @@ -1143,6 +1143,7 @@ Ustrcpy(t->name, domain); /* Now we are ready to do the actual DNS lookup(s). */ +found = domain; switch (dns_special_lookup(&dnsa, domain, T_CSA, &found)) { /* If something bad happened (most commonly DNS_AGAIN), defer. */ diff --git a/src/src/lookups/dnsdb.c b/src/src/lookups/dnsdb.c index 169fd67f1..c1a0c5a61 100644 --- a/src/src/lookups/dnsdb.c +++ b/src/src/lookups/dnsdb.c @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/src/lookups/dnsdb.c,v 1.13 2005/06/10 13:38:06 tom Exp $ */ +/* $Cambridge: exim/src/src/lookups/dnsdb.c,v 1.14 2005/06/10 18:59:35 fanf2 Exp $ */ /************************************************* * Exim - an Internet mail transport agent * @@ -249,13 +249,13 @@ while ((domain = string_nextinlist(&keystring, &sep, buffer, sizeof(buffer))) DEBUG(D_lookup) debug_printf("dnsdb key: %s\n", domain); - /* Do the lookup and sort out the result. There are two special types that - are handled specially: T_ZNS and T_MXH. The former is handled in a special - lookup function so that the facility could be used from other parts of the - Exim code. The latter affects only what happens later on in this function, - but for tidiness it is handled in a similar way. If the lookup fails, - continue with the next domain. In the case of DEFER, adjust the final - "nothing found" result, but carry on to the next domain. */ + /* Do the lookup and sort out the result. There are three special types that + are handled specially: T_CSA, T_ZNS and T_MXH. The former two are handled in + a special lookup function so that the facility could be used from other + parts of the Exim code. The latter affects only what happens later on in + this function, but for tidiness it is handled in a similar way. If the + lookup fails, continue with the next domain. In the case of DEFER, adjust + the final "nothing found" result, but carry on to the next domain. */ found = domain; rc = dns_special_lookup(&dnsa, domain, type, &found); -- 2.30.2