[tac_plus] host acl always denies

Ignas Kazlauskas ignas.kazlauskas at ittc.vu.lt
Tue Jan 24 07:09:15 UTC 2012


On 2012.01.23 20:46, heasley wrote:
> Mon, Jan 23, 2012 at 10:22:04AM +0200, Ignas Kazlauskas:
>> --- config.c.orig       2012-01-23 09:31:32.771632186 +0200
>> +++ config.c    2012-01-23 09:31:46.107154201 +0200
>> @@ -2044,7 +2044,7 @@
>>
>>      next = acl->nodes;
>>      while (next) {
>> -       if (regexec((regex_t *)next->value1, ip, 0, NULL, 0) != REG_OK) {
>> +       if (regexec((regex_t *)next->value1, ip, 0, NULL, 0) == REG_OK) {
>>             if (debug & DEBUG_AUTHEN_FLAG)
>>                 report(LOG_DEBUG, "ip %s matched %s regex %s of acl
>> filter %s",
>>                         ip, next->type == S_deny ? "deny" : "permit",
>>
>>
>> Now acls works as they should, it seems.
> 
> sigh.  indeed; my test cases were not complete.  sorry

No worries. Thanks for the REG_OK, the "==" part was easy.

-- 
Ignas K.


More information about the tac_plus mailing list