[PATCH] s3-winbind: Do not delete an existing valid credential cache.

Andreas Schneider asn at samba.org
Fri Jul 12 05:33:58 MDT 2013


BUG #9994

Thanks to David Woodhouse <dwmw2 at infradead.org>.

Signed-off-by: Andreas Schneider <asn at samba.org>
---
 source3/winbindd/winbindd_pam.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/source3/winbindd/winbindd_pam.c b/source3/winbindd/winbindd_pam.c
index 158a7c4..a64beb5 100644
--- a/source3/winbindd/winbindd_pam.c
+++ b/source3/winbindd/winbindd_pam.c
@@ -685,6 +685,13 @@ 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 (user_ccache_file) {
+		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
-- 
1.8.3.1




More information about the samba-technical mailing list