diff options
author | Andrew Tridgell <tridge@samba.org> | 2003-11-26 01:16:41 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2003-11-26 01:16:41 +0000 |
commit | e0ac659917066dbf7f8fdbcc7684ce2b49dd04d9 (patch) | |
tree | 349f47df69b41ca0c9a11452e7f56e6c6c3647ce /source4/torture | |
parent | 06942f3ddbb897c66644c253d1d2a7a21a31702e (diff) | |
download | samba-e0ac659917066dbf7f8fdbcc7684ce2b49dd04d9.tar.gz samba-e0ac659917066dbf7f8fdbcc7684ce2b49dd04d9.tar.bz2 samba-e0ac659917066dbf7f8fdbcc7684ce2b49dd04d9.zip |
signed DCERPC over TCP now works !
* moved ntlmssp code into libcli/auth/, and updated to latest ntlmssp
code from samba3 (thanks Andrew! the new interface is great)
* added signing/ntlmssp support in the dcerpc code
* added a dcerpc_auth.c module for the various dcerpc auth mechanisms
(This used to be commit c18c9b5585a3e5f7868562820c14f7cb529cdbcd)
Diffstat (limited to 'source4/torture')
-rw-r--r-- | source4/torture/rpc/epmapper.c | 8 | ||||
-rw-r--r-- | source4/torture/torture.c | 33 |
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; |