]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/syncrepl.c
ITS#5710 fix stupid updateCookie hack, use explicit o_dont_replicate flag
[openldap] / servers / slapd / syncrepl.c
index b53032a3b7f128a4cb903b4448a03fc0081444c9..199c882c9361943af772d30c4c0d0413c863f0c1 100644 (file)
@@ -2809,13 +2809,13 @@ syncrepl_updateCookie(
        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 );
@@ -2900,8 +2900,13 @@ attr_cmp( Operation *op, Attribute *old, Attribute *new,
                 * 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;