Implement GSS_KRB5_SEND_TO_KDC_X.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18684 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -107,7 +107,7 @@ _gsskrb5_set_sec_context_option
|
|||||||
} else {
|
} else {
|
||||||
str = malloc(value->length + 1);
|
str = malloc(value->length + 1);
|
||||||
if (str) {
|
if (str) {
|
||||||
minor_status = 0;
|
*minor_status = 0;
|
||||||
return GSS_S_UNAVAILABLE;
|
return GSS_S_UNAVAILABLE;
|
||||||
}
|
}
|
||||||
memcpy(str, value->value, value->length);
|
memcpy(str, value->value, value->length);
|
||||||
@@ -117,8 +117,28 @@ _gsskrb5_set_sec_context_option
|
|||||||
_gsskrb5_register_acceptor_identity(str);
|
_gsskrb5_register_acceptor_identity(str);
|
||||||
free(str);
|
free(str);
|
||||||
|
|
||||||
minor_status = 0;
|
*minor_status = 0;
|
||||||
return GSS_S_FAILURE;
|
return GSS_S_COMPLETE;
|
||||||
|
|
||||||
|
} else if (gss_oid_equal(desired_object, GSS_KRB5_SEND_TO_KDC_X)) {
|
||||||
|
|
||||||
|
if (value == NULL || value->length == 0) {
|
||||||
|
krb5_set_send_to_kdc_func(_gsskrb5_context, NULL, NULL);
|
||||||
|
} else {
|
||||||
|
struct gsskrb5_send_to_kdc c;
|
||||||
|
|
||||||
|
if (value->length != sizeof(c)) {
|
||||||
|
*minor_status = EINVAL;
|
||||||
|
return GSS_S_FAILURE;
|
||||||
|
}
|
||||||
|
memcpy(&c, value->value, sizeof(c));
|
||||||
|
krb5_set_send_to_kdc_func(_gsskrb5_context,
|
||||||
|
(krb5_send_to_kdc_func)c.func,
|
||||||
|
c.ptr);
|
||||||
|
}
|
||||||
|
|
||||||
|
*minor_status = 0;
|
||||||
|
return GSS_S_COMPLETE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user