diff options
author | Tim Potter <tpot@samba.org> | 2003-04-14 02:08:03 +0000 |
---|---|---|
committer | Tim Potter <tpot@samba.org> | 2003-04-14 02:08:03 +0000 |
commit | 3b865c73989e7f13e3a6453f9f9c9a7aca74b129 (patch) | |
tree | 453336f098c536d0ec79d3bf899e00ac107d2fab /source3 | |
parent | 3ef2a0b3ff93436b13318748574b0aebb4da56ab (diff) | |
download | samba-3b865c73989e7f13e3a6453f9f9c9a7aca74b129.tar.gz samba-3b865c73989e7f13e3a6453f9f9c9a7aca74b129.tar.bz2 samba-3b865c73989e7f13e3a6453f9f9c9a7aca74b129.zip |
Merge of rpcecho pipe for testing large dcerpc requests and responses.
Only compiled in when --enable-developer argument passed to configure.
(This used to be commit 017da9393bab276543d0d5c50df8c760780f2450)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/include/ntdomain.h | 1 | ||||
-rw-r--r-- | source3/include/smb.h | 4 | ||||
-rw-r--r-- | source3/rpc_parse/parse_rpc.c | 10 | ||||
-rw-r--r-- | source3/rpc_server/srv_pipe.c | 5 | ||||
-rw-r--r-- | source3/rpcclient/rpcclient.c | 7 | ||||
-rw-r--r-- | source3/smbd/nttrans.c | 1 |
6 files changed, 25 insertions, 3 deletions
diff --git a/source3/include/ntdomain.h b/source3/include/ntdomain.h index d02195b378..dc0ffc8035 100644 --- a/source3/include/ntdomain.h +++ b/source3/include/ntdomain.h @@ -382,5 +382,6 @@ struct acct_info #include "rpc_spoolss.h" #include "rpc_dfs.h" #include "rpc_ds.h" +#include "rpc_echo.h" #endif /* _NT_DOMAIN_H */ diff --git a/source3/include/smb.h b/source3/include/smb.h index 5baec705f5..f6c60644be 100644 --- a/source3/include/smb.h +++ b/source3/include/smb.h @@ -186,6 +186,7 @@ typedef smb_ucs2_t wfstring[FSTRING_LEN]; #define PIPE_LSARPC "\\PIPE\\lsarpc" #define PIPE_SPOOLSS "\\PIPE\\spoolss" #define PIPE_NETDFS "\\PIPE\\netdfs" +#define PIPE_ECHO "\\PIPE\\rpcecho" #define PIPE_NETLOGON_PLAIN "\\NETLOGON" @@ -198,7 +199,8 @@ typedef smb_ucs2_t wfstring[FSTRING_LEN]; #define PI_WINREG 6 #define PI_SPOOLSS 7 #define PI_NETDFS 8 -#define PI_MAX_PIPES 9 +#define PI_ECHO 9 +#define PI_MAX_PIPES 10 /* 64 bit time (100usec) since ????? - cifs6.txt, section 3.5, page 30 */ typedef struct nttime_info diff --git a/source3/rpc_parse/parse_rpc.c b/source3/rpc_parse/parse_rpc.c index 656082e05a..30909c6910 100644 --- a/source3/rpc_parse/parse_rpc.c +++ b/source3/rpc_parse/parse_rpc.c @@ -138,6 +138,15 @@ interface/version dce/rpc pipe identification }, 0x03 \ } +#define SYNT_ECHO_V1 \ +{ \ + { \ + 0x60a15ec5, 0x4de8, 0x11d7, \ + { 0xa6, 0x37, 0x00, 0x50, \ + 0x56, 0xa2, 0x01, 0x82 } \ + }, 0x01 \ +} + /* * IMPORTANT!! If you update this structure, make sure to * update the index #defines in smb.h. @@ -155,6 +164,7 @@ const struct pipe_id_info pipe_names [] = { PIPE_WINREG , SYNT_WINREG_V1 , PIPE_WINREG , TRANS_SYNT_V2 }, { PIPE_SPOOLSS , SYNT_SPOOLSS_V1 , PIPE_SPOOLSS , TRANS_SYNT_V2 }, { PIPE_NETDFS , SYNT_NETDFS_V3 , PIPE_NETDFS , TRANS_SYNT_V2 }, + { PIPE_ECHO , SYNT_ECHO_V1 , PIPE_ECHO , TRANS_SYNT_V2 }, { NULL , SYNT_NONE_V0 , NULL , SYNT_NONE_V0 } }; diff --git a/source3/rpc_server/srv_pipe.c b/source3/rpc_server/srv_pipe.c index 80275e6070..1a48435c9d 100644 --- a/source3/rpc_server/srv_pipe.c +++ b/source3/rpc_server/srv_pipe.c @@ -538,6 +538,11 @@ static struct api_cmd api_fd_commands[] = #ifndef RPC_DFS_DYNAMIC { "netdfs", rpc_dfs_init }, #endif +#ifdef DEVELOPER +#ifndef RPC_ECHO_DYNAMIC + { "rpcecho", rpc_echo_init }, +#endif +#endif { NULL, NULL } }; diff --git a/source3/rpcclient/rpcclient.c b/source3/rpcclient/rpcclient.c index 0cb4ba98c8..7bdc2f6c84 100644 --- a/source3/rpcclient/rpcclient.c +++ b/source3/rpcclient/rpcclient.c @@ -422,6 +422,7 @@ extern struct cmd_set srvsvc_commands[]; extern struct cmd_set dfs_commands[]; extern struct cmd_set reg_commands[]; extern struct cmd_set ds_commands[]; +extern struct cmd_set echo_commands[]; static struct cmd_set *rpcclient_command_list[] = { rpcclient_commands, @@ -433,6 +434,7 @@ static struct cmd_set *rpcclient_command_list[] = { srvsvc_commands, dfs_commands, reg_commands, + echo_commands, NULL }; @@ -486,13 +488,14 @@ static NTSTATUS do_cmd(struct cli_state *cli, if (!cli_nt_open_netlogon(cli, trust_password, SEC_CHAN_WKSTA)) { - DEBUG(0, ("Could not initialize NETLOGON pipe\n")); + DEBUG(0, ("Could not initialise NETLOGON pipe\n")); return NT_STATUS_UNSUCCESSFUL; } } else { if (cmd_entry->pipe_idx != -1) { if (!cli_nt_session_open(cli, cmd_entry->pipe_idx)) { - DEBUG(0, ("Could not initialize pipe\n")); + DEBUG(0, ("Could not initialise %s\n", + get_pipe_name_from_index(cmd_entry->pipe_idx))); return NT_STATUS_UNSUCCESSFUL; } } diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c index 6d9c649045..9f7fabb75e 100644 --- a/source3/smbd/nttrans.c +++ b/source3/smbd/nttrans.c @@ -40,6 +40,7 @@ static const char *known_nt_pipes[] = { "\\winreg", "\\spoolss", "\\netdfs", + "\\rpcecho", NULL }; |