summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2017-05-29 09:37:09 +0200
committerAndrew Bartlett <abartlet@samba.org>2017-05-30 08:06:07 +0200
commit50c7112b002bc33f46e827bac47857215e135015 (patch)
tree39936a6562f1b39d2fef42cadcfd5ee930bcdc6f
parent27aacf9288aafefb2610adca262086b69be7c827 (diff)
downloadsamba-50c7112b002bc33f46e827bac47857215e135015.tar.gz
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 <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
-rw-r--r--source4/librpc/rpc/dcerpc_auth.c10
1 files changed, 10 insertions, 0 deletions
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);