f9b2bec Ticket #47748 - Simultaneous adding a user and binding as the user could fail in the password policy check

Authored and Committed by nhosoi 10 years ago
    Ticket #47748 - Simultaneous adding a user and binding as the user could fail in the password policy check
    
    Bug description: In do_bind, bind_target_entry is retrieved from the
    DB or the entry cache.  There was a small window that the entry failed
    to retrieve from there but the bind procedure in the backend (be_bind)
    succeeds.  In the case, NULL bind_target_entry is passed to the Pass-
    word Policy check and it fails.
    
    Fix description: If be_bind returns SUCCESS and bind_target_entry is
    NULL, retrieve bind_target_entry agian, which is guaranteed since the
    entry was retrieved in the backend and placed in the entry cache.
    
    https://fedorahosted.org/389/ticket/47748
    
    Reviewed by rmeggins@redhat.com (Thank you, Rich!!)
    (cherry picked from commit 4fc53e1a63222d0ff67c30a59f2cff4b535f90a8)
    (cherry picked from commit f8f063c3fb2c7642506cbad923c71972f78edac2)
    (cherry picked from commit feed9ba773766ade744ca4d45aca46c91d4b7f4f)
    
        
file modified
+63 -42
file modified
+8 -9
file modified
+3 -0