From 968cf5c918c7fed04af9d28d57269a90d174c4db Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 2 Sep 2015 17:12:33 -0700 Subject: [PATCH] winbind: Don't delete an existing krb5 ticket on cached logon. Cached logon doesn't mean the ticket is bad, wait until we go online again to determine that. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11198 Signed-off-by: Jeremy Allison --- source3/winbindd/winbindd_cred_cache.c | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/source3/winbindd/winbindd_cred_cache.c b/source3/winbindd/winbindd_cred_cache.c index 3ca45d7..5a2dbcd 100644 --- a/source3/winbindd/winbindd_cred_cache.c +++ b/source3/winbindd/winbindd_cred_cache.c @@ -516,27 +516,6 @@ NTSTATUS add_ccache_to_list(const char *princ_name, return NT_STATUS_NO_MORE_ENTRIES; } - /* If it is cached login, destroy krb5 ticket - * to avoid surprise. */ -#ifdef HAVE_KRB5 - if (postponed_request) { - /* ignore KRB5_FCC_NOFILE error here */ - ret = ads_kdestroy(ccname); - if (ret == KRB5_FCC_NOFILE) { - ret = 0; - } - if (ret) { - DEBUG(0, ("add_ccache_to_list: failed to destroy " - "user krb5 ccache %s with %s\n", ccname, - error_message(ret))); - return krb5_to_nt_status(ret); - } - DEBUG(10, ("add_ccache_to_list: successfully destroyed " - "krb5 ccache %s for user %s\n", ccname, - username)); - } -#endif - /* Reference count old entries */ entry = get_ccache_by_username(username); if (entry) { -- 2.5.0.457.gab17608