The Samba-Bugzilla – Attachment 10967 Details for
Bug 11225
multiplexed RPC connections are not handled by DCERPC server
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch to add support for multiplexed connections
0001-Add-multiplex-state-to-dcerpc-flags-and-control-over.patch (text/plain), 2.81 KB, created by
Julien Kerihuel (mail address dead)
on 2015-04-20 10:25:21 UTC
(
hide
)
Description:
patch to add support for multiplexed connections
Filename:
MIME Type:
Creator:
Julien Kerihuel (mail address dead)
Created:
2015-04-20 10:25:21 UTC
Size:
2.81 KB
patch
obsolete
>From 8aab1ddf301b2fecd9042ab54ff48f038663bb89 Mon Sep 17 00:00:00 2001 >From: Julien Kerihuel <j.kerihuel@openchange.org> >Date: Tue, 24 Mar 2015 21:06:03 -0700 >Subject: [PATCH] Add multiplex state to dcerpc flags and control over > multiplex PFC flag in bind_ack and and dcesrv_alter replies > >Signed-off-by: Julien Kerihuel <j.kerihuel@openchange.org> >Reviewed-by: "Stefan (metze) Metzmacher" <metze@samba.org> >Reviewed-by: Jelmer Vernooij <jelmer@samba.org> >--- > source4/rpc_server/dcerpc_server.c | 15 ++++++++++++++- > source4/rpc_server/dcerpc_server.h | 1 + > 2 files changed, 15 insertions(+), 1 deletion(-) > >diff --git a/source4/rpc_server/dcerpc_server.c b/source4/rpc_server/dcerpc_server.c >index 5eac9ee..a8785b0 100644 >--- a/source4/rpc_server/dcerpc_server.c >+++ b/source4/rpc_server/dcerpc_server.c >@@ -614,6 +614,12 @@ static NTSTATUS dcesrv_bind(struct dcesrv_call_state *call) > call->conn->cli_max_recv_frag = MIN(0x2000, call->pkt.u.bind.max_recv_frag); > } > >+ if ((call->pkt.pfc_flags & DCERPC_PFC_FLAG_CONC_MPX) && >+ (call->state_flags & DCESRV_CALL_STATE_FLAG_MULTIPLEXED)) { >+ call->context->conn->state_flags |= DCESRV_CALL_STATE_FLAG_MULTIPLEXED; >+ extra_flags |= DCERPC_PFC_FLAG_CONC_MPX; >+ } >+ > /* handle any authentication that is being requested */ > if (!dcesrv_auth_bind(call)) { > talloc_free(call->context); >@@ -793,6 +799,7 @@ static NTSTATUS dcesrv_alter(struct dcesrv_call_state *call) > NTSTATUS status; > uint32_t result=0, reason=0; > uint32_t context_id; >+ uint32_t extra_flags = 0; > > /* handle any authentication that is being requested */ > if (!dcesrv_auth_alter(call)) { >@@ -826,12 +833,18 @@ static NTSTATUS dcesrv_alter(struct dcesrv_call_state *call) > reason = DCERPC_BIND_REASON_ASYNTAX; > } > >+ if ((call->pkt.pfc_flags & DCERPC_PFC_FLAG_CONC_MPX)) { >+ if (call->context->conn->state_flags & DCESRV_CALL_STATE_FLAG_MULTIPLEXED) { >+ extra_flags |= DCERPC_PFC_FLAG_CONC_MPX; >+ } >+ } >+ > /* setup a alter_resp */ > dcesrv_init_hdr(&pkt, lpcfg_rpc_big_endian(call->conn->dce_ctx->lp_ctx)); > pkt.auth_length = 0; > pkt.call_id = call->pkt.call_id; > pkt.ptype = DCERPC_PKT_ALTER_RESP; >- pkt.pfc_flags = DCERPC_PFC_FLAG_FIRST | DCERPC_PFC_FLAG_LAST; >+ pkt.pfc_flags = DCERPC_PFC_FLAG_FIRST | DCERPC_PFC_FLAG_LAST | extra_flags; > pkt.u.alter_resp.max_xmit_frag = 0x2000; > pkt.u.alter_resp.max_recv_frag = 0x2000; > if (result == 0) { >diff --git a/source4/rpc_server/dcerpc_server.h b/source4/rpc_server/dcerpc_server.h >index 7b00418..1bf187a 100644 >--- a/source4/rpc_server/dcerpc_server.h >+++ b/source4/rpc_server/dcerpc_server.h >@@ -101,6 +101,7 @@ struct dcesrv_call_state { > */ > #define DCESRV_CALL_STATE_FLAG_ASYNC (1<<0) > #define DCESRV_CALL_STATE_FLAG_MAY_ASYNC (1<<1) >+#define DCESRV_CALL_STATE_FLAG_MULTIPLEXED (1<<3) > uint32_t state_flags; > > /* the time the request arrived in the server */ >-- >1.9.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 11225
:
10967
|
10972
|
10973