X-Git-Url: https://git.openafs.org/?p=openafs.git;a=blobdiff_plain;f=src%2FWINNT%2Fafsd%2Fafskfw.c;h=160d92830e8cede4caa023bfcf8a2f1aa7de0b67;hp=c9020f3be916134013a098d5734108f14ebafd24;hb=3f3545024100f3efd7bb76925d3cb1b1c15ae3f4;hpb=7526681ef5c57a4ffe0c343717c3ed65a9120768 diff --git a/src/WINNT/afsd/afskfw.c b/src/WINNT/afsd/afskfw.c index c9020f3..160d928 100644 --- a/src/WINNT/afsd/afskfw.c +++ b/src/WINNT/afsd/afskfw.c @@ -657,6 +657,7 @@ KFW_AFS_update_princ_ccache_data(krb5_context ctx, krb5_ccache cc, int lsa) krb5_principal principal = 0; char * pname = NULL; const char * ccname = NULL; + const char * cctype = NULL; krb5_error_code code = 0; krb5_error_code cc_code = 0; krb5_cc_cursor cur; @@ -676,6 +677,9 @@ KFW_AFS_update_princ_ccache_data(krb5_context ctx, krb5_ccache cc, int lsa) ccname = pkrb5_cc_get_name(ctx, cc); if (!ccname) goto cleanup; + cctype = pkrb5_cc_get_type(ctx, cc); + if (!cctype) goto cleanup; + // Search the existing list to see if we have a match if ( next ) { for ( ; next ; next = next->next ) { @@ -690,7 +694,9 @@ KFW_AFS_update_princ_ccache_data(krb5_context ctx, krb5_ccache cc, int lsa) next->next = princ_cc_data; princ_cc_data = next; next->principal = _strdup(pname); - next->ccache_name = _strdup(ccname); + next->ccache_name = malloc(strlen(ccname) + strlen(cctype) + 2); + if (next->ccache_name) + sprintf(next->ccache_name, "%s:%s", cctype, ccname); next->from_lsa = lsa; next->expired = 1; next->expiration_time = 0;