summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/torture/rpc/samba3rpc.c7
-rw-r--r--source4/torture/util_smb.c8
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;