From a42c7f96f5e024c2ffa51c69c8f050e6f9d5ade9 Mon Sep 17 00:00:00 2001 From: Rein Tollevik Date: Tue, 8 Jul 2008 13:55:09 +0000 Subject: [PATCH] ITS#5600 Replace objectClass, delete/add can fail if superior is added. --- servers/slapd/syncrepl.c | 8 ++++++++ 1 file changed, 8 insertions(+) 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