]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s4:torture: force signing in the smb2.session.bind1 test
authorStefan Metzmacher <metze@samba.org>
Fri, 7 Jun 2019 17:38:26 +0000 (19:38 +0200)
committerStefan Metzmacher <metze@samba.org>
Wed, 12 Jun 2019 12:42:26 +0000 (12:42 +0000)
This test is supposed to test which signing keys are used on
each of the channels, so it's important to require signing.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
source4/torture/smb2/session.c

index d3044e79fb8cb36d5c80b0d0cbc0b547f143f0bc..07c6faebb155c5cdc696012d1aeceae646e1ba73 100644 (file)
@@ -1717,6 +1717,7 @@ bool test_session_bind1(struct torture_context *tctx, struct smb2_tree *tree1)
        bool ret = false;
        struct smb2_tree *tree2 = NULL;
        struct smb2_transport *transport1 = tree1->session->transport;
+       struct smbcli_options options2;
        struct smb2_transport *transport2 = NULL;
        struct smb2_session *session1_1 = tree1->session;
        struct smb2_session *session1_2 = NULL;
@@ -1729,6 +1730,13 @@ bool test_session_bind1(struct torture_context *tctx, struct smb2_tree *tree1)
                torture_skip(tctx, "server doesn't support SMB2_CAP_MULTI_CHANNEL\n");
        }
 
+       /*
+        * We always want signing for this test!
+        */
+       smb2cli_tcon_should_sign(tree1->smbXcli, true);
+       options2 = transport1->options;
+       options2.signing = SMB_SIGNING_REQUIRED;
+
        /* Add some random component to the file name. */
        snprintf(fname, sizeof(fname), "session_bind1_%s.dat",
                 generate_random_str(tctx, 8));
@@ -1757,7 +1765,7 @@ bool test_session_bind1(struct torture_context *tctx, struct smb2_tree *tree1)
                              credentials,
                              &tree2,
                              tctx->ev,
-                             &transport1->options,
+                             &options2,
                              lpcfg_socket_options(tctx->lp_ctx),
                              lpcfg_gensec_settings(tctx, tctx->lp_ctx)
                              );