From 0fb8ea76527e26b97b8c03b15cc7b4bb847c7c92 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 Reviewed-by: Alexander Bokovoy Autobuild-User(master): Jeremy Allison Autobuild-Date(master): Fri Sep 4 01:35:16 CEST 2015 on sn-devel-104 --- source3/winbindd/winbindd_cred_cache.c | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/source3/winbindd/winbindd_cred_cache.c b/source3/winbindd/winbindd_cred_cache.c index 3ca45d76a82..e113f998a3b 100644 --- a/source3/winbindd/winbindd_cred_cache.c +++ b/source3/winbindd/winbindd_cred_cache.c @@ -501,9 +501,6 @@ NTSTATUS add_ccache_to_list(const char *princ_name, struct WINBINDD_CCACHE_ENTRY *entry = NULL; struct timeval t; NTSTATUS ntret; -#ifdef HAVE_KRB5 - int ret; -#endif if ((username == NULL && princ_name == NULL) || ccname == NULL || uid < 0) { @@ -516,27 +513,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.11.4.GIT