winbind: Don't delete an existing krb5 ticket on cached logon.
authorJeremy Allison <jra@samba.org>
Thu, 3 Sep 2015 00:12:33 +0000 (17:12 -0700)
committerJeremy Allison <jra@samba.org>
Thu, 3 Sep 2015 23:35:16 +0000 (01:35 +0200)
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 <jra@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Sep  4 01:35:16 CEST 2015 on sn-devel-104

source3/winbindd/winbindd_cred_cache.c

index 3ca45d76a820154f4d249f45408301a242daf0e0..e113f998a3b4230ffa996400fced668798eb379b 100644 (file)
@@ -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) {