1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-10 01:18:15 +03:00

auth/spnego: inline gensec_spnego_update_client() into gensec_spnego_update_send()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
This commit is contained in:
Stefan Metzmacher 2017-07-07 09:22:25 +02:00 committed by Andreas Schneider
parent f85f9da24a
commit fe4521dcc8

View File

@ -1175,39 +1175,6 @@ static NTSTATUS gensec_spnego_server_negTokenTarg(struct gensec_security *gensec
out);
}
static NTSTATUS gensec_spnego_update_client(struct gensec_security *gensec_security,
TALLOC_CTX *out_mem_ctx,
struct tevent_context *ev,
struct spnego_data *spnego_in,
DATA_BLOB *out)
{
struct spnego_state *spnego_state = (struct spnego_state *)gensec_security->private_data;
*out = data_blob_null;
/* and switch into the state machine */
switch (spnego_state->state_position) {
case SPNEGO_CLIENT_START:
return gensec_spnego_client_negTokenInit(gensec_security,
spnego_state,
ev, spnego_in,
out_mem_ctx, out);
case SPNEGO_CLIENT_TARG:
return gensec_spnego_client_negTokenTarg(gensec_security,
spnego_state,
ev, spnego_in,
out_mem_ctx, out);
default:
break;
}
smb_panic(__location__);
return NT_STATUS_INTERNAL_ERROR;
}
static NTSTATUS gensec_spnego_update_server(struct gensec_security *gensec_security,
TALLOC_CTX *out_mem_ctx,
struct tevent_context *ev,
@ -1419,12 +1386,17 @@ static struct tevent_req *gensec_spnego_update_send(TALLOC_CTX *mem_ctx,
break;
}
/* fall through */
status = gensec_spnego_client_negTokenInit(gensec_security,
spnego_state, ev,
state->spnego_in, state,
&spnego_state->out_frag);
break;
case SPNEGO_CLIENT_TARG:
status = gensec_spnego_update_client(gensec_security,
state, ev,
state->spnego_in,
&spnego_state->out_frag);
status = gensec_spnego_client_negTokenTarg(gensec_security,
spnego_state, ev,
state->spnego_in, state,
&spnego_state->out_frag);
break;
case SPNEGO_SERVER_START: