mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-21 07:09:34 -05:00
ITS#5972 Consider all deletes for syncInfo messages
A delete of an entry that didn't match filter would be skipped altogether and the cookie would never be sent to that consumer.
This commit is contained in:
parent
6f31d73dc0
commit
4b18c2be00
1 changed files with 5 additions and 22 deletions
|
|
@ -1296,7 +1296,9 @@ syncprov_matchops( Operation *op, opcookie *opc, int saveit )
|
||||||
fc.fdn = &newdn;
|
fc.fdn = &newdn;
|
||||||
freefdn = 1;
|
freefdn = 1;
|
||||||
}
|
}
|
||||||
if ( op->o_tag != LDAP_REQ_ADD ) {
|
if ( !saveit && op->o_tag == LDAP_REQ_DELETE ) {
|
||||||
|
/* Delete succeeded, there is no entry */
|
||||||
|
} else if ( op->o_tag != LDAP_REQ_ADD ) {
|
||||||
if ( !SLAP_ISOVERLAY( op->o_bd )) {
|
if ( !SLAP_ISOVERLAY( op->o_bd )) {
|
||||||
db = *op->o_bd;
|
db = *op->o_bd;
|
||||||
op->o_bd = &db;
|
op->o_bd = &db;
|
||||||
|
|
@ -1412,7 +1414,7 @@ syncprov_matchops( Operation *op, opcookie *opc, int saveit )
|
||||||
}
|
}
|
||||||
|
|
||||||
rc = LDAP_COMPARE_FALSE;
|
rc = LDAP_COMPARE_FALSE;
|
||||||
if ( !is_entry_glue( e ) && fc.fscope ) {
|
if ( e && !is_entry_glue( e ) && fc.fscope ) {
|
||||||
ldap_pvt_thread_mutex_lock( &ss->s_mutex );
|
ldap_pvt_thread_mutex_lock( &ss->s_mutex );
|
||||||
op2 = *ss->s_op;
|
op2 = *ss->s_op;
|
||||||
oh = *op->o_hdr;
|
oh = *op->o_hdr;
|
||||||
|
|
@ -2569,26 +2571,7 @@ added:
|
||||||
have_psearches = ( si->si_ops != NULL );
|
have_psearches = ( si->si_ops != NULL );
|
||||||
ldap_pvt_thread_mutex_unlock( &si->si_ops_mutex );
|
ldap_pvt_thread_mutex_unlock( &si->si_ops_mutex );
|
||||||
if ( have_psearches ) {
|
if ( have_psearches ) {
|
||||||
switch(op->o_tag) {
|
|
||||||
case LDAP_REQ_ADD:
|
|
||||||
case LDAP_REQ_MODIFY:
|
|
||||||
case LDAP_REQ_MODRDN:
|
|
||||||
case LDAP_REQ_EXTENDED:
|
|
||||||
syncprov_matchops( op, opc, 0 );
|
syncprov_matchops( op, opc, 0 );
|
||||||
break;
|
|
||||||
case LDAP_REQ_DELETE:
|
|
||||||
/* for each match in opc->smatches:
|
|
||||||
* send DELETE msg
|
|
||||||
*/
|
|
||||||
for ( sm = opc->smatches; sm; sm=sm->sm_next ) {
|
|
||||||
if ( sm->sm_op->s_op->o_abandon )
|
|
||||||
continue;
|
|
||||||
syncprov_qresp( opc, sm->sm_op, LDAP_SYNC_DELETE );
|
|
||||||
}
|
|
||||||
if ( opc->ssres.s_info )
|
|
||||||
free_resinfo( &opc->ssres );
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Add any log records */
|
/* Add any log records */
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue