From: Tom Kistner Date: Fri, 10 Jun 2005 13:29:36 +0000 (+0000) Subject: Fix possible endless loop due to dying spamd X-Git-Tag: exim-4_52~63 X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=8d7d227dbc331d56589022692d3eee214f7ab732;p=exim.git Fix possible endless loop due to dying spamd --- diff --git a/src/src/dns.c b/src/src/dns.c index c6cd7060f..e7381725f 100644 --- a/src/src/dns.c +++ b/src/src/dns.c @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/src/dns.c,v 1.6 2005/05/10 10:19:11 ph10 Exp $ */ +/* $Cambridge: exim/src/src/dns.c,v 1.7 2005/06/10 13:29:36 tom Exp $ */ /************************************************* * Exim - an Internet mail transport agent * @@ -556,6 +556,8 @@ for (i = 0; i < 10; i++) contents of any rr blocks returned by dns_next_rr() as they use the same area in the dnsa block. */ + DEBUG(D_dns) debug_printf("Back in dns_lookup()\n"); + cname_rr.data = type_rr.data = NULL; for (rr = dns_next_rr(dnsa, &dnss, RESET_ANSWERS); rr != NULL; diff --git a/src/src/lookups/dnsdb.c b/src/src/lookups/dnsdb.c index 8133506b2..17bffba42 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.11 2005/05/10 10:19:11 ph10 Exp $ */ +/* $Cambridge: exim/src/src/lookups/dnsdb.c,v 1.12 2005/06/10 13:29:36 tom Exp $ */ /************************************************* * Exim - an Internet mail transport agent * @@ -260,6 +260,8 @@ while ((domain = string_nextinlist(&keystring, &sep, buffer, sizeof(buffer))) found = domain; rc = dns_special_lookup(&dnsa, domain, type, &found); + DEBUG(D_lookup) debug_printf("Back in dnsdb_find\n"); + if (rc == DNS_NOMATCH || rc == DNS_NODATA) continue; if (rc != DNS_SUCCEED) { diff --git a/src/src/spam.c b/src/src/spam.c index 3c70f6d99..564145931 100644 --- a/src/src/spam.c +++ b/src/src/spam.c @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/src/spam.c,v 1.6 2005/05/10 22:39:20 tom Exp $ */ +/* $Cambridge: exim/src/src/spam.c,v 1.7 2005/06/10 13:29:36 tom Exp $ */ /************************************************* * Exim - an Internet mail transport agent * @@ -247,6 +247,14 @@ again: } #endif wrote = send(spamd_sock,spamd_buffer + offset,read - offset,0); + if (wrote == -1) + { + log_write(0, LOG_MAIN|LOG_PANIC, + "spam acl condition: %s on spamd socket", strerror(errno)); + close(spamd_sock); + fclose(mbox_file); + return DEFER; + } if (offset + wrote != read) { offset += wrote; goto again;