[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Present filter on unrecognized attribute types
Hi,
When slapd finds a present filter with an invalid attribute it evaluates to
UNDEFINED for that filter instead of FALSE. From rfc2251:
The present match evaluates to TRUE where there is an attribute or
subtype of the specified attribute description present in an entry,
and FALSE otherwise (including a presence test with an unrecognized
attribute description.)
Here's the diff:
--- openldap-2.0.17/servers/slapd.orig/filter.c Fri Aug 31 22:24:17 2001
+++ openldap-2.0.17/servers/slapd/filter.c Tue Nov 13 10:13:56 2001
@@ -183,6 +183,10 @@
err = slap_bv2ad( &type, &f->f_desc, text );
if( err != LDAP_SUCCESS ) {
+ /* unknown attributes evaluate to false */
+ f->f_choice = SLAPD_FILTER_COMPUTED;
+ f->f_result = LDAP_COMPARE_FALSE;
+ err = LDAP_SUCCESS;
ch_free( type.bv_val );
break;
}