03103f1 Ticket 50905 - intermittent SSL hang with rhds

Authored and Committed by tbordaz 3 years ago
    Ticket 50905 - intermittent SSL hang with rhds
    
    Bug Description:
    	On a successfull sasl bind, a new IO layer (sasl_io_enable) is registered on top of
    	the connection. Then sasl bind sends the successful result. Registration is
    	done while sasl bind thread holds c_mutex but result is sent while the c_mutex
    	is released.
    
    	If a new operation comes in just after c_mutex was released it is
    	possible that sasl bind sends the result while the new IO layer is pushed.
            IO layers is partially initialized at that time. It can create sigseg or
    	deadlock or...
    
    Fix Description:
    	The fix is to protect the send result from IO layer push.
    	i.e. move send_ldap_result into c_mutex
    
    https://pagure.io/389-ds-base/issue/50905
    
    Reviewed by: Mark Reynolds (Thanks !!)
    
    Platforms tested: F29
    
    Flag Day: no
    
    Doc impact: no