From 97328ffdf244a1b8fcd947ee4480359078c42480 Mon Sep 17 00:00:00 2001 From: Quanah Gibson-Mount Date: Thu, 10 Jul 2008 02:52:39 +0000 Subject: [PATCH] ITS#5600 --- CHANGES | 1 + servers/slapd/syncrepl.c | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/CHANGES b/CHANGES index 293b54382a..9b98c825f4 100644 --- a/CHANGES +++ b/CHANGES @@ -14,6 +14,7 @@ OpenLDAP 2.4.11 Engineering Fixed slapd sets memory leak (ITS#5557) Fixed slapd sortvals binary search (ITS#5578) Fixed slapd syncrepl updates with multiple masters (ITS#5597) + Fixed slapd syncrepl superior objectClass delete/add (ITS#5600) Fixed slapd syncrepl/slapo-syncprov contextCSN updates as internal ops (ITS#5596) Added slapd-ldap/slapd-meta option to filter out search references (ITS#5593) Fixed slapd-meta link to slapd-ldap (ITS#5355) diff --git a/servers/slapd/syncrepl.c b/servers/slapd/syncrepl.c index a3164aeb36..7c08cb07df 100644 --- a/servers/slapd/syncrepl.c +++ b/servers/slapd/syncrepl.c @@ -2883,6 +2883,14 @@ attr_cmp( Operation *op, Attribute *old, Attribute *new, } } + /* Don't delete/add an objectClass, always use the replace op. + * 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. + */ + if ( nn && no < o && old->a_desc == slap_schema.si_ad_objectClass ) + no = o; + i = j; /* all old values were deleted, just use the replace op */ if ( no == o ) { -- 2.39.5