andykimpe / rpms / 389-ds-base

Forked from rpms/389-ds-base 5 months ago
Clone
dc8c34
From 11f1cb86ed566729bd4806868a3c6beadc4a8013 Mon Sep 17 00:00:00 2001
dc8c34
From: Mark Reynolds <mreynolds@redhat.com>
dc8c34
Date: Mon, 14 Apr 2014 15:49:33 -0400
dc8c34
Subject: [PATCH 200/225] Ticket 47736 - Import incorrectly updates
dc8c34
 numsubordinates for tombstone entries
dc8c34
dc8c34
Bug Description:  Imports incorrectly updates numsubordinates when processing
dc8c34
                  tombstone entries.
dc8c34
dc8c34
Fix Description:  Fix the logic in the condition test for updating parentid.
dc8c34
dc8c34
https://fedorahosted.org/389/ticket/47736
dc8c34
dc8c34
Reviewed by: rmeggins & nhosoi(Thanks!!)
dc8c34
(cherry picked from commit 73d63726151dedd930f1ad3bbd2dd050506a57d9)
dc8c34
---
dc8c34
 ldap/servers/slapd/back-ldbm/import-threads.c | 8 ++++----
dc8c34
 1 file changed, 4 insertions(+), 4 deletions(-)
dc8c34
dc8c34
diff --git a/ldap/servers/slapd/back-ldbm/import-threads.c b/ldap/servers/slapd/back-ldbm/import-threads.c
dc8c34
index d30936e..e615bb1 100644
dc8c34
--- a/ldap/servers/slapd/back-ldbm/import-threads.c
dc8c34
+++ b/ldap/servers/slapd/back-ldbm/import-threads.c
dc8c34
@@ -2349,9 +2349,9 @@ import_foreman(void *param)
dc8c34
             goto error;
dc8c34
         }
dc8c34
 
dc8c34
-        if (entryrdn_get_switch() /* subtree-rename: on */ ||
dc8c34
-            !slapi_entry_flag_is_set(fi->entry->ep_entry,
dc8c34
-                                     SLAPI_ENTRY_FLAG_TOMBSTONE)) {
dc8c34
+        if ((entryrdn_get_switch() /* subtree-rename: on */ &&
dc8c34
+             !slapi_entry_flag_is_set(fi->entry->ep_entry, SLAPI_ENTRY_FLAG_TOMBSTONE)) ||
dc8c34
+            !entryrdn_get_switch() ) {
dc8c34
             /* parentid index
dc8c34
              * (we have to do this here, because the parentID is dependent on
dc8c34
              * looking up by entrydn/entryrdn.)
dc8c34
@@ -2362,7 +2362,7 @@ import_foreman(void *param)
dc8c34
             if (ret != 0)
dc8c34
                 goto error;
dc8c34
         }
dc8c34
-            
dc8c34
+
dc8c34
         if (!slapi_entry_flag_is_set(fi->entry->ep_entry,
dc8c34
                                      SLAPI_ENTRY_FLAG_TOMBSTONE)) {
dc8c34
             /* Lastly, before we're finished with the entry, pass it to the 
dc8c34
-- 
dc8c34
1.8.1.4
dc8c34