From 50392a92521c425b6a24c22a53a384bb7ec0ab0f Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 15 Sep 2016 18:18:46 +0200 Subject: [PATCH] s4:rpc_server/remote: pass through DCERPC_PFC_FLAG_CONC_MPX if it was used by the client Signed-off-by: Stefan Metzmacher Reviewed-by: Andreas Schneider --- source4/rpc_server/remote/dcesrv_remote.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/source4/rpc_server/remote/dcesrv_remote.c b/source4/rpc_server/remote/dcesrv_remote.c index 3eb0ad4b4a1..0d19955e782 100644 --- a/source4/rpc_server/remote/dcesrv_remote.c +++ b/source4/rpc_server/remote/dcesrv_remote.c @@ -51,6 +51,7 @@ static NTSTATUS remote_op_bind(struct dcesrv_call_state *dce_call, const struct bool machine_account; struct dcerpc_binding *b; struct composite_context *pipe_conn_req; + uint32_t flags = 0; machine_account = lpcfg_parm_bool(dce_call->conn->dce_ctx->lp_ctx, NULL, "dcerpc_remote", "use_machine_account", false); @@ -134,6 +135,15 @@ static NTSTATUS remote_op_bind(struct dcesrv_call_state *dce_call, const struct return status; } + if (dce_call->pkt.pfc_flags & DCERPC_PFC_FLAG_CONC_MPX) { + status = dcerpc_binding_set_flags(b, DCERPC_CONCURRENT_MULTIPLEX, 0); + if (!NT_STATUS_IS_OK(status)) { + DEBUG(0, ("dcerpc_binding_set_flags(CONC_MPX) - %s'\n", + nt_errstr(status))); + return status; + } + } + DEBUG(3, ("Using binding %s\n", dcerpc_binding_string(dce_call->context, b))); pipe_conn_req = dcerpc_pipe_connect_b_send(dce_call->context, b, table, @@ -148,6 +158,11 @@ static NTSTATUS remote_op_bind(struct dcesrv_call_state *dce_call, const struct return status; } + flags = dcerpc_binding_get_flags(priv->c_pipe->binding); + if (!(flags & DCERPC_CONCURRENT_MULTIPLEX)) { + dce_call->state_flags &= ~DCESRV_CALL_STATE_FLAG_MULTIPLEXED; + } + if (dce_call->conn->assoc_group->proxied_id == 0) { dce_call->conn->assoc_group->proxied_id = dcerpc_binding_get_assoc_group_id(priv->c_pipe->binding); -- 2.11.4.GIT