op->o_req_ndn = op->o_bd->be_nsuffix[0];
/* update contextCSN */
- op->o_msgid = SLAP_SYNC_UPDATE_MSGID;
+ op->o_dont_replicate = 1;
op->orm_modlist = &mod;
op->orm_no_opattrs = 1;
rc = op->o_bd->be_modify( op, &rs_modify );
op->orm_no_opattrs = 0;
- op->o_msgid = 0;
+ op->o_dont_replicate = 0;
if ( rs_modify.sr_err == LDAP_SUCCESS ) {
slap_sync_cookie_free( &si->si_syncCookie, 0 );
* Modify would fail if provider has replaced entry with a new,
* and the new explicitly includes a superior of a class that was
* only included implicitly in the old entry. Ref ITS#5517.
+ *
+ * Also use replace op if attr has no equality matching rule.
+ * (ITS#5781)
*/
- if ( nn && no < o && old->a_desc == slap_schema.si_ad_objectClass )
+ if ( nn && no < o &&
+ ( old->a_desc == slap_schema.si_ad_objectClass ||
+ !old->a_desc->ad_type->sat_equality ))
no = o;
i = j;