Hi,
with the attached patch, you can use acl_m_something and acl_c_anything.
Memory is allocated dynamically, so there is no compile time limit.
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).
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
free any memory at all (which is ok as only short lived processes use it).
Oh, and I consolidated the aclvar code in spool_in.c to have no double code.
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...
It runs fine on a server since more than a week. And I think it's really
nice use named variables in the config, system and user filters.
Comments welcome, especially "this is soo cool" style. :)
Regards,
Jakob
with the attached patch, you can use acl_m_something and acl_c_anything.
Memory is allocated dynamically, so there is no compile time limit.
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).
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
free any memory at all (which is ok as only short lived processes use it).
Oh, and I consolidated the aclvar code in spool_in.c to have no double code.
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...
It runs fine on a server since more than a week. And I think it's really
nice use named variables in the config, system and user filters.
Comments welcome, especially "this is soo cool" style. :)
Regards,
Jakob