From 73d63726151dedd930f1ad3bbd2dd050506a57d9 Mon Sep 17 00:00:00 2001 From: Mark Reynolds Date: Apr 14 2014 20:03:28 +0000 Subject: Ticket 47736 - Import incorrectly updates numsubordinates for tombstone entries Bug Description: Imports incorrectly updates numsubordinates when processing tombstone entries. Fix Description: Fix the logic in the condition test for updating parentid. https://fedorahosted.org/389/ticket/47736 Reviewed by: rmeggins & nhosoi(Thanks!!) --- diff --git a/ldap/servers/slapd/back-ldbm/import-threads.c b/ldap/servers/slapd/back-ldbm/import-threads.c index d30936e..e615bb1 100644 --- a/ldap/servers/slapd/back-ldbm/import-threads.c +++ b/ldap/servers/slapd/back-ldbm/import-threads.c @@ -2349,9 +2349,9 @@ import_foreman(void *param) goto error; } - if (entryrdn_get_switch() /* subtree-rename: on */ || - !slapi_entry_flag_is_set(fi->entry->ep_entry, - SLAPI_ENTRY_FLAG_TOMBSTONE)) { + if ((entryrdn_get_switch() /* subtree-rename: on */ && + !slapi_entry_flag_is_set(fi->entry->ep_entry, SLAPI_ENTRY_FLAG_TOMBSTONE)) || + !entryrdn_get_switch() ) { /* parentid index * (we have to do this here, because the parentID is dependent on * looking up by entrydn/entryrdn.) @@ -2362,7 +2362,7 @@ import_foreman(void *param) if (ret != 0) goto error; } - + if (!slapi_entry_flag_is_set(fi->entry->ep_entry, SLAPI_ENTRY_FLAG_TOMBSTONE)) { /* Lastly, before we're finished with the entry, pass it to the