krb5 commit [krb5-1.10]: Unregister error message key on library unload

Tom Yu tlyu at MIT.EDU
Wed Sep 12 15:56:24 EDT 2012


https://github.com/krb5/krb5/commit/1d0c691e59f89df68413a6a41b951cfda88005e8
commit 1d0c691e59f89df68413a6a41b951cfda88005e8
Author: Ben Kaduk <kaduk at mit.edu>
Date:   Wed Sep 12 11:35:04 2012 -0400

    Unregister error message key on library unload
    
    Revision fcdd2de1 added the K5_KEY_GSS_KRB5_ERROR_MESSAGE key, and
    registered it in the gssapi library initialization routine, but
    did not unregister it in the libary finalization routine.
    When the library is unloaded and reloaded in the same process,
    this leads to an assertion failure, since we check that
    destructors_set[keynum] is zero (no destructor set) when registering
    a key in util/support/threads.c.
    Unregister the key on library cleanup to resolve the error.
    
    (cherry picked from commit 4ab584c830024757cc628b1783dde6220a9fec6d)
    
    ticket: 7353
    version_fixed: 1.10.4
    status: resolved

 src/lib/gssapi/krb5/gssapi_krb5.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/lib/gssapi/krb5/gssapi_krb5.c b/src/lib/gssapi/krb5/gssapi_krb5.c
index 068af43..efe0ad3 100644
--- a/src/lib/gssapi/krb5/gssapi_krb5.c
+++ b/src/lib/gssapi/krb5/gssapi_krb5.c
@@ -1026,6 +1026,7 @@ void gss_krb5int_lib_fini(void)
 
     k5_key_delete(K5_KEY_GSS_KRB5_SET_CCACHE_OLD_NAME);
     k5_key_delete(K5_KEY_GSS_KRB5_CCACHE_NAME);
+    k5_key_delete(K5_KEY_GSS_KRB5_ERROR_MESSAGE);
     k5_mutex_destroy(&kg_vdb.mutex);
 #ifndef _WIN32
     k5_mutex_destroy(&kg_kdc_flag_mutex);


More information about the cvs-krb5 mailing list