From: Stefan Metzmacher Date: Mon, 29 May 2017 07:37:09 +0000 (+0200) Subject: s4:librpc: restore inhibit_timeout_processing = true during gensec_update_send/recv() X-Git-Tag: ldb-1.1.30~27 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=50c7112b002bc33f46e827bac47857215e135015;p=thirdparty%2Fsamba.git s4:librpc: restore inhibit_timeout_processing = true during gensec_update_send/recv() As not all gensec backends are fully async yet, we need the inhibit_timeout_processing workarround in order to protect against nested event loops. Signed-off-by: Stefan Metzmacher Reviewed-by: Andrew Bartlett --- diff --git a/source4/librpc/rpc/dcerpc_auth.c b/source4/librpc/rpc/dcerpc_auth.c index a2d1418ea14..ea222c2706f 100644 --- a/source4/librpc/rpc/dcerpc_auth.c +++ b/source4/librpc/rpc/dcerpc_auth.c @@ -187,6 +187,9 @@ static void bind_auth_next_step(struct composite_context *c) * it doesn't like that either */ + state->pipe->inhibit_timeout_processing = true; + state->pipe->timed_out = false; + subreq = gensec_update_send(state, state->pipe->conn->event_ctx, sec->generic_state, @@ -207,6 +210,8 @@ static void bind_auth_next_gensec_done(struct tevent_req *subreq) struct dcecli_security *sec = &p->conn->security_state; bool more_processing = false; + state->pipe->inhibit_timeout_processing = false; + c->status = gensec_update_recv(subreq, state, &state->out_auth_info.credentials); TALLOC_FREE(subreq); @@ -434,6 +439,9 @@ struct composite_context *dcerpc_bind_auth_send(TALLOC_CTX *mem_ctx, * it doesn't like that either */ + state->pipe->inhibit_timeout_processing = true; + state->pipe->timed_out = false; + subreq = gensec_update_send(state, p->conn->event_ctx, sec->generic_state, @@ -455,6 +463,8 @@ static void dcerpc_bind_auth_gensec_done(struct tevent_req *subreq) struct dcerpc_pipe *p = state->pipe; struct dcecli_security *sec = &p->conn->security_state; + state->pipe->inhibit_timeout_processing = false; + c->status = gensec_update_recv(subreq, state, &state->out_auth_info.credentials); TALLOC_FREE(subreq);