summaryrefslogtreecommitdiff
path: root/source4/torture/smb2
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2012-02-26 01:36:51 +0100
committerMichael Adam <obnox@samba.org>2012-02-28 00:08:53 +0100
commit681bca6768b8a054ac1178d1ff344c302dcd6846 (patch)
tree68445a62802a835308fdf7627bd24faed1700cdc /source4/torture/smb2
parent69a64e6695779437b13b621ea6fb778bf1501cc8 (diff)
downloadsamba-681bca6768b8a054ac1178d1ff344c302dcd6846.tar.gz
samba-681bca6768b8a054ac1178d1ff344c302dcd6846.tar.bz2
samba-681bca6768b8a054ac1178d1ff344c302dcd6846.zip
s4:torture:smb2: add previous_session argument to torture_smb2_session_setup()
To allow for doing a session reconnect
Diffstat (limited to 'source4/torture/smb2')
-rw-r--r--source4/torture/smb2/durable_open.c5
-rw-r--r--source4/torture/smb2/util.c3
2 files changed, 6 insertions, 2 deletions
diff --git a/source4/torture/smb2/durable_open.c b/source4/torture/smb2/durable_open.c
index 3d4744d1de..03e6c9066c 100644
--- a/source4/torture/smb2/durable_open.c
+++ b/source4/torture/smb2/durable_open.c
@@ -560,7 +560,10 @@ bool test_durable_open_reopen4(struct torture_context *tctx,
status = smb2_logoff(tree->session);
CHECK_STATUS(status, NT_STATUS_OK);
- if (!torture_smb2_session_setup(tctx, transport, mem_ctx, &session2)) {
+ if (!torture_smb2_session_setup(tctx, transport,
+ 0, /* previous_session_id */
+ mem_ctx, &session2))
+ {
torture_warning(tctx, "session setup failed.\n");
ret = false;
goto done;
diff --git a/source4/torture/smb2/util.c b/source4/torture/smb2/util.c
index 97a66783fc..403c1abadd 100644
--- a/source4/torture/smb2/util.c
+++ b/source4/torture/smb2/util.c
@@ -306,6 +306,7 @@ bool torture_smb2_tree_connect(struct torture_context *tctx,
*/
bool torture_smb2_session_setup(struct torture_context *tctx,
struct smb2_transport *transport,
+ uint64_t previous_session_id,
TALLOC_CTX *mem_ctx,
struct smb2_session **_session)
{
@@ -322,7 +323,7 @@ bool torture_smb2_session_setup(struct torture_context *tctx,
}
status = smb2_session_setup_spnego(session, credentials,
- 0 /* previous_session_id */);
+ previous_session_id);
if (!NT_STATUS_IS_OK(status)) {
printf("session setup failed: %s\n", nt_errstr(status));
talloc_free(session);