summaryrefslogtreecommitdiff
path: root/source3/rpc_server/srv_pipe_hnd.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2009-11-08 10:51:34 +0100
committerVolker Lendecke <vl@samba.org>2009-11-08 13:12:14 +0100
commit98fb71782e05ae72cd6abeb38b6e0b96a50c1761 (patch)
treed70c44840e3cc9b69911d779a0f61a29d76ffb00 /source3/rpc_server/srv_pipe_hnd.c
parent9621306351cdb469ef393a6d8cbeea456bc4bd9f (diff)
downloadsamba-98fb71782e05ae72cd6abeb38b6e0b96a50c1761.tar.gz
samba-98fb71782e05ae72cd6abeb38b6e0b96a50c1761.tar.bz2
samba-98fb71782e05ae72cd6abeb38b6e0b96a50c1761.zip
s3: Do not reference the ndr_tables in the server calls directly
This involves storing the interface table in the pipes_struct
Diffstat (limited to 'source3/rpc_server/srv_pipe_hnd.c')
-rw-r--r--source3/rpc_server/srv_pipe_hnd.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/source3/rpc_server/srv_pipe_hnd.c b/source3/rpc_server/srv_pipe_hnd.c
index e7d94d70ec..8bc2bdd505 100644
--- a/source3/rpc_server/srv_pipe_hnd.c
+++ b/source3/rpc_server/srv_pipe_hnd.c
@@ -57,7 +57,8 @@ pipes_struct *get_next_internal_pipe(pipes_struct *p)
const char *get_pipe_name_tos(struct pipes_struct *p)
{
- return get_pipe_name_from_syntax(talloc_tos(), &p->syntax);
+ return get_pipe_name_from_syntax(talloc_tos(),
+ &p->interface->syntax_id);
}
/****************************************************************************
@@ -119,6 +120,14 @@ static struct pipes_struct *make_internal_rpc_pipe_p(TALLOC_CTX *mem_ctx,
return NULL;
}
+ p->interface = get_iface_from_syntax(syntax);
+ if (p->interface == NULL) {
+ DEBUG(10, ("Could not find ndr table for syntax\n"));
+ TALLOC_FREE(p->mem_ctx);
+ TALLOC_FREE(p);
+ return NULL;
+ }
+
if (!init_pipe_handle_list(p, syntax)) {
DEBUG(0,("open_rpc_pipe_p: init_pipe_handles failed.\n"));
talloc_destroy(p->mem_ctx);
@@ -161,8 +170,6 @@ static struct pipes_struct *make_internal_rpc_pipe_p(TALLOC_CTX *mem_ctx,
*/
prs_init_empty(&p->out_data.rdata, p->mem_ctx, MARSHALL);
- p->syntax = *syntax;
-
DEBUG(4,("Created internal pipe %s (pipes_open=%d)\n",
get_pipe_name_from_syntax(talloc_tos(), syntax), pipes_open));