summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/rpc/epmapper.c8
-rw-r--r--source4/torture/torture.c33
2 files changed, 38 insertions, 3 deletions
diff --git a/source4/torture/rpc/epmapper.c b/source4/torture/rpc/epmapper.c
index cef3355b8a..c5020cad4b 100644
--- a/source4/torture/rpc/epmapper.c
+++ b/source4/torture/rpc/epmapper.c
@@ -72,6 +72,14 @@ static void display_tower(TALLOC_CTX *mem_ctx, struct epm_towers *twr)
break;
case 0x1f:
+ printf(" TCP2:");
+ if (rhs->rhs_data.length == 2) {
+ printf("%d", RSVAL(rhs->rhs_data.data, 0));
+ }
+ break;
+
+ case 0x07:
+ /* what is the difference between this and 0x1f? */
printf(" TCP:");
if (rhs->rhs_data.length == 2) {
printf("%d", RSVAL(rhs->rhs_data.data, 0));
diff --git a/source4/torture/torture.c b/source4/torture/torture.c
index 22798ed236..11b27f12eb 100644
--- a/source4/torture/torture.c
+++ b/source4/torture/torture.c
@@ -142,8 +142,7 @@ static NTSTATUS torture_rpc_tcp(struct dcerpc_pipe **p,
DEBUG(2,("Connecting to dcerpc server %s:%s\n", host, port));
- status = dcerpc_pipe_open_tcp(p, host, atoi(port),
- pipe_uuid, pipe_version);
+ status = dcerpc_pipe_open_tcp(p, host, atoi(port));
if (!NT_STATUS_IS_OK(status)) {
printf("Open of pipe '%s' failed with error (%s)\n",
pipe_name, nt_errstr(status));
@@ -152,6 +151,16 @@ static NTSTATUS torture_rpc_tcp(struct dcerpc_pipe **p,
/* always do NDR validation in smbtorture */
(*p)->flags |= DCERPC_DEBUG_VALIDATE_BOTH;
+
+ /* 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"));
+ if (!NT_STATUS_IS_OK(status)) {
+ dcerpc_pipe_close(*p);
+ return status;
+ }
return status;
}
@@ -176,11 +185,15 @@ NTSTATUS torture_rpc_connection(struct dcerpc_pipe **p,
return NT_STATUS_UNSUCCESSFUL;
}
+ if (! *lp_parm_string(-1, "torture", "share")) {
+ lp_set_cmdline("torture:share", "ipc$");
+ }
+
if (!torture_open_connection(&cli)) {
return NT_STATUS_UNSUCCESSFUL;
}
- status = dcerpc_pipe_open_smb(p, cli->tree, pipe_name, pipe_uuid, pipe_version);
+ status = dcerpc_pipe_open_smb(p, cli->tree, pipe_name);
if (!NT_STATUS_IS_OK(status)) {
printf("Open of pipe '%s' failed with error (%s)\n",
pipe_name, nt_errstr(status));
@@ -188,6 +201,20 @@ NTSTATUS torture_rpc_connection(struct dcerpc_pipe **p,
return status;
}
+ /* bind to the pipe, using the uuid as the key */
+#if 1
+ status = dcerpc_bind_auth_ntlm(*p, pipe_uuid, pipe_version,
+ lp_workgroup(),
+ lp_parm_string(-1, "torture", "username"),
+ lp_parm_string(-1, "torture", "password"));
+#else
+ status = dcerpc_bind_auth_none(*p, pipe_uuid, pipe_version);
+#endif
+ if (!NT_STATUS_IS_OK(status)) {
+ dcerpc_pipe_close(*p);
+ return status;
+ }
+
/* always do NDR validation in smbtorture */
(*p)->flags |= DCERPC_DEBUG_VALIDATE_BOTH;