diff options
author | Ralph Boehme <slow@samba.org> | 2018-11-09 15:34:24 +0100 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2018-11-23 09:01:26 +0100 |
commit | b79e847e35145ad04b7582f64a3c6aeae36212d8 (patch) | |
tree | 6bf03dc2d53b3a2dff26adbcd0ffab487a0f05e5 /source4/torture/smb2 | |
parent | 288a79d997b30acbd611b17b024cec1cc33fba10 (diff) | |
download | samba-b79e847e35145ad04b7582f64a3c6aeae36212d8.tar.gz |
s4:torture/smb2/session: require a signed session setup reauth response
All existing tests using this function require signing, so currently
this passes. A subsequent commit adds a test where neither client nor
server require signing and that's where this trap will explode.
Bug: https://bugzilla.samba.org/show_bug.cgi?id=13661
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
(cherry picked from commit ffc424ee6bedc3c208acb4c0c83da836a12d6123)
Diffstat (limited to 'source4/torture/smb2')
-rw-r--r-- | source4/torture/smb2/session.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source4/torture/smb2/session.c b/source4/torture/smb2/session.c index 65cc53ba337..a088754ec00 100644 --- a/source4/torture/smb2/session.c +++ b/source4/torture/smb2/session.c @@ -1154,12 +1154,20 @@ static bool test_session_expire1i(struct torture_context *tctx, */ cli_credentials_invalidate_ccache(credentials, CRED_SPECIFIED); + if (!force_encryption) { + smb2cli_session_require_signed_response( + tree->session->smbXcli, true); + } + torture_comment(tctx, "reauth => OK\n"); status = smb2_session_setup_spnego(tree->session, credentials, 0 /* previous_session_id */); torture_assert_ntstatus_ok_goto(tctx, status, ret, done, "smb2_session_setup_spnego failed"); + + smb2cli_session_require_signed_response( + tree->session->smbXcli, false); } ZERO_STRUCT(qfinfo.access_information.out); |