A minor code clean-up and a comment fix for the CSA patch arising
authorTony Finch <dot@dot.at>
Fri, 10 Jun 2005 18:59:34 +0000 (18:59 +0000)
committerTony Finch <dot@dot.at>
Fri, 10 Jun 2005 18:59:34 +0000 (18:59 +0000)
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
src/src/lookups/dnsdb.c

index f2b1aaa139deb827e82afa39285ed8f84c5a80f8..bfd66e3bb2d4e18d966085370fdeed9520349cd4 100644 (file)
@@ -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    *
 
 /*************************************************
 *     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). */
 
 
 /* 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. */
 switch (dns_special_lookup(&dnsa, domain, T_CSA, &found))
   {
   /* If something bad happened (most commonly DNS_AGAIN), defer. */
index 169fd67f1bf7729f9161c822bd5c7343202cef13..c1a0c5a61cd6e5bc94974d42ffe14f404b4be516 100644 (file)
@@ -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    *
 
 /*************************************************
 *     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);
 
 
   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);
 
   found = domain;
   rc = dns_special_lookup(&dnsa, domain, type, &found);