s4/irpc: Add security token to the binding handle when doing irp call forwarding
authorAnatoliy Atanasov <anatoliy.atanasov@postpath.com>
Mon, 27 Sep 2010 00:05:13 +0000 (17:05 -0700)
committerAnatoliy Atanasov <anatoliy.atanasov@postpath.com>
Mon, 27 Sep 2010 16:59:21 +0000 (09:59 -0700)
source4/rpc_server/common/forward.c

index c983ac361ed0b1cfcd1124d30e1a8833e29e4ff6..113ac5f6c467e8f88e03bf31582cca436780f224 100644 (file)
@@ -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,