2c72bd779d51a125dcc49ce1a29dd8765319061f
[ambi/samba-autobuild/.git] / source4 / torture / smb2 / multichannel.c
1 /*
2  * Unix SMB/CIFS implementation.
3  *
4  * test SMB2 multichannel operations
5  *
6  * Copyright (C) Guenther Deschner, 2016
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 3 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20  */
21
22 #include "includes.h"
23 #include "libcli/smb2/smb2.h"
24 #include "libcli/smb2/smb2_calls.h"
25 #include "torture/torture.h"
26 #include "torture/util.h"
27 #include "torture/smb2/proto.h"
28 #include "libcli/security/security.h"
29 #include "librpc/gen_ndr/ndr_security.h"
30
31 #define CHECK_STATUS(status, correct) do { \
32         if (!NT_STATUS_EQUAL(status, correct)) { \
33                 torture_result(tctx, TORTURE_FAIL, \
34                         "(%s) Incorrect status %s - should be %s\n", \
35                          __location__, nt_errstr(status), nt_errstr(correct)); \
36                 return false; \
37         } } while (0)
38
39 static bool test_session_bind(struct torture_context *tctx,
40                               struct smb2_tree *tree)
41 {
42         /* TODO */
43
44         return true;
45 }
46
47 struct torture_suite *torture_smb2_multichannel_init(TALLOC_CTX *ctx)
48 {
49         struct torture_suite *suite = torture_suite_create(ctx, "multichannel");
50
51         torture_suite_add_1smb2_test(suite, "session-bind", test_session_bind);
52
53         suite->description = talloc_strdup(suite, "SMB2 Multichannel tests");
54
55         return suite;
56 }