From 2cf0525b2382d22b3497f49eb58b9fd8f0c837e1 Mon Sep 17 00:00:00 2001 From: Anatoliy Atanasov Date: Sun, 26 Sep 2010 17:05:13 -0700 Subject: s4/irpc: Add security token to the binding handle when doing irp call forwarding --- source4/rpc_server/common/forward.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/source4/rpc_server/common/forward.c b/source4/rpc_server/common/forward.c index c983ac361e..113ac5f6c4 100644 --- a/source4/rpc_server/common/forward.c +++ b/source4/rpc_server/common/forward.c @@ -24,6 +24,8 @@ #include "rpc_server/dcerpc_server.h" #include "rpc_server/common/common.h" #include "messaging/irpc.h" +#include "auth/auth.h" + struct dcesrv_forward_state { const char *opname; @@ -69,6 +71,7 @@ void dcesrv_irpc_forward_rpc_call(struct dcesrv_call_state *dce_call, TALLOC_CTX struct dcesrv_forward_state *st; struct dcerpc_binding_handle *binding_handle; struct tevent_req *subreq; + struct security_token *token; st = talloc(mem_ctx, struct dcesrv_forward_state); if (st == NULL) { @@ -100,6 +103,10 @@ void dcesrv_irpc_forward_rpc_call(struct dcesrv_call_state *dce_call, TALLOC_CTX /* reset timeout for the handle */ dcerpc_binding_handle_set_timeout(binding_handle, timeout); + /* add security token to the handle*/ + token = dce_call->conn->auth_state.session_info->security_token; + irpc_binding_handle_add_security_token(binding_handle, token); + /* forward the call */ subreq = dcerpc_binding_handle_call_send(st, dce_call->event_ctx, binding_handle, -- cgit