From: Philip Hazel Date: Tue, 27 Jun 2006 15:07:18 +0000 (+0000) Subject: Fix Bugzilla #101: macro definition between ACLs doesn't work. X-Git-Tag: exim-4_63~38 X-Git-Url: https://git.exim.org/exim.git/commitdiff_plain/b8dc3e4a6769d5b233b1117f16b334a583716b10 Fix Bugzilla #101: macro definition between ACLs doesn't work. --- diff --git a/doc/doc-txt/ChangeLog b/doc/doc-txt/ChangeLog index 08c60a8c3..9a2d9c83c 100644 --- a/doc/doc-txt/ChangeLog +++ b/doc/doc-txt/ChangeLog @@ -1,4 +1,4 @@ -$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.359 2006/06/27 14:34:26 ph10 Exp $ +$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.360 2006/06/27 15:07:18 ph10 Exp $ Change log file for Exim from version 4.21 ------------------------------------------- @@ -43,6 +43,8 @@ PH/02 Add the verb name to the "unknown ACL verb" error. PH/03 Magnus Holmgren's patch for filter_prepend_home. +PH/03 Fixed Bugzilla #101: macro definition between ACLs doesn't work. + Exim version 4.62 ----------------- diff --git a/src/src/acl.c b/src/src/acl.c index 033291b0c..02a2e9440 100644 --- a/src/src/acl.c +++ b/src/src/acl.c @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/src/acl.c,v 1.60 2006/06/27 14:04:29 ph10 Exp $ */ +/* $Cambridge: exim/src/src/acl.c,v 1.61 2006/06/27 15:07:18 ph10 Exp $ */ /************************************************* * Exim - an Internet mail transport agent * @@ -710,7 +710,7 @@ while ((s = (*func)()) != NULL) can be started by a name, or by a macro definition. */ s = readconf_readname(name, sizeof(name), s); - if (*s == ':' || isupper(name[0] && *s == '=')) return yield; + if (*s == ':' || (isupper(name[0]) && *s == '=')) return yield; /* If a verb is unrecognized, it may be another condition or modifier that continues the previous verb. */ diff --git a/test/confs/0534 b/test/confs/0534 new file mode 100644 index 000000000..b148987a5 --- /dev/null +++ b/test/confs/0534 @@ -0,0 +1,30 @@ +# Exim test configuration 0534 + +exim_path = EXIM_PATH +host_lookup_order = bydns +primary_hostname = myhost.test.ex +rfc1413_query_timeout = 0s +spool_directory = DIR/spool +log_file_path = DIR/spool/log/%slog +gecos_pattern = "" +gecos_name = CALLER_NAME + +# ----- Main settings ----- + +acl_smtp_connect = two + + +# ----- ACLs ----- + +begin ACL + +one: + accept hosts = 1.2.3.4 + +MACRO_DEFINITION=5.6.7.8 + +two: + accept hosts = MACRO_DEFINITION + + +# End diff --git a/test/scripts/0000-Basic/0534 b/test/scripts/0000-Basic/0534 new file mode 100644 index 000000000..b1a992e88 --- /dev/null +++ b/test/scripts/0000-Basic/0534 @@ -0,0 +1,4 @@ +# Macro definition between ACLs +exim -bh 5.6.7.8 +quit +**** diff --git a/test/stderr/0534 b/test/stderr/0534 new file mode 100644 index 000000000..d7fd3e150 --- /dev/null +++ b/test/stderr/0534 @@ -0,0 +1,13 @@ +>>> host in hosts_connection_nolog? no (option unset) +>>> host in host_lookup? no (option unset) +>>> host in host_reject_connection? no (option unset) +>>> host in sender_unqualified_hosts? no (option unset) +>>> host in recipient_unqualified_hosts? no (option unset) +>>> host in helo_verify_hosts? no (option unset) +>>> host in helo_try_verify_hosts? no (option unset) +>>> host in helo_accept_junk_hosts? no (option unset) +>>> using ACL "two" +>>> processing "accept" +>>> check hosts = 5.6.7.8 +>>> host in "5.6.7.8"? yes (matched "5.6.7.8") +>>> accept: condition test succeeded diff --git a/test/stdout/0534 b/test/stdout/0534 new file mode 100644 index 000000000..1172c46fa --- /dev/null +++ b/test/stdout/0534 @@ -0,0 +1,7 @@ + +**** SMTP testing session as if from host 5.6.7.8 +**** but without any ident (RFC 1413) callback. +**** This is not for real! + +220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 +221 myhost.test.ex closing connection