Blame SOURCES/0005-Issue-49624-modrdn-silently-fails-if-DB-deadlock-occ.patch

4c04d8
From f50dfbb61224e6a9516b93cd3d3957c1fde4798e Mon Sep 17 00:00:00 2001
e79480
From: Mark Reynolds <mreynolds@redhat.com>
e79480
Date: Thu, 22 Aug 2019 10:26:24 -0400
e79480
Subject: [PATCH] Issue 49624 - modrdn silently fails if DB deadlock occurs
e79480
e79480
Bug Description:
e79480
e79480
If a DB Deadlock error occurs during a modrdn operation the entry
e79480
cache gets updated (corrupted), but the update is not applied to
e79480
the database.
e79480
e79480
Fix Description:
e79480
e79480
Looks like there was a copy & paste error, and the wrong attribute
e79480
was updated during the retry of the modrdn operation.
e79480
e79480
relates: https://pagure.io/389-ds-base/issue/49624
e79480
e79480
Reviewed by: lkrispenz (Thanks!)
e79480
---
e79480
 ldap/servers/slapd/back-ldbm/ldbm_modrdn.c | 2 +-
e79480
 1 file changed, 1 insertion(+), 1 deletion(-)
e79480
e79480
diff --git a/ldap/servers/slapd/back-ldbm/ldbm_modrdn.c b/ldap/servers/slapd/back-ldbm/ldbm_modrdn.c
e79480
index 65610d613..433ed88fb 100644
e79480
--- a/ldap/servers/slapd/back-ldbm/ldbm_modrdn.c
e79480
+++ b/ldap/servers/slapd/back-ldbm/ldbm_modrdn.c
e79480
@@ -251,7 +251,7 @@ ldbm_back_modrdn(Slapi_PBlock *pb)
e79480
             slapi_pblock_get(pb, SLAPI_MODRDN_NEWSUPERIOR_SDN, &dn_newsuperiordn);
e79480
             slapi_sdn_free(&dn_newsuperiordn);
e79480
             slapi_pblock_set(pb, SLAPI_MODRDN_NEWSUPERIOR_SDN, orig_dn_newsuperiordn);
e79480
-            orig_dn_newsuperiordn = slapi_sdn_dup(orig_dn_newsuperiordn);
e79480
+            dn_newsuperiordn = slapi_sdn_dup(orig_dn_newsuperiordn);
e79480
             /* must duplicate ec before returning it to cache,
e79480
              * which could free the entry. */
e79480
             if ((tmpentry = backentry_dup(original_entry ? original_entry : ec)) == NULL) {
e79480
-- 
e79480
2.21.0
e79480