8a83a93 Ticket #48536 - Crash in slapi_get_object_extension

Authored and Committed by nhosoi 8 years ago
    Ticket #48536 - Crash in slapi_get_object_extension
    
    Description: The crashed was caused by the combination of psearch and
    updating one of these group values: groupOfNames, groupOfUniqueNames,
    groupOfCertificates, groupOfURL.
    
    In the psearch, it creates aclpb in the acl plug-in and sets the original
    pblock address in the aclpb. Then, psearch creates a copy of the pblock and
    sets it in the psearch structure.  Now, the pblock address in aclpb and the
    pblock address in the psearch structure do not match. The original pblock
    itself is freed and the pblock area which address is stored in aclpb is not
    guaranteed what is in it.
    
    If nothing occurs, the freed pblock in aclpb is not accessed. But once one
    of the group values is updated, the acl plug-in signature is updated and it
    triggers to get aclpb from the pblock.
    
    The acl_get_aclpb call accesses the freed pblock (e.g., NULL op) and it
    crashes the server.
    
    This patch checks the current pblock address and the pblock address in aclpb.
    If they don't match, the address in aclpb is reassigned to the current pblock
    address.
    
    https://fedorahosted.org/389/ticket/48536
    
    Reviewed by mreynolds@redhat.com (Thank you, Mark!!)
    
    (cherry picked from commit 091a5f5daf3fa378f029e293c5358ae9be9f548e)