summaryrefslogtreecommitdiffstats
path: root/pidl/lib/Parse/Pidl
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2010-07-02 10:17:44 +0200
committerGünther Deschner <gd@samba.org>2010-07-08 16:35:26 +0200
commit690ed0c5e2c61584daa2acb5dbfb680ecee83e0f (patch)
treeb630437f70185cfc2832e0b8478f3667831d24f2 /pidl/lib/Parse/Pidl
parent309ad2b08f2964c30fd71af027b7c94f5d761e4a (diff)
downloadsamba-690ed0c5e2c61584daa2acb5dbfb680ecee83e0f.tar.gz
samba-690ed0c5e2c61584daa2acb5dbfb680ecee83e0f.tar.xz
samba-690ed0c5e2c61584daa2acb5dbfb680ecee83e0f.zip
s3-rpc: when using rpc_pipe_open_internal, make sure to go through NDR.
Otherwise a lot of information that is usually generated in the ndr_push remains in an uninitialized state. Guenther
Diffstat (limited to 'pidl/lib/Parse/Pidl')
-rw-r--r--pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm54
1 files changed, 0 insertions, 54 deletions
diff --git a/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm b/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm
index 311eb5b6198..a25d12bfea4 100644
--- a/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm
+++ b/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm
@@ -225,58 +225,6 @@ sub ParseFunction($$)
pidl "";
}
-sub ParseDispatchFunction($)
-{
- my ($if) = @_;
-
- pidl_hdr "NTSTATUS rpc_$if->{NAME}_dispatch(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const struct ndr_interface_table *table, uint32_t opnum, void *r);";
- pidl "NTSTATUS rpc_$if->{NAME}_dispatch(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const struct ndr_interface_table *table, uint32_t opnum, void *_r)";
- pidl "{";
- indent;
- pidl "if (cli->pipes_struct == NULL) {";
- pidl "\treturn NT_STATUS_INVALID_PARAMETER;";
- pidl "}";
- pidl "";
- pidl "/* set opnum in fake rpc header */";
- pidl "cli->pipes_struct->hdr_req.opnum = opnum;";
- pidl "";
- pidl "switch (opnum)";
- pidl "{";
- indent;
- foreach my $fn (@{$if->{FUNCTIONS}}) {
- next if ($fn->{PROPERTIES}{noopnum});
- my $op = "NDR_".uc($fn->{NAME});
- pidl "case $op: {";
- indent;
- pidl "struct $fn->{NAME} *r = (struct $fn->{NAME} *)_r;";
-
- pidl "if (DEBUGLEVEL >= 10) {";
- pidl "\tNDR_PRINT_IN_DEBUG($fn->{NAME}, r);";
- pidl "}";
-
- CallWithStruct("cli->pipes_struct", "mem_ctx", $fn,
- sub { pidl "\treturn NT_STATUS_NO_MEMORY;"; });
-
- pidl "if (DEBUGLEVEL >= 10) {";
- pidl "\tNDR_PRINT_OUT_DEBUG($fn->{NAME}, r);";
- pidl "}";
-
- pidl "return NT_STATUS_OK;";
- deindent;
- pidl "}";
- pidl "";
- }
-
- pidl "default:";
- pidl "\treturn NT_STATUS_NOT_IMPLEMENTED;";
- deindent;
- pidl "}";
- deindent;
- pidl "}";
-
- pidl "";
-}
-
sub ParseInterface($)
{
my $if = shift;
@@ -317,8 +265,6 @@ sub ParseInterface($)
pidl "}";
pidl "";
- ParseDispatchFunction($if);
-
if (not has_property($if, "no_srv_register")) {
pidl_hdr "NTSTATUS rpc_$if->{NAME}_init(void);";
pidl "NTSTATUS rpc_$if->{NAME}_init(void)";