summaryrefslogtreecommitdiff
path: root/source3/rpc_client
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2008-07-20 10:00:46 +0200
committerVolker Lendecke <vl@samba.org>2008-07-20 17:06:21 +0200
commit66669bad4384086c91c833db78d70b8aac7a4f04 (patch)
tree0b35219de22324a2fb42bcd79d89c4d3fbd7febd /source3/rpc_client
parent9dece1b5d7c9b9e91f4bc0b56a83be689145f009 (diff)
downloadsamba-66669bad4384086c91c833db78d70b8aac7a4f04.tar.gz
samba-66669bad4384086c91c833db78d70b8aac7a4f04.tar.bz2
samba-66669bad4384086c91c833db78d70b8aac7a4f04.zip
Simplify pipe_names: we only do ndr_transfer_syntax anyway
(This used to be commit b808403af55a37f2ec0e87e60450505ddfc2edda)
Diffstat (limited to 'source3/rpc_client')
-rw-r--r--source3/rpc_client/cli_pipe.c59
1 files changed, 24 insertions, 35 deletions
diff --git a/source3/rpc_client/cli_pipe.c b/source3/rpc_client/cli_pipe.c
index dc130a1d9f..cfb3091feb 100644
--- a/source3/rpc_client/cli_pipe.c
+++ b/source3/rpc_client/cli_pipe.c
@@ -60,41 +60,30 @@ static const struct ndr_syntax_id syntax_spoolss = {
* update the index #defines in smb.h.
*/
-static const struct pipe_id_info pipe_names [] =
+static const struct pipe_id_info {
+ /* the names appear not to matter: the syntaxes _do_ matter */
+
+ const char *client_pipe;
+ const RPC_IFACE *abstr_syntax; /* this one is the abstract syntax id */
+} pipe_names [] =
{
- { PIPE_LSARPC, &ndr_table_lsarpc.syntax_id,
- PIPE_LSASS, &ndr_transfer_syntax },
- { PIPE_LSARPC, &ndr_table_dssetup.syntax_id,
- PIPE_LSASS, &ndr_transfer_syntax },
- { PIPE_SAMR, &ndr_table_samr.syntax_id,
- PIPE_LSASS, &ndr_transfer_syntax },
- { PIPE_NETLOGON, &ndr_table_netlogon.syntax_id,
- PIPE_LSASS, &ndr_transfer_syntax },
- { PIPE_SRVSVC, &ndr_table_srvsvc.syntax_id,
- PIPE_NTSVCS, &ndr_transfer_syntax },
- { PIPE_WKSSVC, &ndr_table_wkssvc.syntax_id,
- PIPE_NTSVCS, &ndr_transfer_syntax },
- { PIPE_WINREG, &ndr_table_winreg.syntax_id,
- PIPE_WINREG, &ndr_transfer_syntax },
- { PIPE_SPOOLSS, &syntax_spoolss,
- PIPE_SPOOLSS, &ndr_transfer_syntax },
- { PIPE_NETDFS, &ndr_table_netdfs.syntax_id,
- PIPE_NETDFS, &ndr_transfer_syntax },
- { PIPE_ECHO, &ndr_table_rpcecho.syntax_id,
- PIPE_ECHO, &ndr_transfer_syntax },
- { PIPE_SHUTDOWN, &ndr_table_initshutdown.syntax_id,
- PIPE_SHUTDOWN, &ndr_transfer_syntax },
- { PIPE_SVCCTL, &ndr_table_svcctl.syntax_id,
- PIPE_NTSVCS, &ndr_transfer_syntax },
- { PIPE_EVENTLOG, &ndr_table_eventlog.syntax_id,
- PIPE_EVENTLOG, &ndr_transfer_syntax },
- { PIPE_NTSVCS, &ndr_table_ntsvcs.syntax_id,
- PIPE_NTSVCS, &ndr_transfer_syntax },
- { PIPE_EPMAPPER, &ndr_table_epmapper.syntax_id,
- PIPE_EPMAPPER, &ndr_transfer_syntax },
- { PIPE_DRSUAPI, &ndr_table_drsuapi.syntax_id,
- PIPE_DRSUAPI, &ndr_transfer_syntax },
- { NULL, NULL, NULL, NULL }
+ { PIPE_LSARPC, &ndr_table_lsarpc.syntax_id },
+ { PIPE_LSARPC, &ndr_table_dssetup.syntax_id },
+ { PIPE_SAMR, &ndr_table_samr.syntax_id },
+ { PIPE_NETLOGON, &ndr_table_netlogon.syntax_id },
+ { PIPE_SRVSVC, &ndr_table_srvsvc.syntax_id },
+ { PIPE_WKSSVC, &ndr_table_wkssvc.syntax_id },
+ { PIPE_WINREG, &ndr_table_winreg.syntax_id },
+ { PIPE_SPOOLSS, &syntax_spoolss },
+ { PIPE_NETDFS, &ndr_table_netdfs.syntax_id },
+ { PIPE_ECHO, &ndr_table_rpcecho.syntax_id },
+ { PIPE_SHUTDOWN, &ndr_table_initshutdown.syntax_id },
+ { PIPE_SVCCTL, &ndr_table_svcctl.syntax_id },
+ { PIPE_EVENTLOG, &ndr_table_eventlog.syntax_id },
+ { PIPE_NTSVCS, &ndr_table_ntsvcs.syntax_id },
+ { PIPE_EPMAPPER, &ndr_table_epmapper.syntax_id },
+ { PIPE_DRSUAPI, &ndr_table_drsuapi.syntax_id },
+ { NULL, NULL }
};
/****************************************************************************
@@ -2926,7 +2915,7 @@ static struct rpc_pipe_client *rpc_pipe_open_np(struct cli_state *cli, int pipe_
result->trans.np.cli = cli;
result->abstract_syntax = pipe_names[pipe_idx].abstr_syntax;
- result->transfer_syntax = pipe_names[pipe_idx].trans_syntax;
+ result->transfer_syntax = &ndr_transfer_syntax;
result->desthost = talloc_strdup(result, cli->desthost);
result->srv_name_slash = talloc_asprintf_strupper_m(
result, "\\\\%s", result->desthost);