mreynolds / 389-ds-base

Forked from 389-ds-base 6 years ago
Clone

9631f7f Ticket 49243 - segv in memberof fixup

Authored and Committed by William Brown 7 years ago
    Ticket 49243 - segv in memberof fixup
    
    Bug Description:  Due to the change in the way the pblock was structured,
    we previously would NULL the content of SLAPI_PARENT_TXN. As PARENT_TXN
    was never set, we never noticed that it wasn't used.
    
    However, with the change to the pblock, because pb_plugin_intop was NULL,
    we would not NULL the parent_txn. This mean that it would be filled with
    garbage from the stack. When txn was called in bdb, this would attempt
    to deref the garbage resulting in a segfault.
    
    Fix Description:  When we do not provide a parent_txn, provide
    a null. In the stack, NULL the content by setting {0}. Finally,
    remove the call to SLAPI_PARENT_TXN, because it's never set, so
    it's always NULL. This lets us relocate the value to pb_deprecated
    because we don't use it anymore.
    
    You can test this with test ticket47560_test.py
    
    https://pagure.io/389-ds-base/issue/49243
    
    Author: wibrown
    
    Review by: mreynolds (Thanks!)
    
        
file modified
+6 -4