From 4dbbf7fed362cab64237fa64af5640fccf4a9b4c Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Mon, 21 May 2007 11:57:56 +0000 Subject: r23034: Thanks to metze for providing some vital clues in the 'kerberos ccache 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 | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'source4/auth/credentials') diff --git a/source4/auth/credentials/credentials_krb5.c b/source4/auth/credentials/credentials_krb5.c index 58b5c1df3b..2188bf6ad8 100644 --- a/source4/auth/credentials/credentials_krb5.c +++ b/source4/auth/credentials/credentials_krb5.c @@ -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; } -- cgit