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

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Nico Erfurth
Dátum:  
Címzett: exim-dev
Tárgy: Re: [exim-dev] patch for named acl variables
Jakob Hirsch wrote:

> I kind of overloaded the acl set command so people can use it just as
> the numbered acl vars. I did the same with the spool file format, so you
> now have "-aclm m_bla 1234" in your spoolfile, so changes to externals
> tools should be minimal (or zero, ideally).


You shouldn't use -aclm or -aclc, the problem is that prior versions of
exim use this code to check for a valid entry:

--------------------- SNIP -----------------------------------
else if (Ustrncmp(big_buffer, "-aclc ", 6) == 0)
   {
   int index, count;
   if (sscanf(CS big_buffer + 6, "%d %d", &index, &count) != 2)
     goto SPOOL_FORMAT_ERROR;
--------------------- SNIP -----------------------------------


So, if someone uses the patch and the new acl-variables, he won't be
able to switch back to an old version, unless he modifies the -H files
manually.

We had the some problem some years ago, when the acl-storage was
introduced. Back then, Philip was a bit lazy and allowed to spread the
acl-variables over multiple lines, something that prior versions of exim
couldn't handle, because they just ignored the -acl line and tried the
next one, which didn't start with a dash ;)

Guess what happened, some people needed to switch back to their old
version (not sure, i think there was a bug in the new release), and
found out that their old exim couldn't handle the data anymore ;)

.... just had a look at the current code (damn, it's a long time ago
since i had a look at the exim code *G*) it seems like the recent(?)
change to use -aclm and -aclc in favor of -acl didn't care for this
problem either, so maybe a wrote a lot of useless text *G*.

> I'm not sure if using store_release if a variable is redefined is
> correct, but it's easy to remove that. The existing aclvar code does not


It would be better to check the size of your current value and maybe
overwrite it if it fits, store_release is only able to release store if
it is on top of the stack.

> To find a variable, I use a simple linear search, which is not the most
> efficient method (euphemism alert!), but as most people only use a few
> variables there's is really no need for a bloated hash function with
> collision handling. And many people do just the same with files...


Exim already includes code for balanced trees, check tree.c.
And you don't seem to know the exim community very well, they will use
new features until something breaks *G*

> Comments welcome, especially "this is soo cool" style. :)


This is sooooo cool! :)
But IMHO needs some rework. :)

Nico