summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2007-05-21 11:57:56 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:52:43 -0500
commit4dbbf7fed362cab64237fa64af5640fccf4a9b4c (patch)
treecf05e9177cecaf07b332c917f11f4112fdf5acaa
parent1b6792585130d17dfbd819bea275595bec06bc91 (diff)
downloadsamba-4dbbf7fed362cab64237fa64af5640fccf4a9b4c.tar.gz
samba-4dbbf7fed362cab64237fa64af5640fccf4a9b4c.tar.xz
samba-4dbbf7fed362cab64237fa64af5640fccf4a9b4c.zip
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)
-rw-r--r--source4/auth/credentials/credentials_krb5.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source4/auth/credentials/credentials_krb5.c b/source4/auth/credentials/credentials_krb5.c
index 58b5c1df3bf..2188bf6ad89 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;
}