break;
+ case LDAP_FILTER_EXT:
+ filter_escape_value( &f->f_mr_value, &tmp );
+
+ fstr->bv_len = f->f_mr_desc->ad_cname.bv_len +
+ ( f->f_mr_dnattrs ? sizeof(":dn")-1 : 0 ) +
+ ( f->f_mr_rule_text.bv_len ? f->f_mr_rule_text.bv_len+1 : 0 ) +
+ tmp.bv_len + ( sizeof("(:=)") - 1 );
+ fstr->bv_val = malloc( fstr->bv_len + 1 );
+
+ snprintf( fstr->bv_val, fstr->bv_len + 1, "(%s%s%s%s:=%s)",
+ f->f_mr_desc->ad_cname.bv_val,
+ f->f_mr_dnattrs ? ":dn" : "",
+ f->f_mr_rule_text.bv_len ? ":" : "",
+ f->f_mr_rule_text.bv_len ? f->f_mr_rule_text.bv_val : "",
+ tmp.bv_val );
+ ber_memfree( tmp.bv_val );
+ break;
+
case SLAPD_FILTER_COMPUTED:
ber_str2bv(
f->f_result == LDAP_COMPARE_FALSE ? "(?=false)" :
{
Attribute *a;
+ if( mra->ma_desc == NULL || mra->ma_dnattrs ) {
+ return LDAP_INAPPROPRIATE_MATCHING;
+ }
+
if( !access_allowed( be, conn, op, e,
mra->ma_desc, &mra->ma_value, ACL_SEARCH, NULL ) )
{
return LDAP_INSUFFICIENT_ACCESS;
}
+ if( mra->ma_rule == NULL ) {
+ mra->ma_rule = mra->ma_desc->ad_type->sat_equality;
+ }
+
+ if( mra->ma_rule == NULL ) {
+ return LDAP_INAPPROPRIATE_MATCHING;
+ }
+
if( strcmp(mra->ma_rule->smr_syntax->ssyn_oid,
mra->ma_desc->ad_type->sat_syntax->ssyn_oid) != 0)
{
return LDAP_INVALID_SYNTAX;
}
- if( mra->ma_rule == NULL )
- {
- return LDAP_INAPPROPRIATE_MATCHING;
- }
-
for(a = attrs_find( e->e_attrs, mra->ma_desc );
a != NULL;
a = attrs_find( a->a_next, mra->ma_desc ) )
return rc;
}
- if ( ret ) {
+ if ( ret == 0 ) {
return LDAP_COMPARE_TRUE;
}
}
struct berval *value,
void *assertedValue )
{
- *matchp = UTF8bvnormcmp( value, (struct berval *) assertedValue, LDAP_UTF8_NOCASEFOLD );
+ *matchp = UTF8bvnormcmp( value,
+ (struct berval *) assertedValue,
+ LDAP_UTF8_NOCASEFOLD );
return LDAP_SUCCESS;
}
struct berval *value,
void *assertedValue )
{
- *matchp = UTF8bvnormcmp( value, (struct berval *) assertedValue, LDAP_UTF8_CASEFOLD );
+ *matchp = UTF8bvnormcmp( value,
+ (struct berval *) assertedValue,
+ LDAP_UTF8_CASEFOLD );
return LDAP_SUCCESS;
}