Blame SOURCES/0082-Ticket-49431-replicated-MODRDN-fails-breaking-replic.patch

61f723
From 557f4d4ed5e37f09691d383dd8189b642ade8f2b Mon Sep 17 00:00:00 2001
61f723
From: Ludwig Krispenz <lkrispen@redhat.com>
61f723
Date: Sun, 29 Oct 2017 16:32:11 +0100
61f723
Subject: [PATCH] Ticket 49431 - replicated MODRDN fails breaking replication
61f723
61f723
Bug: in urp modrdn_operation not a full dn was passed to generate the conflict rdn passed
61f723
    and so the sufix test failed
61f723
61f723
Fix: provide full dn of new entry
61f723
61f723
Reviewed by: Mark, Thanks
61f723
---
61f723
 ldap/servers/plugins/replication/urp.c | 9 ++++++++-
61f723
 1 file changed, 8 insertions(+), 1 deletion(-)
61f723
61f723
diff --git a/ldap/servers/plugins/replication/urp.c b/ldap/servers/plugins/replication/urp.c
61f723
index 64810e9d4..21319d9f7 100644
61f723
--- a/ldap/servers/plugins/replication/urp.c
61f723
+++ b/ldap/servers/plugins/replication/urp.c
61f723
@@ -433,7 +433,14 @@ urp_modrdn_operation( Slapi_PBlock *pb )
61f723
 			/* The target entry is a loser */
61f723
 
61f723
 			char *newrdn_with_uniqueid;
61f723
-			newrdn_with_uniqueid= get_rdn_plus_uniqueid (sessionid, newrdn, op_uniqueid);
61f723
+			char *newdn = NULL;
61f723
+                        if (new_parent_entry) {
61f723
+                            newdn = slapi_ch_smprintf("%s,%s", newrdn, slapi_entry_get_dn(new_parent_entry));
61f723
+                        } else {
61f723
+                            newdn = slapi_ch_smprintf("%s,%s", newrdn, slapi_entry_get_dn(parent_entry));
61f723
+                        }
61f723
+			newrdn_with_uniqueid= get_rdn_plus_uniqueid (sessionid, newdn, op_uniqueid);
61f723
+			slapi_ch_free_string(&newdn);
61f723
 			if(newrdn_with_uniqueid==NULL)
61f723
 			{
61f723
 				op_result= LDAP_OPERATIONS_ERROR;
61f723
-- 
61f723
2.13.6
61f723