r23034: Thanks to metze for providing some vital clues in the 'kerberos ccache
authorAndrew Bartlett <abartlet@samba.org>
Mon, 21 May 2007 11:57:56 +0000 (11:57 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 19:52:43 +0000 (14:52 -0500)
on credentials don't do anything' bug.

The problem was simple, we didn't set the ccache as having been
initialised, so we always created a new one.

Andrew Bartlett
(This used to be commit ec2014f08b0845bc8aa0e8e6713bc4b21f430811)

source4/auth/credentials/credentials_krb5.c

index 58b5c1df3bf2a288a05729cd055c704abc194386..2188bf6ad89334ee6b90c6acebbfa5a14c0fdfee 100644 (file)
@@ -247,6 +247,9 @@ int cli_credentials_new_ccache(struct cli_credentials *cred, struct ccache_conta
                *_ccc = ccc;
        }
 
+       cred->ccache_obtained = (MAX(MAX(cred->principal_obtained, 
+                                        cred->username_obtained), 
+                                    cred->password_obtained));
        return ret;
 }
 
@@ -259,8 +262,9 @@ int cli_credentials_get_ccache(struct cli_credentials *cred,
                cli_credentials_set_machine_account(cred);
        }
 
-       if (cred->ccache_obtained >= (MAX(cred->principal_obtained, 
-                                         cred->username_obtained))) {
+       if (cred->ccache_obtained >=(MAX(MAX(cred->principal_obtained, 
+                                            cred->username_obtained), 
+                                        cred->password_obtained))) {
                *ccc = cred->ccache;
                return 0;
        }