04ea3e2febb7f1283e72b67a07163c0fe73f80d5
[kamenim/samba.git] / source4 / torture / libnet / utils.h
1 /*
2    Unix SMB/CIFS implementation.
3    Test suite for libnet calls.
4
5    Copyright (C) Rafal Szczesniak 2007
6
7    This program is free software; you can redistribute it and/or modify
8    it under the terms of the GNU General Public License as published by
9    the Free Software Foundation; either version 3 of the License, or
10    (at your option) any later version.
11
12    This program is distributed in the hope that it will be useful,
13    but WITHOUT ANY WARRANTY; without even the implied warranty of
14    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15    GNU General Public License for more details.
16
17    You should have received a copy of the GNU General Public License
18    along with this program.  If not, see <http://www.gnu.org/licenses/>.
19 */
20
21
22 bool test_opendomain(struct torture_context *tctx,
23                      struct dcerpc_binding_handle *b,
24                      TALLOC_CTX *mem_ctx,
25                      struct policy_handle *handle, struct lsa_String *domname,
26                      struct dom_sid2 *sid);
27
28 bool test_user_create(struct torture_context *tctx,
29                       struct dcerpc_binding_handle *b,
30                       TALLOC_CTX *mem_ctx,
31                       struct policy_handle *handle, const char *name,
32                       uint32_t *rid);
33
34 bool test_user_cleanup(struct torture_context *tctx,
35                        struct dcerpc_binding_handle *b,
36                        TALLOC_CTX *mem_ctx,
37                        struct policy_handle *domain_handle,
38                        const char *name);
39
40 bool test_group_create(struct torture_context *tctx,
41                        struct dcerpc_binding_handle *b,
42                        TALLOC_CTX *mem_ctx,
43                        struct policy_handle *handle, const char *name,
44                        uint32_t *rid);
45
46 bool test_group_cleanup(struct torture_context *tctx,
47                         struct dcerpc_binding_handle *b,
48                         TALLOC_CTX *mem_ctx,
49                         struct policy_handle *domain_handle,
50                         const char *name);
51
52 bool test_samr_close_handle(struct torture_context *tctx,
53                             struct dcerpc_binding_handle *b, TALLOC_CTX *mem_ctx,
54                             struct policy_handle *samr_handle);
55
56 void msg_handler(struct monitor_msg *m);