39ba12b Ticket #47422 - With 1.3.04 and subtree-renaming OFF, when a user is deleted after restarting the server, the same entry can't be added

Authored and Committed by nhosoi 10 years ago
    Ticket #47422 - With 1.3.04 and subtree-renaming OFF, when a user is deleted after restarting the server, the same entry can't be added
    
    Bug description:
    1) As reported by baburaje12, regardless of the  nsslapd-subtree-
       rename-switch, "entrydn" was not stored in the id2entry db. The
       attribute value had to be stored in the db file if the switch
       was off.  Attribute values to avoid storing in the db file are
       maintained in an array protected_attrs_all statically. "Entrydn"
       should be dynamic depending on the switch.
    2) When the switch is off, import was skipping to generate the
       parentid index, which leads to skipping to create the entrydn,
       as well.
    
    Fix description:
    1) Instead of keeping "entrydn" in the protected_attrs_all statically,
       this patch introduces an api set_attr_to_protected_list to add or
       remove "entrydn" based upon the value of nsslapd-subtree-rename-
       switch.
    2) The condition to create a parentid index is fixed to always
       create it if the nsslapd-subtree-rename-switch is off.
    
    https://fedorahosted.org/389/ticket/47422
    
    Reviewed by rmeggins (Thank you, Rich!)
    
        
file modified
+21 -3
file modified
+2 -0