- if( !access_allowed( be, conn, op, e,
- mra->ma_desc, &mra->ma_value, ACL_SEARCH, NULL ) )
- {
- return LDAP_INSUFFICIENT_ACCESS;
- }
+ for ( i=0; a != NULL; a = a->a_next, i++ ) {
+ struct berval *bv, value;
+
+ if ( mra->ma_desc ) {
+ if ( !is_ad_subtype( a->a_desc, mra->ma_desc ) ) {
+ continue;
+ }
+ value = mra->ma_value;
+
+ } else {
+ const char *text = NULL;
+
+ /* check if matching is appropriate */
+ if ( strcmp( mra->ma_rule->smr_syntax->ssyn_oid,
+ a->a_desc->ad_type->sat_syntax->ssyn_oid ) != 0 ) {
+ continue;
+ }
+
+ /* normalize for equality */
+ if ( value_validate_normalize( a->a_desc,
+ SLAP_MR_EQUALITY,
+ &mra->ma_value, &value,
+ &text ) != LDAP_SUCCESS ) {
+ continue;
+ }