diff options
author | Stefan Metzmacher <metze@samba.org> | 2012-08-02 08:51:13 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2012-08-04 09:10:22 +0200 |
commit | ba864b83fa43062a684204cbaf9bf1b0c2074533 (patch) | |
tree | 1501b95c064dc7f22d12f6ff895e0dec6ec781d0 | |
parent | 67767de4e9e4a3a2cac1f28b590398bd587467da (diff) | |
download | samba-ba864b83fa43062a684204cbaf9bf1b0c2074533.tar.gz samba-ba864b83fa43062a684204cbaf9bf1b0c2074533.tar.bz2 samba-ba864b83fa43062a684204cbaf9bf1b0c2074533.zip |
s4:torture: add support for SMB_EXTENDED_SIGNATURES during SMBtconX
metze
-rw-r--r-- | source4/torture/rpc/samba3rpc.c | 7 | ||||
-rw-r--r-- | source4/torture/util_smb.c | 8 |
2 files changed, 14 insertions, 1 deletions
diff --git a/source4/torture/rpc/samba3rpc.c b/source4/torture/rpc/samba3rpc.c index a71ae52aca..e2c8b66182 100644 --- a/source4/torture/rpc/samba3rpc.c +++ b/source4/torture/rpc/samba3rpc.c @@ -47,6 +47,7 @@ #include "librpc/rpc/dcerpc.h" #include "librpc/rpc/dcerpc_proto.h" #include "../source3/libsmb/smb2cli.h" +#include "libcli/smb/smbXcli_base.h" /* * This tests a RPC call using an invalid vuid @@ -1728,6 +1729,7 @@ static NTSTATUS secondary_tcon(struct torture_context *tctx, tcon.generic.level = RAW_TCON_TCONX; tcon.tconx.in.flags = TCONX_FLAG_EXTENDED_RESPONSE; + tcon.tconx.in.flags |= TCONX_FLAG_EXTENDED_SIGNATURES; tcon.tconx.in.password = data_blob(NULL, 0); tcon.tconx.in.path = sharename; tcon.tconx.in.device = "?????"; @@ -1741,6 +1743,11 @@ static NTSTATUS secondary_tcon(struct torture_context *tctx, } result->tid = tcon.tconx.out.tid; + + if (tcon.tconx.out.options & SMB_EXTENDED_SIGNATURES) { + smb1cli_session_protect_session_key(result->session->smbXcli); + } + result = talloc_steal(mem_ctx, result); talloc_set_destructor(result, destroy_tree); talloc_free(tmp_ctx); diff --git a/source4/torture/util_smb.c b/source4/torture/util_smb.c index 8f2af8c5de..343c8a7f35 100644 --- a/source4/torture/util_smb.c +++ b/source4/torture/util_smb.c @@ -35,7 +35,7 @@ #include "libcli/security/security.h" #include "libcli/util/clilsa.h" #include "torture/util.h" - +#include "libcli/smb/smbXcli_base.h" /** setup a directory ready for a test @@ -869,6 +869,7 @@ NTSTATUS torture_second_tcon(TALLOC_CTX *mem_ctx, tcon.generic.level = RAW_TCON_TCONX; tcon.tconx.in.flags = TCONX_FLAG_EXTENDED_RESPONSE; + tcon.tconx.in.flags |= TCONX_FLAG_EXTENDED_SIGNATURES; /* Ignore share mode security here */ tcon.tconx.in.password = data_blob(NULL, 0); @@ -882,6 +883,11 @@ NTSTATUS torture_second_tcon(TALLOC_CTX *mem_ctx, } result->tid = tcon.tconx.out.tid; + + if (tcon.tconx.out.options & SMB_EXTENDED_SIGNATURES) { + smb1cli_session_protect_session_key(result->session->smbXcli); + } + *res = talloc_steal(mem_ctx, result); talloc_free(tmp_ctx); return NT_STATUS_OK; |