summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2013-09-25 01:25:49 +0200
committerStefan Metzmacher <metze@samba.org>2013-10-05 14:04:07 +0200
commit6c6643c36496f6ab691efaf818d0538e6f1b0de2 (patch)
tree7fe9c682edfaef5dc89f4b81bbf0340c8fe4e57c /source4
parenta31ea152036fb7750fd071da67e171d16a78474b (diff)
downloadsamba-6c6643c36496f6ab691efaf818d0538e6f1b0de2.tar.gz
samba-6c6643c36496f6ab691efaf818d0538e6f1b0de2.tar.bz2
samba-6c6643c36496f6ab691efaf818d0538e6f1b0de2.zip
s4:torture:smb2: fix durable-open lease tests to pass against windows.
Fix is: reconnect with same client-guid as on the first connection. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source4')
-rw-r--r--source4/torture/smb2/durable_open.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/source4/torture/smb2/durable_open.c b/source4/torture/smb2/durable_open.c
index f4822f6a11..3bc012edfa 100644
--- a/source4/torture/smb2/durable_open.c
+++ b/source4/torture/smb2/durable_open.c
@@ -1316,6 +1316,9 @@ static bool test_durable_open_lock_lease(struct torture_context *tctx,
bool ret = true;
uint64_t lease;
uint32_t caps;
+ struct smbcli_options options;
+
+ options = tree->session->transport->options;
caps = smb2cli_conn_server_capabilities(tree->session->transport->conn);
if (!(caps & SMB2_CAP_LEASING)) {
@@ -1367,7 +1370,7 @@ static bool test_durable_open_lock_lease(struct torture_context *tctx,
talloc_free(tree);
tree = NULL;
- if (!torture_smb2_connection(tctx, &tree)) {
+ if (!torture_smb2_connection_ext(tctx, 0, &options, &tree)) {
torture_warning(tctx, "couldn't reconnect, bailing\n");
ret = false;
goto done;
@@ -1416,6 +1419,9 @@ static bool test_durable_open_open2_lease(struct torture_context *tctx,
bool ret = true;
uint64_t lease;
uint32_t caps;
+ struct smbcli_options options;
+
+ options = tree1->session->transport->options;
caps = smb2cli_conn_server_capabilities(tree1->session->transport->conn);
if (!(caps & SMB2_CAP_LEASING)) {
@@ -1465,7 +1471,7 @@ static bool test_durable_open_open2_lease(struct torture_context *tctx,
CHECK_CREATED(&io1, CREATED, FILE_ATTRIBUTE_ARCHIVE);
/* Reconnect */
- if (!torture_smb2_connection(tctx, &tree1)) {
+ if (!torture_smb2_connection_ext(tctx, 0, &options, &tree1)) {
torture_warning(tctx, "couldn't reconnect, bailing\n");
ret = false;
goto done;