make the SPNEGO mech store the error itself instead, works for everything except other stackable mechs
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@22600 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -609,7 +609,7 @@ acceptor_start
|
||||
/*
|
||||
* First we try the opportunistic token if we have support for it,
|
||||
* don't try to verify we have credential for the token,
|
||||
* gss_accept_sec_context will (hopefully) tell us that.
|
||||
* gss_accept_sec_context() will (hopefully) tell us that.
|
||||
* If that failes,
|
||||
*/
|
||||
|
||||
@@ -674,6 +674,8 @@ acceptor_start
|
||||
goto out;
|
||||
|
||||
first_ok = 1;
|
||||
} else {
|
||||
gss_mg_collect_error(preferred_mech_type, ret, *minor_status);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -879,6 +881,7 @@ acceptor_continue
|
||||
}
|
||||
if (ret != GSS_S_COMPLETE && ret != GSS_S_CONTINUE_NEEDED) {
|
||||
free_NegotiationToken(&nt);
|
||||
gss_mg_collect_error(ctx->negotiated_mech_type, ret, minor);
|
||||
send_reject (minor_status, output_token);
|
||||
HEIMDAL_MUTEX_unlock(&ctx->ctx_id_mutex);
|
||||
return ret;
|
||||
|
@@ -263,18 +263,6 @@ OM_uint32 _gss_spnego_unwrap
|
||||
qop_state);
|
||||
}
|
||||
|
||||
OM_uint32 _gss_spnego_display_status
|
||||
(OM_uint32 * minor_status,
|
||||
OM_uint32 status_value,
|
||||
int status_type,
|
||||
const gss_OID mech_type,
|
||||
OM_uint32 * message_context,
|
||||
gss_buffer_t status_string
|
||||
)
|
||||
{
|
||||
return GSS_S_FAILURE;
|
||||
}
|
||||
|
||||
OM_uint32 _gss_spnego_compare_name
|
||||
(OM_uint32 *minor_status,
|
||||
const gss_name_t name1,
|
||||
|
@@ -57,7 +57,7 @@ static gssapi_mech_interface_desc spnego_mech = {
|
||||
_gss_spnego_verify_mic,
|
||||
_gss_spnego_wrap,
|
||||
_gss_spnego_unwrap,
|
||||
_gss_spnego_display_status,
|
||||
NULL,
|
||||
NULL,
|
||||
_gss_spnego_compare_name,
|
||||
_gss_spnego_display_name,
|
||||
|
@@ -59,8 +59,10 @@ initiator_approved(gss_name_t target_name, gss_OID mech)
|
||||
&out,
|
||||
NULL,
|
||||
NULL);
|
||||
if (GSS_ERROR(maj_stat))
|
||||
if (GSS_ERROR(maj_stat)) {
|
||||
gss_mg_collect_error(mech, maj_stat, min_stat);
|
||||
return GSS_S_BAD_MECH;
|
||||
}
|
||||
gss_release_buffer(&min_stat, &out);
|
||||
gss_delete_sec_context(&min_stat, &ctx, NULL);
|
||||
|
||||
@@ -268,6 +270,7 @@ spnego_initial
|
||||
if (GSS_ERROR(sub)) {
|
||||
free_NegTokenInit(&ni);
|
||||
*minor_status = minor;
|
||||
gss_mg_collect_error(ctx->preferred_mech_type, sub, minor);
|
||||
_gss_spnego_internal_delete_sec_context(&minor, &context, GSS_C_NO_BUFFER);
|
||||
return sub;
|
||||
}
|
||||
@@ -516,6 +519,7 @@ spnego_reply
|
||||
if (GSS_ERROR(ret)) {
|
||||
HEIMDAL_MUTEX_unlock(&ctx->ctx_id_mutex);
|
||||
free_NegTokenResp(&resp);
|
||||
gss_mg_collect_error(&mech, ret, minor);
|
||||
*minor_status = minor;
|
||||
return ret;
|
||||
}
|
||||
|
Reference in New Issue
Block a user