summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-06-08 08:51:56 +1000
committerAndrew Bartlett <abartlet@samba.org>2011-06-08 03:08:22 +0200
commit8dbab93f28d8ddbce8f44116f45a107a05a59a15 (patch)
tree5a9f3a7270a847d4302898235392ce65657bd7c5
parent5fb27814ad5566b264acf0f014d1721afc39b176 (diff)
downloadsamba-8dbab93f28d8ddbce8f44116f45a107a05a59a15.tar.gz
samba-8dbab93f28d8ddbce8f44116f45a107a05a59a15.tar.bz2
samba-8dbab93f28d8ddbce8f44116f45a107a05a59a15.zip
s4-credentials Allow use of file-based credentials caches for debugging.
This means that we will leave a slew of file based credentials caches in /tmp, which should give some clues to the administrator or developer via klist as to what has gone wrong. Andrew Bartlett
-rw-r--r--source4/auth/credentials/credentials_krb5.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/source4/auth/credentials/credentials_krb5.c b/source4/auth/credentials/credentials_krb5.c
index bfba1679f7..aba010453d 100644
--- a/source4/auth/credentials/credentials_krb5.c
+++ b/source4/auth/credentials/credentials_krb5.c
@@ -235,9 +235,15 @@ static int cli_credentials_new_ccache(struct cli_credentials *cred,
if (!ccache_name) {
must_free_cc_name = true;
- ccache_name = talloc_asprintf(ccc, "MEMORY:%p",
- ccc);
-
+
+ if (lpcfg_parm_bool(lp_ctx, NULL, "credentials", "krb5_cc_file", false)) {
+ ccache_name = talloc_asprintf(ccc, "FILE:/tmp/krb5_cc_samba_%u_%p",
+ (unsigned int)getpid(), ccc);
+ } else {
+ ccache_name = talloc_asprintf(ccc, "MEMORY:%p",
+ ccc);
+ }
+
if (!ccache_name) {
talloc_free(ccc);
(*error_string) = strerror(ENOMEM);