7f81635 Trac Ticket #391 - Slapd crashes when deleting backends

Authored and Committed by Noriko Hosoi 11 years ago
    Trac Ticket #391 - Slapd crashes when deleting backends
        while operations are still in progress
    
    https://fedorahosted.org/389/ticket/391
    
    Bug Description: Deleting backend code ldbm_instance_delete_instance_
    entry_callback had no checking for the ordinary operations accessing
    the backend instance.  Even if some operations are still in progress,
    the backend instance could be deleted and it crashes the server.
    
    Fix Description: Backend struct ldbm_instance had a member inst_ref_
    count, which was not used.  This patch converts the type PRInt32 to
    Slapi_Counter and increments it when the backend instance is in use.
    The delete code checks the counter and if it is greater than 0, it
    returns SLAPI_DSE_CALLBACK_ERROR.