summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2003-12-14 13:22:12 +0000
committerAndrew Tridgell <tridge@samba.org>2003-12-14 13:22:12 +0000
commitf6eb8342cba87c7c8f17471ed9783b567d36b0ed (patch)
tree40484486513e10f1fb4764ce62f7fdc3f8df17ff /source4/torture
parent4cd6b8a64b5d995190a28b2a8308e688847df49c (diff)
downloadsamba-f6eb8342cba87c7c8f17471ed9783b567d36b0ed.tar.gz
samba-f6eb8342cba87c7c8f17471ed9783b567d36b0ed.tar.bz2
samba-f6eb8342cba87c7c8f17471ed9783b567d36b0ed.zip
added auto-generation of the server side boilerplate code for each
pipe. The server side code gets generated as librpc/gen_ndr/ndr_NAME_s.c and gets included in the pipe module (This used to be commit bd3dcfe5820489a838e19b244266bd9126af5eb4)
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/rpc/echo.c8
-rw-r--r--source4/torture/torture.c11
2 files changed, 15 insertions, 4 deletions
diff --git a/source4/torture/rpc/echo.c b/source4/torture/rpc/echo.c
index 4ac57e7b6e..be70939de1 100644
--- a/source4/torture/rpc/echo.c
+++ b/source4/torture/rpc/echo.c
@@ -169,12 +169,12 @@ static BOOL test_sinkdata(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
static BOOL test_testcall(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
{
NTSTATUS status;
- struct TestCall r;
+ struct echo_TestCall r;
r.in.s1 = "input string";
printf("\nTesting TestCall\n");
- status = dcerpc_TestCall(p, mem_ctx, &r);
+ status = dcerpc_echo_TestCall(p, mem_ctx, &r);
if (!NT_STATUS_IS_OK(status)) {
printf("TestCall failed - %s\n", nt_errstr(status));
return False;
@@ -189,7 +189,7 @@ static BOOL test_testcall(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
static BOOL test_testcall2(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
{
NTSTATUS status;
- struct TestCall2 r;
+ struct echo_TestCall2 r;
int i;
BOOL ret = True;
@@ -197,7 +197,7 @@ static BOOL test_testcall2(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
r.in.level = i;
printf("\nTesting TestCall2 level %d\n", i);
- status = dcerpc_TestCall2(p, mem_ctx, &r);
+ status = dcerpc_echo_TestCall2(p, mem_ctx, &r);
if (!NT_STATUS_IS_OK(status)) {
printf("TestCall2 failed - %s\n", nt_errstr(status));
ret = False;
diff --git a/source4/torture/torture.c b/source4/torture/torture.c
index cc0a83fe80..84734569d0 100644
--- a/source4/torture/torture.c
+++ b/source4/torture/torture.c
@@ -226,7 +226,18 @@ NTSTATUS torture_rpc_connection(struct dcerpc_pipe **p,
cli_tree_close(cli->tree);
/* bind to the pipe, using the uuid as the key */
+#if 0
status = dcerpc_bind_auth_none(*p, pipe_uuid, pipe_version);
+#else
+ /* enable signing on tcp connections */
+ (*p)->flags |= DCERPC_SIGN;
+
+ /* bind to the pipe, using the uuid as the key */
+ status = dcerpc_bind_auth_ntlm(*p, pipe_uuid, pipe_version,
+ lp_workgroup(),
+ lp_parm_string(-1, "torture", "username"),
+ lp_parm_string(-1, "torture", "password"));
+#endif
if (!NT_STATUS_IS_OK(status)) {
dcerpc_pipe_close(*p);
return status;