X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=servers%2Fslapd%2Fcompare.c;h=4b11aae38a4f6c230f0c2f1a4b4810046285699d;hb=c6b5abbfd20567116846ebc38f0005c429284c98;hp=0cc3181645d7ce7f22120f6e9b439f2657d94391;hpb=149313fd25adc504f38ee1a9198731151dd211db;p=openldap diff --git a/servers/slapd/compare.c b/servers/slapd/compare.c index 0cc3181645..4b11aae38a 100644 --- a/servers/slapd/compare.c +++ b/servers/slapd/compare.c @@ -1,7 +1,7 @@ /* $OpenLDAP$ */ /* This work is part of OpenLDAP Software . * - * Copyright 1998-2010 The OpenLDAP Foundation. + * Copyright 1998-2012 The OpenLDAP Foundation. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -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;