krb5: Make FILE ccache type a collection type!
This commit is contained in:
@@ -410,9 +410,22 @@ krb5_cc_resolve_for(krb5_context context,
|
||||
ret = krb5_unparse_name(context, principal, &p);
|
||||
if (ret)
|
||||
return ret;
|
||||
/* Subsidiary components cannot have ':'s in them */
|
||||
for (s = strchr(p, ':'); s; s = strchr(s + 1, ':'))
|
||||
*s = '-';
|
||||
/*
|
||||
* Subsidiary components cannot have various chars in them that are used as
|
||||
* separators. ':' is used for subsidiary separators in all ccache types
|
||||
* except FILE, where '+' is used instead because we can't use ':' in file
|
||||
* paths on Windows and because ':' is not in the POSIX safe set.
|
||||
*/
|
||||
for (s = p; *s; s++) {
|
||||
switch (s[0]) {
|
||||
case ':':
|
||||
case '+':
|
||||
case '/':
|
||||
case '\\':
|
||||
s[0] = '-';
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
ret = krb5_cc_resolve_sub(context, cctype, name, p, id);
|
||||
free(p);
|
||||
return ret;
|
||||
|
Reference in New Issue
Block a user