allow registration of krb5_plugins though the gss-api layer
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23698 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -410,6 +410,13 @@ static gss_OID_desc gss_krb5_get_time_offset_x_desc =
|
||||
gss_OID GSSAPI_LIB_VARIABLE GSS_KRB5_GET_TIME_OFFSET_X =
|
||||
&gss_krb5_get_time_offset_x_desc;
|
||||
|
||||
/* 1.2.752.43.13.19 */
|
||||
static gss_OID_desc gss_krb5_plugin_register_x_desc =
|
||||
{6, rk_UNCONST("\x2a\x85\x70\x2b\x0d\x13")};
|
||||
|
||||
gss_OID GSSAPI_LIB_VARIABLE GSS_KRB5_PLUGIN_REGISTER_KDC_X =
|
||||
&gss_krb5_plugin_register_x_desc;
|
||||
|
||||
/* 1.2.752.43.14.1 */
|
||||
static gss_OID_desc gss_sasl_digest_md5_mechanism_desc =
|
||||
{6, rk_UNCONST("\x2a\x85\x70\x2b\x0e\x01") };
|
||||
|
@@ -242,6 +242,18 @@ _gsskrb5_set_sec_context_option
|
||||
if (maj_stat != GSS_S_COMPLETE)
|
||||
return maj_stat;
|
||||
|
||||
*minor_status = 0;
|
||||
return GSS_S_COMPLETE;
|
||||
} else if (gss_oid_equal(desired_object, GSS_KRB5_PLUGIN_REGISTER_X)) {
|
||||
struct gsskrb5_krb5_plugin c;
|
||||
|
||||
if (value->length != sizeof(c)) {
|
||||
*minor_status = EINVAL;
|
||||
return GSS_S_FAILURE;
|
||||
}
|
||||
memcpy(&c, value->value, sizeof(c));
|
||||
krb5_plugin_register(context, c.type, c.name, c.symbol);
|
||||
|
||||
*minor_status = 0;
|
||||
return GSS_S_COMPLETE;
|
||||
}
|
||||
|
Reference in New Issue
Block a user