(krb5_cc_get_prefix_ops): if there are not colon (:) in the name, its
a file credential cachce git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16305 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -691,8 +691,9 @@ krb5_cc_clear_mcred(krb5_creds *mcred)
|
|||||||
/*
|
/*
|
||||||
* Get the cc ops that is registered in `context' to handle the
|
* Get the cc ops that is registered in `context' to handle the
|
||||||
* `prefix'. `prefix' can be a complete credential cache name or a
|
* `prefix'. `prefix' can be a complete credential cache name or a
|
||||||
* prefix, the function will only use part up to the first colon (:)
|
* prefix, the function will only use part up to the first colon (:).
|
||||||
* if there is one. Returns NULL if ops not found.
|
* If there are no colon, a file credential cache will be returned for
|
||||||
|
* compatibility reasons. Returns NULL if ops not found.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const krb5_cc_ops *
|
const krb5_cc_ops *
|
||||||
@@ -707,7 +708,10 @@ krb5_cc_get_prefix_ops(krb5_context context, const char *prefix)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
p1 = strchr(p, ':');
|
p1 = strchr(p, ':');
|
||||||
if (p1)
|
if (p1 == NULL) {
|
||||||
|
free(p1);
|
||||||
|
return &krb5_fcc_ops;
|
||||||
|
}
|
||||||
*p1 = '\0';
|
*p1 = '\0';
|
||||||
|
|
||||||
for(i = 0; i < context->num_cc_ops && context->cc_ops[i].prefix; i++) {
|
for(i = 0; i < context->num_cc_ops && context->cc_ops[i].prefix; i++) {
|
||||||
|
Reference in New Issue
Block a user