14c48ba Recover from invalid cached kerberos credentials in ipasam

Authored and Committed by abbra 11 years ago
    Recover from invalid cached kerberos credentials in ipasam
    
    When developing and testing in the same environment, multiple re-installs
    may be needed. This means previously issued and cached Kerberos credentials
    will become invalid upon new install.
    
    ipasam passdb module for Samba uses Kerberos authentication when talking to
    IPA LDAP server. Obtained Kerberos credentials are cached during their lifetime.
    However, the ccache is not removed automatically and if IPA setup is made
    again, cached credentials are used, only to discover that they are invalid.
    
    With this change invalid correctly obtained cached credentials are recognized
    and, if LDAP SASL bind fails, new credentials are requested from the KDC.
    
    https://fedorahosted.org/freeipa/ticket/3009
    
        
file modified
+77 -37