diff options
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) { |