ecf3cc3 Ticket 394 - modify-delete userpassword

Authored and Committed by mreynolds 11 years ago
    Ticket 394 - modify-delete userpassword
    
    Bug Description:  Attempting to delete a specific user password results in an error 16 - if
                      you are not using clear-text password storage scheme.
    
    Fix Description:  The error is caused because it can not find a userpassword attr with
                      the clear-text password - as its usually encoded.  If you know the correct
                      userpassword encoded value to delete, then you won't get an error 16, but
                      the unhashed userpassword will not be removed.
    
                      This fix checks the scheme of the password value to delete, then compares it
                      to all the userpassword attrs.  Once we find a match, we change the "value to delete"
                      to the encoded value.
    
                      If you do supply an encoded password value to delete, we do the opposite.  We
                      grab all the clear-text unhashed userpasswords from the password entry extension.
                      Then we compare each one to the hashed value.  If we have a match, we know which
                      unhashed userpassword to delete.
    
                      Also, added a check to make sure we don't add encoded values to the unhashed_password
                      extension.
    
    https://fedorahosted.org/389/ticket/394
    
    Reviewed by: richm (Thank you)
    
        
file modified
+161 -9