TODO make it possible to run smb2.session.bind1 test with -U% against IPC$ (windows)
authorStefan Metzmacher <metze@samba.org>
Wed, 9 Sep 2015 14:19:56 +0000 (16:19 +0200)
committerGünther Deschner <gd@samba.org>
Mon, 19 Sep 2016 20:20:49 +0000 (22:20 +0200)
STATUS_INVALID_PARAMETER is returned

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

index 0a2473ef632d6d965ff58875546330e5378e9b6a..642c0eff6aab879c726a1aa83fd1e4fc45995d43 100644 (file)
@@ -5831,7 +5831,7 @@ NTSTATUS smb2cli_session_create_channel(TALLOC_CTX *mem_ctx,
        struct smbXcli_session *session2;
 
        if (session1->smb2->signing_key.length == 0) {
-               return NT_STATUS_INVALID_PARAMETER_MIX;
+//             return NT_STATUS_INVALID_PARAMETER_MIX;
        }
 
        if (conn == NULL) {
index 7bf11886fec8066040758d6af559625da3d6393a..33873eb29d589f29e194a473e4081b231ba3bdf8 100644 (file)
@@ -1198,7 +1198,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,
@@ -1214,7 +1214,7 @@ bool test_session_bind1(struct torture_context *tctx, struct smb2_tree *tree1)
        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),
@@ -1247,6 +1247,7 @@ bool test_session_bind1(struct torture_context *tctx, struct smb2_tree *tree1)
        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;
@@ -1264,12 +1265,12 @@ bool test_session_bind1(struct torture_context *tctx, struct smb2_tree *tree1)
        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
@@ -1287,9 +1288,10 @@ bool test_session_bind1(struct torture_context *tctx, struct smb2_tree *tree1)
                                        "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);