svn rev #21534: branches/mskrb-integ/src/lib/gssapi/mechglue/

lhoward@MIT.EDU lhoward at MIT.EDU
Thu Dec 18 01:22:11 EST 2008


http://src.mit.edu/fisheye/changelog/krb5/?cs=21534
Commit By: lhoward
Log Message:
Reorder initialization of SPNEGO and Kerberos mechanisms, the default
mechanism must be Kerberos for backwards compatibility.

Ensure that mechanisms dynamically loaded via GSS entry pointers have
mech->mech_type initialized.



Changed Files:
U   branches/mskrb-integ/src/lib/gssapi/mechglue/g_initialize.c
Modified: branches/mskrb-integ/src/lib/gssapi/mechglue/g_initialize.c
===================================================================
--- branches/mskrb-integ/src/lib/gssapi/mechglue/g_initialize.c	2008-12-18 04:05:38 UTC (rev 21533)
+++ branches/mskrb-integ/src/lib/gssapi/mechglue/g_initialize.c	2008-12-18 06:22:10 UTC (rev 21534)
@@ -98,8 +98,8 @@
 	err = k5_mutex_finish_init(&g_mechListLock);
 
 #ifdef _GSS_STATIC_LINK
+	err = gss_krb5int_lib_init();
 	err = gss_spnegoint_lib_init();
-	err = gss_krb5int_lib_init();
 #endif
 
 	return err;
@@ -119,8 +119,8 @@
 	printf("gssint_mechglue_fini\n");
 #endif
 #ifdef _GSS_STATIC_LINK
+	gss_spnegoint_lib_fini();
 	gss_krb5int_lib_fini();
-	gss_spnegoint_lib_fini();
 #endif
 	k5_mutex_destroy(&g_mechSetLock);
 	k5_mutex_destroy(&g_mechListLock);
@@ -712,7 +712,7 @@
 	} while (0)
 
 static gss_mechanism
-build_dynamicMech(void *dl)
+build_dynamicMech(void *dl, const gss_OID mech_type)
 {
 	gss_mechanism mech;
 
@@ -763,6 +763,10 @@
 	GSS_ADD_DYNAMIC_METHOD(dl, mech, gss_wrap_iov_length);
 	GSS_ADD_DYNAMIC_METHOD(dl, mech, gss_complete_auth_token);
 
+	assert(mech_type != GSS_C_NO_OID);
+
+	mech->mech_type = *(mech_type);
+
 	return mech;
 }
 
@@ -848,7 +852,7 @@
 		aMech->mech = (*sym)(aMech->mech_type);
 	} else {
 		/* Try dynamic dispatch table */
-		aMech->mech = build_dynamicMech(dl);
+		aMech->mech = build_dynamicMech(dl, aMech->mech_type);
 	}
 	if (aMech->mech == NULL) {
 		(void) krb5int_close_plugin(dl);




More information about the cvs-krb5 mailing list