X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=servers%2Fslapd%2Fmra.c;h=5276c546e6700f1ac32a1411c2e6fc67dd8b941b;hb=956f1d16aa522da6f6506d9c8fe9ce0d9867678a;hp=4c2cb54d99be409dc2426b9036f6926143367eba;hpb=b5f51ed4a5168095af6bfb561191affee59eba8a;p=openldap diff --git a/servers/slapd/mra.c b/servers/slapd/mra.c index 4c2cb54d99..5276c546e6 100644 --- a/servers/slapd/mra.c +++ b/servers/slapd/mra.c @@ -170,28 +170,12 @@ get_mra( return SLAPD_DISCONNECT; } -#ifndef SLAP_X_MRA_MATCH_DNATTRS - /* - * Let's try to implement it - */ - if( ma->ma_dnattrs ) { - *text = "matching with \":dn\" not supported"; - return LDAP_INAPPROPRIATE_MATCHING; - } -#endif /* !SLAP_X_MRA_MATCH_DNATTRS */ - if( type.bv_val != NULL ) { rc = slap_bv2ad( &type, &ma->ma_desc, text ); if( rc != LDAP_SUCCESS ) { mra_free( ma, 1 ); return rc; } - -#ifndef SLAP_X_MRA_MATCH_DNATTRS - } else { - *text = "matching without attribute description rule not supported"; - return LDAP_INAPPROPRIATE_MATCHING; -#endif /* !SLAP_X_MRA_MATCH_DNATTRS */ } if( ma->ma_rule_text.bv_val != NULL ) { @@ -203,17 +187,7 @@ get_mra( } } - /* - * FIXME: is it correct that ma->ma_rule_text, if present, - * is looked-up, checked, and then replaced by the sat_equality - * of the given attribute? I'd rather do smtg like use - * the attribute's equality rule only if no matching rule - * was given, otherwise I don't see any extension ... - */ - -#if 1 if ( ma->ma_rule == NULL ) { -#ifdef SLAP_X_MRA_MATCH_DNATTRS /* * Need either type or rule ... */ @@ -222,7 +196,6 @@ get_mra( *text = "no matching rule or type"; return LDAP_INAPPROPRIATE_MATCHING; } -#endif /* !SLAP_X_MRA_MATCH_DNATTRS */ if ( ma->ma_desc->ad_type->sat_equality != NULL && ma->ma_desc->ad_type->sat_equality->smr_usage & SLAP_MR_EXT ) @@ -237,25 +210,8 @@ get_mra( return LDAP_INAPPROPRIATE_MATCHING; } } -#else - if( ma->ma_desc != NULL && - ma->ma_desc->ad_type->sat_equality != NULL && - ma->ma_desc->ad_type->sat_equality->smr_usage & SLAP_MR_EXT ) - { - /* no matching rule was provided, use the attribute's - equality rule if it supports extensible matching. */ - ma->ma_rule = ma->ma_desc->ad_type->sat_equality; - - } else { - mra_free( ma, 1 ); - *text = "no appropriate matching rule"; - return LDAP_INAPPROPRIATE_MATCHING; - } -#endif -#ifdef SLAP_X_MRA_MATCH_DNATTRS if ( ma->ma_desc != NULL ) { -#endif /* SLAP_X_MRA_MATCH_DNATTRS */ if( !mr_usable_with_at( ma->ma_rule, ma->ma_desc->ad_type ) ) { mra_free( ma, 1 ); *text = "matching rule use with this attribute not appropriate"; @@ -268,7 +224,6 @@ get_mra( */ rc = value_validate_normalize( ma->ma_desc, SLAP_MR_EQUALITY, &value, &ma->ma_value, text ); -#ifdef SLAP_X_MRA_MATCH_DNATTRS } else { /* * Need to normalize, but how? @@ -279,7 +234,6 @@ get_mra( } } -#endif /* SLAP_X_MRA_MATCH_DNATTRS */ if( rc != LDAP_SUCCESS ) { mra_free( ma, 1 );