(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
This commit is contained in:
Assar Westerlund
1999-09-12 20:45:35 +00:00
parent d184e76ce8
commit 2535b393d3

View File

@@ -44,6 +44,10 @@ RCSID("$Id$");
(C)->E = krb5_config_get_ ## T ## _default ((C), NULL, (D), \ (C)->E = krb5_config_get_ ## T ## _default ((C), NULL, (D), \
"libdefaults", F, NULL) "libdefaults", F, NULL)
#ifdef KRB4
extern krb5_kt_ops krb4_fkt_ops;
#endif
static krb5_error_code static krb5_error_code
init_context_from_config_file(krb5_context context) 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_lookup, TRUE, "srv_lookup");
INIT_FIELD(context, bool, srv_try_txt, FALSE, "srv_try_txt"); 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, bool, srv_try_rfc2052, TRUE, "srv_try_rfc2052");
INIT_FIELD(context, int, fcache_vno, 0, "fcache_version"); 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; return 0;
} }
@@ -164,9 +181,10 @@ krb5_free_context(krb5_context context)
free(context->default_realm); free(context->default_realm);
krb5_config_file_free (context, context->cf); krb5_config_file_free (context, context->cf);
free_error_table (context->et_list); 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[i].prefix);
free(context->cc_ops); free(context->cc_ops);
free(context->kt_types);
free(context); free(context);
} }