diff options
author | Miro Jurisic <meeroh@mit.edu> | 2000-01-22 04:04:36 +0000 |
---|---|---|
committer | Miro Jurisic <meeroh@mit.edu> | 2000-01-22 04:04:36 +0000 |
commit | 3954dd2c1f9919e2ac09f86f022063119b5dd8d3 (patch) | |
tree | 4918d63eb6cb7427d398d6cac70bfa325ad29025 /src/mac | |
parent | 41ff7485d2775407c85fb2b90b26c3170b2ad4b5 (diff) | |
download | krb5-3954dd2c1f9919e2ac09f86f022063119b5dd8d3.tar.gz krb5-3954dd2c1f9919e2ac09f86f022063119b5dd8d3.tar.xz krb5-3954dd2c1f9919e2ac09f86f022063119b5dd8d3.zip |
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
Diffstat (limited to 'src/mac')
-rw-r--r-- | src/mac/GSS.CFM.c | 16 | ||||
-rw-r--r-- | src/mac/K5.CFM.c | 31 |
2 files changed, 12 insertions, 35 deletions
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 <CodeFragments.h> -#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 <CodeFragments.h> -#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(); } |