s3-rpc_server: Introduce transport in pipe_struct.
authorAndreas Schneider <asn@samba.org>
Thu, 3 Mar 2011 13:20:26 +0000 (14:20 +0100)
committerGünther Deschner <gd@samba.org>
Tue, 8 Mar 2011 10:41:30 +0000 (11:41 +0100)
Signed-off-by: Günther Deschner <gd@samba.org>
source3/include/includes.h
source3/include/ntdomain.h
source3/librpc/rpc/dcerpc.h
source3/rpc_server/rpc_ncacn_np.c
source3/rpc_server/rpc_server.c

index d715db6354aeb262f829b4112d973997809d68f9..c79c96260a420133955ca24c31fa78fb5b0af5b5 100644 (file)
@@ -612,8 +612,8 @@ extern void *cmdline_lp_ctx;
 #include "msdfs.h"
 
 #include "auth.h"
-#include "ntdomain.h"
 #include "librpc/rpc/dcerpc.h"
+#include "ntdomain.h"
 #include "client.h"
 
 #include "module.h"
index e1be93c4ba264ffe9f9292007210bd53b3961290..5819c9aa65d550024ca6cec053d9dc418438bf07 100644 (file)
@@ -120,6 +120,8 @@ struct pipes_struct {
        struct client_address *client_id;
        struct client_address *server_id;
 
+       enum dcerpc_transport_t transport;
+
        struct auth_serversupplied_info *session_info;
        struct messaging_context *msg_ctx;
 
index 0f900871d19d9a9cb307c4187951628824e1c91d..72a8ad55da34f5ade68b2fd32249a723158e3e76 100644 (file)
@@ -120,6 +120,7 @@ _PUBLIC_ NTSTATUS dcerpc_binding_build_tower(TALLOC_CTX *mem_ctx,
                                             struct epm_tower *tower);
 
 struct NL_AUTH_MESSAGE;
+struct pipe_auth_data;
 
 /* The following definitions come from librpc/rpc/dcerpc_helpers.c  */
 NTSTATUS dcerpc_push_ncacn_packet(TALLOC_CTX *mem_ctx,
index 276e3f85dbd9aaec79f99672f5719aeb1b1a1728..41985e4ee07e5824ca3169f6c691d8d41496d0f4 100644 (file)
@@ -166,6 +166,7 @@ struct pipes_struct *make_internal_rpc_pipe_p(TALLOC_CTX *mem_ctx,
        p->endian = RPC_LITTLE_ENDIAN;
 
        p->syntax = *syntax;
+       p->transport = NCALRPC;
 
        DEBUG(4,("Created internal pipe %s (pipes_open=%d)\n",
                 get_pipe_name_from_syntax(talloc_tos(), syntax), pipes_open));
index eb98a447f526529eef363b731d2ac49aef4fab17..4cab4f1521e0a3c290c76926e074bc44d6a5621a 100644 (file)
@@ -76,6 +76,7 @@ static NTSTATUS auth_anonymous_session_info(TALLOC_CTX *mem_ctx,
 static int make_server_pipes_struct(TALLOC_CTX *mem_ctx,
                                    const char *pipe_name,
                                    const struct ndr_syntax_id id,
+                                   enum dcerpc_transport_t transport,
                                    const char *client_address,
                                    const char *server_address,
                                    struct auth_session_info_transport *session_info,
@@ -94,6 +95,7 @@ static int make_server_pipes_struct(TALLOC_CTX *mem_ctx,
                return -1;
        }
        p->syntax = id;
+       p->transport = transport;
 
        p->mem_ctx = talloc_named(p, 0, "pipe %s %p", pipe_name, p);
        if (!p->mem_ctx) {
@@ -540,7 +542,7 @@ static void named_pipe_accept_done(struct tevent_req *subreq)
        }
 
        ret = make_server_pipes_struct(npc,
-                                       npc->pipe_name, npc->pipe_id,
+                                       npc->pipe_name, npc->pipe_id, NCACN_NP,
                                        cli_addr, NULL, npc->session_info,
                                        &npc->p, &error);
        if (ret != 0) {
@@ -1218,6 +1220,7 @@ static void dcerpc_ncacn_accept(struct tevent_context *ev_ctx,
        rc = make_server_pipes_struct(ncacn_conn,
                                      pipe_name,
                                      ncacn_conn->syntax_id,
+                                     ncacn_conn->transport,
                                      cli_str,
                                      srv_str,
                                      ncacn_conn->session_info,