summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJeremy Harris <jgh146exb@wizmail.org>2017-01-28 17:53:29 +0000
committerJeremy Harris <jgh146exb@wizmail.org>2017-01-28 17:53:29 +0000
commit560e71cc545182bb51a7d038ac40eebac8e045aa (patch)
treedbfbb889245ab0d12b259bc53a5a7d9dc16ed191 /src
parent30c3236bdc2fba05051cd77d52fb1cb29cb70afb (diff)
Testsuite: add dnsdb testcase for defer when used in ACL
Diffstat (limited to 'src')
-rw-r--r--src/src/acl.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/src/src/acl.c b/src/src/acl.c
index 64b310968..396e29965 100644
--- a/src/src/acl.c
+++ b/src/src/acl.c
@@ -2838,18 +2838,15 @@ for (; cb != NULL; cb = cb->next)
of them, but not for all, because expansion happens down in some lower level
checking functions in some cases. */
- if (conditions[cb->type].expand_at_top)
+ if (!conditions[cb->type].expand_at_top)
+ arg = cb->arg;
+ else if (!(arg = expand_string(cb->arg)))
{
- arg = expand_string(cb->arg);
- if (arg == NULL)
- {
- if (expand_string_forcedfail) continue;
- *log_msgptr = string_sprintf("failed to expand ACL string \"%s\": %s",
- cb->arg, expand_string_message);
- return search_find_defer? DEFER : ERROR;
- }
+ if (expand_string_forcedfail) continue;
+ *log_msgptr = string_sprintf("failed to expand ACL string \"%s\": %s",
+ cb->arg, expand_string_message);
+ return search_find_defer ? DEFER : ERROR;
}
- else arg = cb->arg;
/* Show condition, and expanded condition if it's different */