a8a6664 Avoid race condition caused by profile delete and recreate

1 file Authored by ftweedal 8 years ago, Committed by jcholast 8 years ago,
    Avoid race condition caused by profile delete and recreate
    
    When importing IPA-managed certificate profiles into Dogtag,
    profiles with the same name (usually caIPAserviceCert) are removed,
    then immediately recreated with the new profile data.  This causes a
    race condition - Dogtag's LDAPProfileSystem profileChangeMonitor
    thread could observe and process the deletion after the profile was
    recreated, disappearing it again.
    
    Update the profile instead of deleting and recreating it to avoid
    this race condition.
    
    Fixes: https://fedorahosted.org/freeipa/ticket/5269
    Reviewed-By: Jan Cholasta <jcholast@redhat.com>