krb5/krb5-1.5-gssinit.patch
Nalin Dahyabhai 8c4df25456 - ensure that the gssapi library's been initialized before walking the
internal mechanism list in gss_release_oid(), needed if called from
    gss_release_name() right after a gss_import_name() (#198092)
2006-08-07 17:52:52 +00:00

20 lines
680 B
Diff

Don't crash in gss_release_oid() when the application is doing nothing
more than importing a name and freeing it (gss_release_name() calls
gss_release_oid(), but gss_import_name() doesn't initialize the library,
so gss_release_oid() hits an assertion failure when it tries to lock the
mechanism list).
Upstream RT #4088/4096.
--- krb5-1.5/src/lib/gssapi/mechglue/g_initialize.c 2006-08-07 13:10:19.000000000 -0400
+++ krb5-1.5/src/lib/gssapi/mechglue/g_initialize.c 2006-08-07 13:10:13.000000000 -0400
@@ -91,6 +91,8 @@
if (minor_status == NULL)
return (GSS_S_CALL_INACCESSIBLE_WRITE);
+ if (gssint_initialize_library())
+ return GSS_S_FAILURE;
*minor_status = 0;