summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJeremy Harris <jgh146exb@wizmail.org>2013-07-21 12:50:53 +0100
committerJeremy Harris <jgh146exb@wizmail.org>2013-07-21 16:57:18 +0100
commitcb46fd2b91514ce49ad0e13788127d756ed35145 (patch)
tree6e698fe65ce2c462c7ce0c3ee938463388e87fc1 /src
parentada4d84efd985590d24a988912b8b38cd91c6e59 (diff)
Remove ACL-config skip so that ${acl } expansions work from queue-runs.
Previously we skipped parsing the ACL section when not needed. Now it is potentially needed in all cases. The skip was ~5% faster than a full parse so probably not a large part of the exim process startup. Fix up testsuite output files affected by the removal and add a regression test.
Diffstat (limited to 'src')
-rw-r--r--src/src/exim.c11
-rw-r--r--src/src/functions.h2
-rw-r--r--src/src/readconf.c18
3 files changed, 9 insertions, 22 deletions
diff --git a/src/src/exim.c b/src/src/exim.c
index a27e391d1..8ab0456d8 100644
--- a/src/src/exim.c
+++ b/src/src/exim.c
@@ -4270,13 +4270,12 @@ if (msg_action_arg > 0 && msg_action != MSG_DELIVER && msg_action != MSG_LOAD)
exit(yield);
}
-/* All the modes below here require the remaining configuration sections
-to be read, except that we can skip over the ACL setting when delivering
-specific messages, or doing a queue run. (For various testing cases we could
-skip too, but as they are rare, it doesn't really matter.) The argument is TRUE
-for skipping. */
+/* We used to set up here to skip reading the ACL section, on
+ (msg_action_arg > 0 || (queue_interval == 0 && !daemon_listen)
+Now, since the intro of the ${acl } expansion, ACL definitions may be
+needed in transports so we lost the optimisation. */
-readconf_rest(msg_action_arg > 0 || (queue_interval == 0 && !daemon_listen));
+readconf_rest();
/* The configuration data will have been read into POOL_PERM because we won't
ever want to reset back past it. Change the current pool to POOL_MAIN. In fact,
diff --git a/src/src/functions.h b/src/src/functions.h
index e76cd140e..d381b569a 100644
--- a/src/src/functions.h
+++ b/src/src/functions.h
@@ -255,7 +255,7 @@ extern void readconf_print(uschar *, uschar *, BOOL);
extern uschar *readconf_printtime(int);
extern uschar *readconf_readname(uschar *, int, uschar *);
extern int readconf_readtime(uschar *, int, BOOL);
-extern void readconf_rest(BOOL);
+extern void readconf_rest();
extern uschar *readconf_retry_error(uschar *, uschar *, int *, int *);
extern void read_message_body(BOOL);
extern void receive_bomb_out(uschar *, uschar *);
diff --git a/src/src/readconf.c b/src/src/readconf.c
index 7f42bb7a9..207b3693d 100644
--- a/src/src/readconf.c
+++ b/src/src/readconf.c
@@ -3972,27 +3972,15 @@ return acl_line;
/* Now the main function:
-Arguments:
- skip TRUE when this Exim process is doing something that will
- not need the ACL data
-
+Arguments: none
Returns: nothing
*/
static void
-readconf_acl(BOOL skip)
+readconf_acl(void)
{
uschar *p;
-/* Not receiving messages, don't need to parse the ACL data */
-
-if (skip)
- {
- DEBUG(D_acl) debug_printf("skipping ACL configuration - not needed\n");
- while ((p = get_config_line()) != NULL);
- return;
- }
-
/* Read each ACL and add it into the tree. Macro (re)definitions are allowed
between ACLs. */
@@ -4126,7 +4114,7 @@ while(next_section[0] != 0)
switch(mid)
{
- case 0: readconf_acl(skip_acl); break;
+ case 0: readconf_acl(); break;
case 1: auths_init(); break;
case 2: local_scan_init(); break;
case 3: readconf_retries(); break;