From: Ken Raeburn Date: Wed, 28 Nov 1990 10:16:09 +0000 (+0000) Subject: Rearranged use of krb5_cc_dfl_ops to deal with it now being a X-Git-Tag: krb5-1.0-alpha3~81 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=fd97ba892409bb77ee5833c90e7d859b414331c8;p=krb5.git Rearranged use of krb5_cc_dfl_ops to deal with it now being a pointer.... git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@1512 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/krb5/ccache/ccbase.c b/src/lib/krb5/ccache/ccbase.c index 8fd1e606e..32577dbbc 100644 --- a/src/lib/krb5/ccache/ccbase.c +++ b/src/lib/krb5/ccache/ccbase.c @@ -19,13 +19,13 @@ static char rcsid_ccbase_c[] = #include #include +extern krb5_cc_ops *krb5_cc_dfl_ops; struct krb5_cc_typelist { krb5_cc_ops *ops; struct krb5_cc_typelist *next; }; -static struct krb5_cc_typelist krb5_cc_typelist_dfl = { &krb5_cc_dfl_ops, 0 }; -static struct krb5_cc_typelist *cc_typehead = &krb5_cc_typelist_dfl; +static struct krb5_cc_typelist *cc_typehead = 0; /* * Register a new credentials cache type @@ -96,6 +96,10 @@ krb5_error_code krb5_cc_resolve (name, cache) return (*tlist->ops->resolve)(cache, resid); } } + if (krb5_cc_dfl_ops && !strcmp (pfx, krb5_cc_dfl_ops->prefix)) { + free (pfx); + return (*krb5_cc_dfl_ops->resolve)(cache, resid); + } free(pfx); return KRB5_CC_UNKNOWN_TYPE; }