Use only one library initialization scheme, and install the error tables in
only one place.
* krb5_libinit.c (initialized): Variable deleted, all references removed.
(krb5int_lib_init): Initialize error tables here.
(krb5int_initialize_library): Don't do it here.
* error_tables/Makefile.in (STLIBOBJS, OBJS, SRCS): Drop init_ets code.
* krb/init_ctx.c (init_common): Don't call krb5_init_ets.
(krb5_free_context): Don't call krb5_free_ets.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16388
dc483132-0cff-0310-8789-
dd5450dbe970
+2004-06-02 Ken Raeburn <raeburn@mit.edu>
+
+ * krb5_libinit.c (initialized): Variable deleted, all references
+ removed.
+ (krb5int_lib_init): Initialize error tables here.
+ (krb5int_initialize_library): Don't do it here.
+
2004-05-27 Ezra Peisach <epeisach@mit.edu>
* Makefile.in (LOCALINCLUDES): Include ccache, keytab and rcache
+2004-06-02 Ken Raeburn <raeburn@mit.edu>
+
+ * Makefile.in (STLIBOBJS, OBJS, SRCS): Drop init_ets code.
+
2004-01-06 Jeffrey Altman <jaltman@mit.edu>
* krb5_err.et (KRB5_CC_NOSUPP) new ccache error code
EHDRDIR=$(BUILDTOP)$(S)include$(S)krb5
STLIBOBJS= asn1_err.o kdb5_err.o krb5_err.o \
- kv5m_err.o krb524_err.o init_ets.o
+ kv5m_err.o krb524_err.o
HDRS= asn1_err.h kdb5_err.h krb5_err.h kv5m_err.h krb524_err.h
OBJS= $(OUTPRE)asn1_err.$(OBJEXT) $(OUTPRE)kdb5_err.$(OBJEXT) $(OUTPRE)krb5_err.$(OBJEXT) \
- $(OUTPRE)kv5m_err.$(OBJEXT) $(OUTPRE)krb524_err.$(OBJEXT) \
- $(OUTPRE)init_ets.$(OBJEXT)
+ $(OUTPRE)kv5m_err.$(OBJEXT) $(OUTPRE)krb524_err.$(OBJEXT)
ETSRCS= asn1_err.c kdb5_err.c krb5_err.c kv5m_err.c krb524_err.c
-SRCS= asn1_err.c kdb5_err.c krb5_err.c kv5m_err.c krb524_err.c \
- $(srcdir)/init_ets.c
+SRCS= asn1_err.c kdb5_err.c krb5_err.c kv5m_err.c krb524_err.c
##DOS##LIBOBJS = $(OBJS)
2004-06-02 Ken Raeburn <raeburn@mit.edu>
+ * init_ctx.c (init_common): Don't call krb5_init_ets.
+ (krb5_free_context): Don't call krb5_free_ets.
+
* srv_rcache.c (krb5_get_server_rcache): Use krb5_rc_resolve_full
instead of constructing an rcache object locally.
krb5_data seed;
int tmp;
- /* Initialize error tables */
- krb5_init_ets(ctx);
+ retval = krb5int_initialize_library();
+ if (retval)
+ return retval;
#if (defined(_WIN32))
/*
void KRB5_CALLCONV
krb5_free_context(krb5_context ctx)
{
- krb5_free_ets(ctx);
krb5_os_free_context(ctx);
if (ctx->in_tkt_ktypes) {
#include "kt-int.h"
#include "rc-int.h"
-static int initialized = 0;
-
/*
* Initialize the Kerberos v5 library.
*/
int krb5int_lib_init(void)
{
int err;
+
+#if !USE_BUNDLE_ERROR_STRINGS
+ add_error_table(&et_krb5_error_table);
+ add_error_table(&et_kv5m_error_table);
+ add_error_table(&et_kdb5_error_table);
+ add_error_table(&et_asn1_error_table);
+#endif
+
err = krb5int_rc_finish_init();
if (err)
return err;
/* Always-delayed initialization -- error table linkage, etc. */
krb5_error_code krb5int_initialize_library (void)
{
- if (!initialized) {
-#if !USE_BUNDLE_ERROR_STRINGS
- add_error_table(&et_krb5_error_table);
- add_error_table(&et_kv5m_error_table);
- add_error_table(&et_kdb5_error_table);
- add_error_table(&et_asn1_error_table);
-#endif
- initialized = 1;
- }
-
return CALL_INIT_FUNCTION(krb5int_lib_init);
}
krb5int_kt_finalize();
krb5int_cc_finalize();
- if (!initialized)
- return;
-
#if defined(_WIN32) || defined(USE_CCAPI)
krb5_stdcc_shutdown();
#endif