From d342446f29e81eddd4845cbf23e9454b9fc406e2 Mon Sep 17 00:00:00 2001 From: Jeremy Harris Date: Fri, 6 Apr 2018 10:48:00 +0100 Subject: [PATCH] Logging: fix DKIM precis received log line element. Broken-by: 2c47372fad --- doc/doc-txt/ChangeLog | 4 ++++ src/src/receive.c | 4 ++-- src/src/smtp_in.c | 7 ++++++- test/log/4524 | 3 +-- 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/doc/doc-txt/ChangeLog b/doc/doc-txt/ChangeLog index a18c57e3c..903840a6b 100644 --- a/doc/doc-txt/ChangeLog +++ b/doc/doc-txt/ChangeLog @@ -196,6 +196,10 @@ HS/03 Malware Avast: Better match the Avast multiline protocol. Add denied, license issues). Other scanner errors (like decompression bombs) do not cause a paniclog entry. +JH/36 Fix reinitialisation of DKIM logging variable between messages. + Previously it was possible to log spurious information in receive log + lines. + Exim version 4.90 ----------------- diff --git a/src/src/receive.c b/src/src/receive.c index 4e1dca5c5..cba53c20d 100644 --- a/src/src/receive.c +++ b/src/src/receive.c @@ -1617,8 +1617,8 @@ int i; int rc = FAIL; int msg_size = 0; int process_info_len = Ustrlen(process_info); -int error_rc = (error_handling == ERRORS_SENDER)? - errors_sender_rc : EXIT_FAILURE; +int error_rc = error_handling == ERRORS_SENDER + ? errors_sender_rc : EXIT_FAILURE; int header_size = 256; int start, end, domain; int id_resolution; diff --git a/src/src/smtp_in.c b/src/src/smtp_in.c index 7d6298160..db9fb6879 100644 --- a/src/src/smtp_in.c +++ b/src/src/smtp_in.c @@ -1995,8 +1995,13 @@ bmi_verdicts = NULL; #endif dnslist_domain = dnslist_matched = NULL; #ifndef DISABLE_DKIM -dkim_cur_signer = dkim_signers = NULL; +dkim_cur_signer = dkim_signers = +dkim_signing_domain = dkim_signing_selector = NULL; +dkim_cur_signer = dkim_signers = dkim_signing_domain = dkim_signing_selector = NULL; dkim_disable_verify = dkim_collect_input = FALSE; +dkim_verify_overall = dkim_verify_status = dkim_verify_reason = NULL; +dkim_key_length = 0; +dkim_verify_signers = US"$dkim_signers"; #endif dsn_ret = 0; dsn_envid = NULL; diff --git a/test/log/4524 b/test/log/4524 index 9da344463..d86d43300 100644 --- a/test/log/4524 +++ b/test/log/4524 @@ -9,8 +9,7 @@ 1999-03-02 09:44:33 10HmaY-0005vi-00 DKIM: d=test.ex s=ses c=relaxed/relaxed a=rsa-sha256 b=512 [verification succeeded] 1999-03-02 09:44:33 10HmaY-0005vi-00 dkim_acl: signer: test.ex bits: 1024 h=From:To:Subject 1999-03-02 09:44:33 10HmaY-0005vi-00 DKIM: d=test.ex s=sel c=relaxed/relaxed a=rsa-sha256 b=1024 [verification succeeded] -1999-03-02 09:44:33 10HmaY-0005vi-00 dkim_acl: signer: test.dkim.dom.ain bits: 1024 h= -1999-03-02 09:44:33 10HmaY-0005vi-00 data acl: dkim status pass:pass:none +1999-03-02 09:44:33 10HmaY-0005vi-00 data acl: dkim status pass:pass 1999-03-02 09:44:33 10HmaY-0005vi-00 <= CALLER@myhost.test.ex H=the.local.host.name (myhost.test.ex) [ip4.ip4.ip4.ip4] P=esmtp S=sss id=E10HmaX-0005vi-00@myhost.test.ex 1999-03-02 09:44:33 10HmaY-0005vi-00 => c R=server_store T=file 1999-03-02 09:44:33 10HmaY-0005vi-00 Completed -- 2.30.2