Re: [exim-dev] patch for named acl variables

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Philip Hazel
Datum:  
To: exim-dev
Betreff: Re: [exim-dev] patch for named acl variables
On Mon, 14 Aug 2006, Jakob Hirsch wrote:

> here's the version with binary trees (no changes to the spool file
> format). I've added a strict_acl_vars config option (default is false),
> which will let an expansion fail if an unset variable is used, so admins
> can change their config (to be more safe against name typos) and then
> activate it.


I have applied this patch and committed it to CVS, so it will be
available in tonight's snapshot. Documentation in doc/NewStuff.

Nice patch, Jakob! I found only a few things that I felt needed to be
changed. For the record:

1. There was one bug. :-( But only one. :-) This line:

     return ((node == NULL && !strict_acl_vars) ? US"": node->data.ptr);


fails when NODE==NULL and strict_acl_vars is true.

2. Most of the changes I made were to update comments in the area of the
patched code. I reworded some error messages.

3. You obviously didn't try to compile eximon with the patch on, because
it failed (eximon reads the spool -H file using some of the main Exim
modules). Eximon is a horrible hack as it is; I hacked it some more.
It was also easy to avoid the use of string_cat() in spool_in.c
(because this isn't currently included in eximon).

4. I removed ACL_CVARS and ACL_MVARS from src/config.h.defaults because
they are no longer used (and from doc/Optionlists.txt).

5. I changed the call to snprintf(), which is not in the C standard, to
use Exim's own string_format() function (which does the same thing).

That's all. Some testing of this new feature would be useful. Since
several people were in favour of this feature, I hope you'll try it
out.

Philip

--
Philip Hazel, University of Cambridge Computing Service.