honor RFC4528 assertion control for LDAP add operations (ITS#5861)

This commit is contained in:
Pierangelo Masarati 2008-12-20 22:49:53 +00:00
parent b334844a70
commit e0ad0fbd8d
2 changed files with 8 additions and 2 deletions

View File

@ -112,6 +112,13 @@ txnReturn:
goto return_results;
}
if ( get_assert( op ) &&
( test_filter( op, op->ora_e, get_assertion( op )) != LDAP_COMPARE_TRUE ))
{
rs->sr_err = LDAP_ASSERTION_FAILED;
goto return_results;
}
subentry = is_entry_subentry( op->oq_add.rs_e );
/* Get our reader TXN */

View File

@ -123,8 +123,7 @@ static char *session_tracking_extops[] = {
static struct slap_control control_defs[] = {
{ LDAP_CONTROL_ASSERT,
(int)offsetof(struct slap_control_ids, sc_assert),
SLAP_CTRL_DELETE|SLAP_CTRL_MODIFY|SLAP_CTRL_RENAME|
SLAP_CTRL_COMPARE|SLAP_CTRL_SEARCH,
SLAP_CTRL_UPDATE|SLAP_CTRL_COMPARE|SLAP_CTRL_SEARCH,
NULL, NULL,
parseAssert, LDAP_SLIST_ENTRY_INITIALIZER(next) },
{ LDAP_CONTROL_PRE_READ,