From 3954dd2c1f9919e2ac09f86f022063119b5dd8d3 Mon Sep 17 00:00:00 2001 From: Miro Jurisic Date: Sat, 22 Jan 2000 04:04:36 +0000 Subject: Moved krb5, gss, and crypto library initialization/cleanup code into new dedicated functions; added code to release global state allocated in prng.c git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11960 dc483132-0cff-0310-8789-dd5450dbe970 --- src/mac/GSS.CFM.c | 16 +++------------- src/mac/K5.CFM.c | 31 +++++++++---------------------- 2 files changed, 12 insertions(+), 35 deletions(-) (limited to 'src/mac') diff --git a/src/mac/GSS.CFM.c b/src/mac/GSS.CFM.c index a7c7c64ec..985ccd240 100644 --- a/src/mac/GSS.CFM.c +++ b/src/mac/GSS.CFM.c @@ -19,10 +19,7 @@ #include -#include "gssapi_err_generic.h" -#include "gssapi_err_krb5.h" - -#include "gssapi.h" +#include "gss_libinit.h" OSErr __initializeGSS(CFragInitBlockPtr ibp); void __terminateGSS(void); @@ -36,8 +33,7 @@ OSErr __initializeGSS(CFragInitBlockPtr ibp) /* Initialize the error tables */ if (err == noErr) { - add_error_table(&et_k5g_error_table); - add_error_table(&et_ggss_error_table); + err = gssint_initialize_library (); } return err; @@ -45,13 +41,7 @@ OSErr __initializeGSS(CFragInitBlockPtr ibp) void __terminateGSS(void) { - - OM_uint32 maj_stat, min_stat; - - maj_stat = kg_release_defcred (&min_stat); - - remove_error_table(&et_k5g_error_table); - remove_error_table(&et_ggss_error_table); + gssint_cleanup_library (); __terminate(); } diff --git a/src/mac/K5.CFM.c b/src/mac/K5.CFM.c index 57d1fbb26..efb918cfc 100644 --- a/src/mac/K5.CFM.c +++ b/src/mac/K5.CFM.c @@ -19,12 +19,8 @@ #include -#include "krb5_err.h" -#include "kv5m_err.h" -#include "asn1_err.h" -#include "kdb5_err.h" -#include "profile.h" -#include "adm_err.h" +#include "krb5_libinit.h" +#include "crypto_libinit.h" OSErr __initializeK5(CFragInitBlockPtr ibp); @@ -34,17 +30,14 @@ OSErr __initializeK5(CFragInitBlockPtr ibp) { OSErr err = noErr; - /* Do normal init of the shared library */ err = __initialize(); - /* Initialize the error tables */ if (err == noErr) { - 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); -// add_error_table(&et_prof_error_table); - add_error_table(&et_kadm_error_table); + err = krb5int_initialize_library (); + } + + if (err == noErr) { + err = cryptoint_initialize_library (); } return err; @@ -53,14 +46,8 @@ OSErr __initializeK5(CFragInitBlockPtr ibp) void __terminateK5(void) { - krb5_stdcc_shutdown(); - - remove_error_table(&et_krb5_error_table); - remove_error_table(&et_kv5m_error_table); - remove_error_table(&et_kdb5_error_table); - remove_error_table(&et_asn1_error_table); -// remove_error_table(&et_prof_error_table); - remove_error_table(&et_kadm_error_table); + cryptoint_cleanup_library (); + krb5int_cleanup_library (); __terminate(); } -- cgit