zrhoffman / rpms / 389-ds-base

Forked from rpms/389-ds-base 3 years ago
Clone

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

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