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:
@@ -979,9 +979,17 @@ krb5_cc_get_prefix_ops(krb5_context context, const char *prefix)
|
|||||||
|
|
||||||
if (prefix == NULL)
|
if (prefix == NULL)
|
||||||
return KRB5_DEFAULT_CCTYPE;
|
return KRB5_DEFAULT_CCTYPE;
|
||||||
|
|
||||||
|
/* Is absolute path? Or UNC path? */
|
||||||
if (ISPATHSEP(prefix[0]))
|
if (ISPATHSEP(prefix[0]))
|
||||||
return &krb5_fcc_ops;
|
return &krb5_fcc_ops;
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
/* Is drive letter? */
|
||||||
|
if (isalpha(prefix[0]) && prefix[1] == ':')
|
||||||
|
return &krb5_fcc_ops;
|
||||||
|
#endif
|
||||||
|
|
||||||
p = strdup(prefix);
|
p = strdup(prefix);
|
||||||
if (p == NULL) {
|
if (p == NULL) {
|
||||||
krb5_enomem(context);
|
krb5_enomem(context);
|
||||||
|
Reference in New Issue
Block a user