handle krb5_cc_default_name() returning NULL in a diffrent way.

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24029 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2008-11-12 04:18:50 +00:00
parent f65d0527fc
commit 06e31e6376

View File

@@ -822,17 +822,13 @@ fcc_get_cache_next(krb5_context context, krb5_cc_cursor cursor, krb5_ccache *id)
iter->first = 0;
fn = krb5_cc_default_name(context);
if (fn == NULL) {
krb5_clear_error_message(context);
return KRB5_CC_END;
}
if (strncasecmp(fn, "FILE:", 5) != 0) {
if (fn == NULL || strncasecmp(fn, "FILE:", 5) != 0) {
ret = _krb5_expand_default_cc_name(context,
KRB5_DEFAULT_CCNAME_FILE,
&expandedfn);
if (ret)
return ret;
fn = expandedfn;
}
ret = krb5_cc_resolve(context, fn, id);
if (expandedfn)