List all pdb modules in the spec file.
[ira/fedora-git] / samba-4.0.8-fix_winbind_ccache_cleanup.patch
1 From 91300255f4b93dad920af2399a6cd64720d47e4f Mon Sep 17 00:00:00 2001
2 From: Andreas Schneider <asn@samba.org>
3 Date: Thu, 11 Jul 2013 13:44:53 +0200
4 Subject: [PATCH] s3-winbind: Do not delete an existing valid credential cache.
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8
9 BUG: https://bugzilla.samba.org/show_bug.cgi?id=9994
10
11 Thanks to David Woodhouse <dwmw2@infradead.org>.
12
13 Reviewed-by: Günther Deschner <gd@samba.org>
14
15 Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
16 Autobuild-Date(master): Mon Jul 15 12:48:46 CEST 2013 on sn-devel-104
17
18 (cherry picked from commit 0529b59fbe3f96509893fc4e93a75d6928b5a532)
19 ---
20  source3/winbindd/winbindd_pam.c | 8 ++++++++
21  1 file changed, 8 insertions(+)
22
23 diff --git a/source3/winbindd/winbindd_pam.c b/source3/winbindd/winbindd_pam.c
24 index b23d421..99794e6 100644
25 --- a/source3/winbindd/winbindd_pam.c
26 +++ b/source3/winbindd/winbindd_pam.c
27 @@ -677,6 +677,14 @@ static NTSTATUS winbindd_raw_kerberos_login(TALLOC_CTX *mem_ctx,
28         return NT_STATUS_OK;
29  
30  failed:
31 +       /*
32 +        * Do not delete an existing valid credential cache, if the user
33 +        * e.g. enters a wrong password
34 +        */
35 +       if ((strequal(krb5_cc_type, "FILE") || strequal(krb5_cc_type, "WRFILE"))
36 +           && user_ccache_file != NULL) {
37 +               return result;
38 +       }
39  
40         /* we could have created a new credential cache with a valid tgt in it
41          * but we werent able to get or verify the service ticket for this
42 -- 
43 1.8.3.1
44