]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:torture: use CLI_FULL_CONNECTION_DISABLE_SMB1 in run_oplock_cancel()
authorStefan Metzmacher <metze@samba.org>
Mon, 19 Jun 2017 08:00:32 +0000 (10:00 +0200)
committerStefan Metzmacher <metze@samba.org>
Thu, 22 Jun 2017 11:07:41 +0000 (13:07 +0200)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/torture/test_oplock_cancel.c

index aa4218a1126e42bff17dc39400deff394383f447..d856650fa23e0808459d4933e16778109bb1bafb 100644 (file)
@@ -113,15 +113,22 @@ bool run_oplock_cancel(int dummy)
        const char *fname = "oplock-cancel";
        uint16_t fnum1;
        NTSTATUS status;
+       /*
+        * Currently this test seems to work only
+        * with SMB2/3 and only against Samba.
+        *
+        * TODO: we should change our server
+        * to ignore cancel for SMB2 Create
+        * and behave like Windows.
+        */
+       int flags = CLI_FULL_CONNECTION_DISABLE_SMB1;
 
-       lp_set_cmdline("client max protocol", "smb3");
-
-       if (!torture_open_connection(&cli1, 0)) {
+       if (!torture_open_connection_flags(&cli1, 0, flags)) {
                return false;
        }
        cli1->use_oplocks = true;
 
-       if (!torture_open_connection(&cli2, 0)) {
+       if (!torture_open_connection_flags(&cli2, 0, flags)) {
                return false;
        }
        cli2->use_oplocks = true;