From: Howard Chu Date: Thu, 23 Dec 2010 21:53:05 +0000 (+0000) Subject: Move assertion checking to slap_compare_entry() X-Git-Tag: MIGRATION_CVS2GIT~337 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=56888eac306244553562aa00b312318b79d1d6c1;p=openldap Move assertion checking to slap_compare_entry() --- diff --git a/servers/slapd/back-bdb/compare.c b/servers/slapd/back-bdb/compare.c index c333fa5247..095033eb14 100644 --- a/servers/slapd/back-bdb/compare.c +++ b/servers/slapd/back-bdb/compare.c @@ -122,19 +122,6 @@ dn2entry_retry: goto done; } - if ( get_assert( op ) && - ( test_filter( op, e, get_assertion( op )) != LDAP_COMPARE_TRUE )) - { - if ( !access_allowed( op, e, slap_schema.si_ad_entry, - NULL, ACL_DISCLOSE, NULL ) ) - { - rs->sr_err = LDAP_NO_SUCH_OBJECT; - } else { - rs->sr_err = LDAP_ASSERTION_FAILED; - } - goto return_results; - } - rs->sr_err = slap_compare_entry( op, e, op->orc_ava ); return_results: diff --git a/servers/slapd/compare.c b/servers/slapd/compare.c index 0cc3181645..269d80ffc5 100644 --- a/servers/slapd/compare.c +++ b/servers/slapd/compare.c @@ -362,6 +362,13 @@ int slap_compare_entry( goto done; } + if ( get_assert( op ) && + ( test_filter( op, e, get_assertion( op )) != LDAP_COMPARE_TRUE )) + { + rc = LDAP_ASSERTION_FAILED; + goto done; + } + a = attrs_find( e->e_attrs, ava->aa_desc ); if( a == NULL ) { rc = LDAP_NO_SUCH_ATTRIBUTE;