[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: (ITS#3406) MRA filter evaluation needs normalization of tested value?



ando@sys-net.it wrote:

>I've uploaded my suggested patch to 
>ftp://ftp.openldap.org/incoming/test_mra_filter-2004-11-29.patch , 
>please review.  Analogous correction needs to be applied later on for 
>the case of no AttributeDescription specification in MRA filter.
>  
>
I don't think the suggested fix is correct; the point is that when the 
given matchingRule differs from the equality rule of the attribute, the 
non-nromalized values are passed thru, with the flags set to 0; first of 
all, in the normal case, when the requested rule is the equality rule of 
the attribute, I'd expect the flags to be set to 
(SLAP_MR_ASSERTED_VALUE_NORMALIZED_MATCH | 
SLAP_MR_ATTRIBUTE_VALUE_NORMALIZED_MATCH) when calling the value_match() 
function; when the non-normalized values of the attribute are passed 
value_match() function, I'd expect the flags to be set to 
SLAP_MR_ASSERTED_VALUE_NORMALIZED_MATCH only.  However, in any case, 
most if not all the *Match() functions don't even look at the flags, 
i.e. they assume values have already been normalized.  I'd rather remove 
the flag argument (considering how many times the *Match() functions are 
called during regular operations); and I'd care that values are 
__always__ normalized accordingly, when passed to the value_match() 
function.  In the case of this ITS, the attribute value is not 
normalized according to the requested matching rule (i.e. dnNormalize()).

p.



    SysNet - via Dossi,8 27100 Pavia Tel: +390382573859 Fax: +390382476497