--- servers/slapd/syncrepl.c 2008/10/24 11:16:06 1.417 +++ servers/slapd/syncrepl.c 2008/10/30 17:22:11 1.418 @@ -1,5 +1,5 @@ /* syncrepl.c -- Replication Engine which uses the LDAP Sync protocol */ -/* $OpenLDAP: pkg/ldap/servers/slapd/syncrepl.c,v 1.416 2008/10/22 21:37:34 ando Exp $ */ +/* $OpenLDAP: pkg/ldap/servers/slapd/syncrepl.c,v 1.417 2008/10/24 11:16:06 hallvard Exp $ */ /* This work is part of OpenLDAP Software . * * Copyright 2003-2008 The OpenLDAP Foundation. @@ -2900,8 +2900,13 @@ attr_cmp( Operation *op, Attribute *old, * 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;