Revert "TODO make it possible to run smb2.session.bind1 test with -U% against IPC...
authorStefan Metzmacher <metze@samba.org>
Mon, 10 Feb 2020 13:40:03 +0000 (14:40 +0100)
committerStefan Metzmacher <metze@samba.org>
Mon, 10 Feb 2020 13:40:03 +0000 (14:40 +0100)
This reverts commit 173e6a5c289d3dcbf28cf73a61ade58e20f3b4e1.

libcli/smb/smbXcli_base.c
source4/torture/smb2/session.c

index e7460e19cc05c971a4f17769473f9d5ff27d171b..0115cbbec1854400e39ceb45161780b6b80d12b9 100644 (file)
@@ -6294,7 +6294,7 @@ NTSTATUS smb2cli_session_create_channel(TALLOC_CTX *mem_ctx,
        struct smbXcli_session *session2;
 
        if (!smb2_signing_key_valid(session1->smb2->signing_key)) {
-//             return NT_STATUS_INVALID_PARAMETER_MIX;
+               return NT_STATUS_INVALID_PARAMETER_MIX;
        }
 
        if (conn == NULL) {
index c66b23d1cbe985684b8337004eb53653ae72b46e..b330c7e41a23a80cce5a37a28c3bf4e1c0bfbdc1 100644 (file)
@@ -1742,7 +1742,7 @@ bool test_session_bind1(struct torture_context *tctx, struct smb2_tree *tree1)
        /* Add some random component to the file name. */
        snprintf(fname, sizeof(fname), "session_bind1_%s.dat",
                 generate_random_str(tctx, 8));
-if (0) {
+
        smb2_util_unlink(tree1, fname);
 
        smb2_oplock_create_share(&io1, fname,
@@ -1758,7 +1758,7 @@ if (0) {
        torture_assert_int_equal(tctx, io1.out.oplock_level,
                                        smb2_util_oplock_level("b"),
                                        "oplock_level incorrect");
-}
+
        status = smb2_connect(tctx,
                              host,
                              lpcfg_smb_ports(tctx->lp_ctx),
@@ -1791,7 +1791,6 @@ if (0) {
        torture_assert_ntstatus_ok_goto(tctx, status, ret, done,
                                        "smb2_session_setup_spnego failed");
 
-if (0) {
        /* use the 1st connection, 1st session */
        ZERO_STRUCT(qfinfo);
        qfinfo.generic.level = RAW_FILEINFO_POSITION_INFORMATION;
@@ -1809,12 +1808,12 @@ if (0) {
        status = smb2_getinfo_file(tree1, mem_ctx, &qfinfo);
        torture_assert_ntstatus_ok_goto(tctx, status, ret, done,
                                        "smb2_getinfo_file failed");
-}
+
        tree1->session = session1_1;
-//     status = smb2_util_close(tree1, *h1);
-//     torture_assert_ntstatus_ok_goto(tctx, status, ret, done,
-//                                     "smb2_util_close failed");
-//     h1 = NULL;
+       status = smb2_util_close(tree1, *h1);
+       torture_assert_ntstatus_ok_goto(tctx, status, ret, done,
+                                       "smb2_util_close failed");
+       h1 = NULL;
 
        /*
         * Now bind the 1st transport connection to the 2nd session
@@ -1832,10 +1831,9 @@ if (0) {
                                        "smb2_session_setup_spnego failed");
 
        tree2->session = session2_1;
-       //status = smb2_util_unlink(tree2, fname);
-       //torture_assert_ntstatus_ok_goto(tctx, status, ret, done,
-       //                              "smb2_util_unlink failed");
-
+       status = smb2_util_unlink(tree2, fname);
+       torture_assert_ntstatus_ok_goto(tctx, status, ret, done,
+                                       "smb2_util_unlink failed");
        ret = true;
 done:
        talloc_free(tree2);