From ce3258931d05becb2c87f17d80ee7c4b01f5a55a Mon Sep 17 00:00:00 2001 From: Jeremy Harris Date: Thu, 17 Dec 2015 23:22:09 +0000 Subject: Fix hosts_connection_nolog ensuring that sender_host_cache is not incorrectly filled in by the daemon, where the sender_host will be varying. --- src/src/daemon.c | 1 + src/src/exim.c | 2 ++ src/src/smtp_in.c | 2 -- 3 files changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/src/daemon.c b/src/src/daemon.c index 65195ccd1..24874c374 100644 --- a/src/src/daemon.c +++ b/src/src/daemon.c @@ -341,6 +341,7 @@ arrange to unset the selector in the subprocess. */ if (LOGGING(smtp_connection)) { uschar *list = hosts_connection_nolog; + memset(sender_host_cache, 0, sizeof(sender_host_cache)); if (list != NULL && verify_check_host(&list) == OK) save_log_selector &= ~L_smtp_connection; else diff --git a/src/src/exim.c b/src/src/exim.c index 9e4dafe2f..f8cfda8a8 100644 --- a/src/src/exim.c +++ b/src/src/exim.c @@ -5051,6 +5051,7 @@ if (host_checking) "**** This is not for real!\n\n", sender_host_address); + memset(sender_host_cache, 0, sizeof(sender_host_cache)); if (verify_check_host(&hosts_connection_nolog) == OK) BIT_CLEAR(log_selector, log_selector_size, Li_smtp_connection); log_write(L_smtp_connection, LOG_MAIN, "%s", smtp_get_connection_info()); @@ -5225,6 +5226,7 @@ if (smtp_input) { smtp_in = stdin; smtp_out = stdout; + memset(sender_host_cache, 0, sizeof(sender_host_cache)); if (verify_check_host(&hosts_connection_nolog) == OK) BIT_CLEAR(log_selector, log_selector_size, Li_smtp_connection); log_write(L_smtp_connection, LOG_MAIN, "%s", smtp_get_connection_info()); diff --git a/src/src/smtp_in.c b/src/src/smtp_in.c index 3fce125d3..b48e436e3 100644 --- a/src/src/smtp_in.c +++ b/src/src/smtp_in.c @@ -1866,8 +1866,6 @@ pipelining_enable = TRUE; sync_cmd_limit = NON_SYNC_CMD_NON_PIPELINING; smtp_exit_function_called = FALSE; /* For avoiding loop in not-quit exit */ -memset(sender_host_cache, 0, sizeof(sender_host_cache)); - /* If receiving by -bs from a trusted user, or testing with -bh, we allow authentication settings from -oMaa to remain in force. */ -- cgit v1.2.3