From 8651def04c140da23f564be46b86c5e1f33349c4 Mon Sep 17 00:00:00 2001 From: Julien Kerihuel Date: Thu, 15 May 2008 13:55:23 +0200 Subject: The following patch calls the op_bind operation for an interface which context is altered by dcerpc alter_context requests. It prevents dcerpc_server from returning errors (nca_s_fault_access_denied, then nca_s_fault_context_mismatch in further client requests) and keeps the connection alive. Signed-off-by: Stefan Metzmacher (This used to be commit 718f9ce6889346c92894e868f0678fbe404a43ab) --- source4/rpc_server/dcerpc_server.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'source4') diff --git a/source4/rpc_server/dcerpc_server.c b/source4/rpc_server/dcerpc_server.c index eb467709c9..e0351bb259 100644 --- a/source4/rpc_server/dcerpc_server.c +++ b/source4/rpc_server/dcerpc_server.c @@ -688,6 +688,7 @@ static NTSTATUS dcesrv_alter_new_context(struct dcesrv_call_state *call, uint32_ struct dcesrv_connection_context *context; const struct dcesrv_interface *iface; struct GUID uuid, *transfer_syntax_uuid; + NTSTATUS status; if_version = call->pkt.u.alter.ctx_list[0].abstract_syntax.if_version; uuid = call->pkt.u.alter.ctx_list[0].abstract_syntax.uuid; @@ -721,6 +722,13 @@ static NTSTATUS dcesrv_alter_new_context(struct dcesrv_call_state *call, uint32_ DLIST_ADD(call->conn->contexts, context); call->context = context; + if (iface) { + status = iface->bind(call, iface); + if (!NT_STATUS_IS_OK(status)) { + return status; + } + } + return NT_STATUS_OK; } -- cgit