2aabb01 Ticket #47897 - Need to move slapi_pblock_set(pb, SLAPI_MODRDN_EXISTING_ENTRY, original_entry->ep_entry) prior to original_entry overwritten

Authored and Committed by nhosoi 9 years ago
    Ticket #47897 - Need to move slapi_pblock_set(pb, SLAPI_MODRDN_EXISTING_ENTRY, original_entry->ep_entry) prior to original_entry overwritten
    
    Bug Description: In the DEADLOCK retry code in ldbm_back_modrdn,
    SLAPI_MODRDN_EXISTING_ENTRY in pblock is reset with the new entry
    to be renamed.  The location of the setting entry was inappropriate,
    thus instead of the entry, but its backup is set in pblock.
    
    Fix Description: Moving the slapi_pblock_set(SLAPI_MODRDN_EXISTING_
    ENTRY) to the correct position.
    
    Plus, in the DEADLOCK retry code, original_entry is duplicated and
    used for the next loop.  The source of the duplication has to be
    the clean entry before updated in the backend code, but in ldbm_add,
    ldbm_modify, and ldbm_modrdn, the current entry was duplicated and
    set to the original entry, which could have been updated in the
    previous loop.  This patch fixes it, as well.
    
    https://fedorahosted.org/389/ticket/47897
    
    Reviewed by tbordaz@redhat.com (Thank you, Theirry!!)