From: Kurt Zeilenga Date: Mon, 11 Mar 2002 16:29:01 +0000 (+0000) Subject: Return inappropriate matching if the syntaxes don't line up for X-Git-Tag: OPENLDAP_REL_ENG_2_MP~352 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=9eac390e2fa575a24cb9216c9afec46b1c33b640;p=openldap Return inappropriate matching if the syntaxes don't line up for extensible matching --- diff --git a/servers/slapd/filterentry.c b/servers/slapd/filterentry.c index cbd9c1438b..706e774841 100644 --- a/servers/slapd/filterentry.c +++ b/servers/slapd/filterentry.c @@ -237,14 +237,15 @@ static int test_mra_filter( return LDAP_INSUFFICIENT_ACCESS; } + /* no matching rule was provided, use the attribute's + equality rule if it supports extensible matching. */ if( mra->ma_rule == NULL && mra->ma_desc->ad_type->sat_equality && mra->ma_desc->ad_type->sat_equality->smr_usage & SLAP_MR_EXT ) { mra->ma_rule = mra->ma_desc->ad_type->sat_equality; - } - if( mra->ma_rule == NULL ) { + } else { return LDAP_INAPPROPRIATE_MATCHING; } @@ -255,7 +256,7 @@ static int test_mra_filter( if( strcmp(mra->ma_rule->smr_syntax->ssyn_oid, mra->ma_desc->ad_type->sat_syntax->ssyn_oid) != 0) { - return LDAP_INVALID_SYNTAX; + return LDAP_INAPPROPRIATE_MATCHING; } for(a = attrs_find( e->e_attrs, mra->ma_desc );