summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2013-07-11 13:44:53 +0200
committerAndreas Schneider <asn@cryptomilk.org>2013-07-15 12:48:46 +0200
commit0529b59fbe3f96509893fc4e93a75d6928b5a532 (patch)
treeb17730d759091ac0e32844af9e18e51a0d0c33e1 /source3
parent940395d38bcc348eb5f1be7ba03cd554d9d3bc93 (diff)
downloadsamba-0529b59fbe3f96509893fc4e93a75d6928b5a532.tar.gz
samba-0529b59fbe3f96509893fc4e93a75d6928b5a532.tar.bz2
samba-0529b59fbe3f96509893fc4e93a75d6928b5a532.zip
s3-winbind: Do not delete an existing valid credential cache.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=9994 Thanks to David Woodhouse <dwmw2@infradead.org>. Reviewed-by: Günther Deschner <gd@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Mon Jul 15 12:48:46 CEST 2013 on sn-devel-104
Diffstat (limited to 'source3')
-rw-r--r--source3/winbindd/winbindd_pam.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source3/winbindd/winbindd_pam.c b/source3/winbindd/winbindd_pam.c
index 158a7c431d..aed47416ac 100644
--- a/source3/winbindd/winbindd_pam.c
+++ b/source3/winbindd/winbindd_pam.c
@@ -685,6 +685,14 @@ static NTSTATUS winbindd_raw_kerberos_login(TALLOC_CTX *mem_ctx,
return NT_STATUS_OK;
failed:
+ /*
+ * Do not delete an existing valid credential cache, if the user
+ * e.g. enters a wrong password
+ */
+ if ((strequal(krb5_cc_type, "FILE") || strequal(krb5_cc_type, "WRFILE"))
+ && user_ccache_file != NULL) {
+ return result;
+ }
/* we could have created a new credential cache with a valid tgt in it
* but we werent able to get or verify the service ticket for this