Premature end of paircompare when using !* op on non-present attribute
Joe Maimon
jmaimon at ttec.com
Fri Feb 17 12:46:23 CET 2006
Here try this.
Enrik Berkhan wrote:
> Hi all,
>
> yesterday I've noticed the following when using the '!*' op
> (T_OP_CMP_FALSE) in the check items. When the attribute to be compared
> is not found in the list of request attributes, '!*' evaluates to true,
> which is correct, but further processing of the remaining check items
> will be skipped. The code responsible for this behaviour comes from
> paircompare() in src/main/valuepair.c:
>
>
>> /*
>> * Not found, it's not a match.
>> */
>> if (auth_item == NULL) {
>> /*
>> * Didn't find it. If we were *trying*
>> * to not find it, then we succeeded.
>> */
>> if (check_item->operator == T_OP_CMP_FALSE)
>> return 0;
>> else
>> return -1;
>> }
>
>
> I believe the `return 0' to be incorrect. I think it should be
> `continue' instead to evaluate the remaining check items. Or is it
> correct like it is?
>
> Enrik
> -
> List info/subscribe/unsubscribe? See http://www.freeradius.org/list/devel.html
>
>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 200-cmp-operators-fix.dpatch
URL: <http://lists.freeradius.org/pipermail/freeradius-devel/attachments/20060217/03c6e56c/attachment.ksh>
More information about the Freeradius-Devel
mailing list