Windows: KFW_AFS should use API: ccache

During the Heimdal transition that default ccache type
was changed to FILE.  Restore the use of API: ccaches.

Change-Id: Idd8dfb46fc9167d8c1eb44466b76906a152eef9d
Reviewed-on: http://gerrit.openafs.org/5802
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
This commit is contained in:
Jeffrey Altman 2011-11-03 16:39:18 -04:00 committed by Jeffrey Altman
parent 100144f28b
commit 8d0910be59

View File

@ -679,32 +679,23 @@ get_default_ccache_name_for_principal(krb5_context context, krb5_principal princ
char ** cc_name)
{
char * pname = NULL;
char * epname = NULL;
krb5_error_code code;
size_t len = 0;
char temppath[MAX_PATH]="";
*cc_name = NULL;
code = krb5_unparse_name(context, principal, &pname);
if (code) goto cleanup;
escape_unsafe_principal_characters(pname, &epname);
len = strlen(epname);
len += 21;
len = strlen(pname) + 5;
*cc_name = (char *) malloc(len);
GetTempPathA(MAX_PATH, temppath);
StringCbPrintfA(*cc_name, len, "FILE:%skrb5cc_%s", temppath, epname);
StringCbPrintfA(*cc_name, len, "API:%s", pname, GetCurrentThreadId());
cleanup:
if (pname)
krb5_free_unparsed_name(context, pname);
if (epname)
free(epname);
return;
}