summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRuben Jenster <r.jenster@drachenfels.de>2019-07-19 12:56:56 +0100
committerJeremy Harris <jgh146exb@wizmail.org>2019-07-25 12:21:22 +0100
commit9fa4d5b45f70b36a46c0d04381a5e05cb39ae3e9 (patch)
tree49f8890f4cd58ccf34180f4125486c65d560a062 /src
parentf3ebb786e451da973560f1c9d8cdb151d25108b5 (diff)
Fix dkim_strict expansion. Bug 2413
Broken since the introduction of dkim support. Testsuite additions by jgh
Diffstat (limited to 'src')
-rw-r--r--src/src/dkim.c7
-rw-r--r--src/src/dkim_transport.c4
2 files changed, 6 insertions, 5 deletions
diff --git a/src/src/dkim.c b/src/src/dkim.c
index a410ed55b..dd999ff5b 100644
--- a/src/src/dkim.c
+++ b/src/src/dkim.c
@@ -784,14 +784,15 @@ CLEANUP:
pk_bad:
log_write(0, LOG_MAIN|LOG_PANIC,
- "DKIM: signing failed: %.100s", pdkim_errstr(pdkim_rc));
+ "DKIM: signing failed: %.100s", pdkim_errstr(pdkim_rc));
bad:
sigbuf = NULL;
goto CLEANUP;
expand_bad:
- log_write(0, LOG_MAIN | LOG_PANIC, "failed to expand %s: %s",
- errwhen, expand_string_message);
+ *errstr = string_sprintf("failed to expand %s: %s",
+ errwhen, expand_string_message);
+ log_write(0, LOG_MAIN | LOG_PANIC, "%s", *errstr);
goto bad;
}
diff --git a/src/src/dkim_transport.c b/src/src/dkim_transport.c
index 6b643927c..c09c5059b 100644
--- a/src/src/dkim_transport.c
+++ b/src/src/dkim_transport.c
@@ -21,8 +21,8 @@ if (dkim->dkim_strict)
uschar * dkim_strict_result = expand_string(dkim->dkim_strict);
if (dkim_strict_result)
- if ( (strcmpic(dkim->dkim_strict, US"1") == 0) ||
- (strcmpic(dkim->dkim_strict, US"true") == 0) )
+ if ( strcmpic(dkim_strict_result, US"1") == 0
+ || strcmpic(dkim_strict_result, US"true") == 0)
{
/* Set errno to something halfway meaningful */
*errp = EACCES;