diff options
author | Andrew Tridgell <tridge@samba.org> | 2003-11-24 12:40:47 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2003-11-24 12:40:47 +0000 |
commit | 7befc0648e4366980b7efdf31cc946ea11de5101 (patch) | |
tree | 984c165579d04575a11db9077c4da518790ca494 /source4/torture | |
parent | bbb11d4a0dc02a6125855620e0a59a6b24107e4d (diff) | |
download | samba-7befc0648e4366980b7efdf31cc946ea11de5101.tar.gz samba-7befc0648e4366980b7efdf31cc946ea11de5101.tar.bz2 samba-7befc0648e4366980b7efdf31cc946ea11de5101.zip |
initial implementation of dcerpc over tcp. RPC-EPMAPPER works, now to
add epm_Map calls and support the rest of the pipes
(This used to be commit 39add481582609ddb9d0b3bae45fde3226ece481)
Diffstat (limited to 'source4/torture')
-rw-r--r-- | source4/torture/rpc/epmapper.c | 8 | ||||
-rw-r--r-- | source4/torture/torture.c | 24 |
2 files changed, 28 insertions, 4 deletions
diff --git a/source4/torture/rpc/epmapper.c b/source4/torture/rpc/epmapper.c index de3b0b67d2..a056f2254e 100644 --- a/source4/torture/rpc/epmapper.c +++ b/source4/torture/rpc/epmapper.c @@ -179,10 +179,10 @@ BOOL torture_rpc_epmapper(int dummy) mem_ctx = talloc_init("torture_rpc_epmapper"); - status = torture_rpc_connection(&p, - DCERPC_EPMAPPER_NAME, - DCERPC_EPMAPPER_UUID, - DCERPC_EPMAPPER_VERSION); + status = torture_rpc_tcp(&p, + DCERPC_EPMAPPER_NAME, + DCERPC_EPMAPPER_UUID, + DCERPC_EPMAPPER_VERSION); if (!NT_STATUS_IS_OK(status)) { return False; } diff --git a/source4/torture/torture.c b/source4/torture/torture.c index c07b516baa..73373d944c 100644 --- a/source4/torture/torture.c +++ b/source4/torture/torture.c @@ -157,6 +157,30 @@ NTSTATUS torture_rpc_connection(struct dcerpc_pipe **p, return status; } +/* open a rpc connection to a named pipe */ +NTSTATUS torture_rpc_tcp(struct dcerpc_pipe **p, + const char *pipe_name, + const char *pipe_uuid, + uint32 pipe_version) +{ + NTSTATUS status; + + status = dcerpc_pipe_open_tcp(p, + lp_parm_string(-1, "torture", "host"), + lp_parm_int(-1, "torture", "share"), + pipe_uuid, pipe_version); + if (!NT_STATUS_IS_OK(status)) { + printf("Open of pipe '%s' failed with error (%s)\n", + pipe_name, nt_errstr(status)); + return status; + } + + /* always do NDR validation in smbtorture */ + (*p)->flags |= DCERPC_DEBUG_VALIDATE_BOTH; + + return status; +} + /* close a rpc connection to a named pipe */ NTSTATUS torture_rpc_close(struct dcerpc_pipe *p) { |