Gitweb:
https://git.exim.org/exim.git/commitdiff/60b8e1d8c24d1ab487134d8b5fb1e8523f786c33
Commit: 60b8e1d8c24d1ab487134d8b5fb1e8523f786c33
Parent: 520ef00f56cea3d35688bf4e13599a6e37ba275f
Author: Jeremy Harris <jgh146exb@???>
AuthorDate: Sat Nov 12 20:13:32 2022 +0000
Committer: Jeremy Harris <jgh146exb@???>
CommitDate: Mon Dec 12 19:25:45 2022 +0000
tidying
---
doc/doc-docbook/spec.xfpt | 5 ++++-
src/src/daemon.c | 12 ++++++++----
src/src/expand.c | 9 +++------
test/stderr/0632 | 6 +++---
4 files changed, 18 insertions(+), 14 deletions(-)
diff --git a/doc/doc-docbook/spec.xfpt b/doc/doc-docbook/spec.xfpt
index cd9259612..e0570962f 100644
--- a/doc/doc-docbook/spec.xfpt
+++ b/doc/doc-docbook/spec.xfpt
@@ -9652,7 +9652,10 @@ Example use (as an ACL modifier):
.code
add_header = :at_start:${authresults {$primary_hostname}}
.endd
-This is safe even if no authentication results are available.
+This is safe even if no authentication results are available
+.new
+and would generally be placed in the DATA ACL.
+.wen
.vitem "&*${certextract{*&<&'field'&>&*}{*&<&'certificate'&>&*}&&&
diff --git a/src/src/daemon.c b/src/src/daemon.c
index be008c3d4..05ef3bfdd 100644
--- a/src/src/daemon.c
+++ b/src/src/daemon.c
@@ -1258,10 +1258,14 @@ if (sz >= sizeof(buf)) return FALSE;
#ifdef notdef
debug_printf("addrlen %d\n", msg.msg_namelen);
#endif
-DEBUG(D_queue_run) debug_printf("%s from addr '%s%.*s'\n", __FUNCTION__,
- *sa_un.sun_path ? "" : "@",
- (int)msg.msg_namelen - (*sa_un.sun_path ? 0 : 1),
- sa_un.sun_path + (*sa_un.sun_path ? 0 : 1));
+DEBUG(D_queue_run)
+ if (msg.msg_namelen > 0)
+ debug_printf("%s from addr '%s%.*s'\n", __FUNCTION__,
+ *sa_un.sun_path ? "" : "@",
+ (int)msg.msg_namelen - (*sa_un.sun_path ? 0 : 1),
+ sa_un.sun_path + (*sa_un.sun_path ? 0 : 1));
+ else
+ debug_printf("%s (from unknown addr)\n", __FUNCTION__);
/* Refuse to handle the item unless the peer has good credentials */
#ifdef SCM_CREDENTIALS
diff --git a/src/src/expand.c b/src/src/expand.c
index 7bb2e4274..62b4a1890 100644
--- a/src/src/expand.c
+++ b/src/src/expand.c
@@ -4853,11 +4853,11 @@ while (*s)
switch(read_subs(sub_arg, nelem(sub_arg), 1, &s, flags, TRUE, name, &resetok, NULL))
{
+ case -1: continue; /* If skipping, we don't actually do anything */
case 1: goto EXPAND_FAILED_CURLY;
case 2:
case 3: goto EXPAND_FAILED;
}
- /*XXX no skipping-optimisation? */
yield = string_append(yield, 3,
US"Authentication-Results: ", sub_arg[0], US"; none");
@@ -4944,7 +4944,6 @@ while (*s)
case 2:
case 3: goto EXPAND_FAILED;
}
- /*XXX no skipping-optimisation? */
if (!sub_arg[1]) /* One argument */
{
@@ -5439,15 +5438,12 @@ while (*s)
switch(read_subs(sub_arg, 2, 1, &s, flags, TRUE, name, &resetok, NULL))
{
+ case -1: continue; /* If skipping, we don't actually do anything */
case 1: goto EXPAND_FAILED_CURLY;
case 2:
case 3: goto EXPAND_FAILED;
}
- /* If skipping, we don't actually do anything */
-
- if (flags & ESI_SKIPPING) continue;
-
/* Open the file and read it */
if (!(f = Ufopen(sub_arg[0], "rb")))
@@ -6327,6 +6323,7 @@ while (*s)
save_expand_strings(save_expand_nstring, save_expand_nlength);
/* Read the field & list arguments */
+ /*XXX Could we use read_subs here (and get better efficiency for skipping)? */
for (int i = 0; i < 2; i++)
{
diff --git a/test/stderr/0632 b/test/stderr/0632
index eca5a279e..1df2ef735 100644
--- a/test/stderr/0632
+++ b/test/stderr/0632
@@ -460,17 +460,17 @@ LOG: smtp_connection MAIN
SMTP connection from (test.ex) [127.0.0.1] closed by QUIT
p1234 1 SMTP accept process running
p1234 Listening...
-p1234 daemon_notification from addr ''
+p1234 daemon_notification (from unknown addr)
p1234 compiled caseless RE '^nomatch_list' not found in local cache
p1234 compiling caseless RE '^nomatch_list'
p1234 compiled RE '^nomatch_list' saved in local cache
p1234 Listening...
-p1234 daemon_notification from addr ''
+p1234 daemon_notification (from unknown addr)
p1234 compiled RE 'static_RE' not found in local cache
p1234 compiling RE 'static_RE'
p1234 compiled RE 'static_RE' saved in local cache
p1234 Listening...
-p1234 daemon_notification from addr ''
+p1234 daemon_notification (from unknown addr)
p1234 compiled RE 'tricky_static_RE$' not found in local cache
p1234 compiling RE 'tricky_static_RE$'
p1234 compiled RE 'tricky_static_RE$' saved in local cache