Simplify pipe_names: we only do ndr_transfer_syntax anyway
authorVolker Lendecke <vl@samba.org>
Sun, 20 Jul 2008 08:00:46 +0000 (10:00 +0200)
committerVolker Lendecke <vl@samba.org>
Sun, 20 Jul 2008 15:06:21 +0000 (17:06 +0200)
(This used to be commit b808403af55a37f2ec0e87e60450505ddfc2edda)

source3/include/rpc_dce.h
source3/rpc_client/cli_pipe.c

index 9b2044fa20289a5b7cf1a2cfce0190964cc8fca8..580b14f1d810ad9a50e21b658d7b119b1474a15e 100644 (file)
@@ -161,16 +161,6 @@ typedef struct ndr_syntax_id RPC_IFACE;
 
 #define RPC_IFACE_LEN (UUID_SIZE + 4)
 
-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 */
-
-       const char *server_pipe;  /* this one is the secondary syntax name */
-       const RPC_IFACE *trans_syntax; /* this one is the primary syntax id */
-};
-
 /* RPC_HDR - dce rpc header */
 typedef struct rpc_hdr_info {
        uint8  major; /* 5 - RPC major version */
index dc130a1d9f2830939450cbda29dc5e9b2e237853..cfb3091feb0cc62d8939e5cbd8588ac7095fcfc7 100644 (file)
@@ -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);