Windows: krb5_cc_get_prefix_ops test drive letter

If the prefix starts with a drive letter then it is a FILE ccache.

Change-Id: I03399f8f512d555481608d2fc90c8d6ecaba73ad
This commit is contained in:
Jeffrey Altman
2013-09-15 02:43:27 -04:00
parent bc7a1533b9
commit d0b8bb27d5

View File

@@ -979,9 +979,17 @@ krb5_cc_get_prefix_ops(krb5_context context, const char *prefix)
if (prefix == NULL)
return KRB5_DEFAULT_CCTYPE;
/* Is absolute path? Or UNC path? */
if (ISPATHSEP(prefix[0]))
return &krb5_fcc_ops;
#ifdef _WIN32
/* Is drive letter? */
if (isalpha(prefix[0]) && prefix[1] == ':')
return &krb5_fcc_ops;
#endif
p = strdup(prefix);
if (p == NULL) {
krb5_enomem(context);