From 2535b393d3ea33376f74f91e1471306bc5b597f7 Mon Sep 17 00:00:00 2001 From: Assar Westerlund Date: Sun, 12 Sep 1999 20:45:35 +0000 Subject: [PATCH] (init_context_from_config_file): register all standard cache and keytab types (krb5_free_context): free `kt_types' git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@6938 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/krb5/context.c | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/lib/krb5/context.c b/lib/krb5/context.c index 0ad342197..127a7c662 100644 --- a/lib/krb5/context.c +++ b/lib/krb5/context.c @@ -44,6 +44,10 @@ RCSID("$Id$"); (C)->E = krb5_config_get_ ## T ## _default ((C), NULL, (D), \ "libdefaults", F, NULL) +#ifdef KRB4 +extern krb5_kt_ops krb4_fkt_ops; +#endif + static krb5_error_code init_context_from_config_file(krb5_context context) { @@ -111,8 +115,21 @@ init_context_from_config_file(krb5_context context) INIT_FIELD(context, bool, srv_lookup, TRUE, "srv_lookup"); INIT_FIELD(context, bool, srv_try_txt, FALSE, "srv_try_txt"); INIT_FIELD(context, bool, srv_try_rfc2052, TRUE, "srv_try_rfc2052"); - INIT_FIELD(context, int, fcache_vno, 0, "fcache_version"); + + context->cc_ops = NULL; + context->num_cc_ops = 0; + krb5_cc_register(context, &krb5_fcc_ops, TRUE); + krb5_cc_register(context, &krb5_mcc_ops, TRUE); + + context->num_kt_types = 0; + context->kt_types = NULL; + krb5_kt_register (context, &krb5_fkt_ops); + krb5_kt_register (context, &krb5_mkt_ops); +#ifdef KRB4 + krb5_kt_register (context, &krb4_fkt_ops); +#endif + krb5_kt_register (context, &krb5_akf_ops); return 0; } @@ -164,9 +181,10 @@ krb5_free_context(krb5_context context) free(context->default_realm); krb5_config_file_free (context, context->cf); free_error_table (context->et_list); - for(i = 0; i < context->num_ops; ++i) + for(i = 0; i < context->num_cc_ops; ++i) free(context->cc_ops[i].prefix); free(context->cc_ops); + free(context->kt_types); free(context); }