2 Unix SMB/CIFS implementation.
3 test suite for wkssvc rpc operations
5 Copyright (C) Andrew Tridgell 2003
6 Copyright (C) Günther Deschner 2007
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.
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.
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/>.
23 #include "torture/torture.h"
24 #include "librpc/gen_ndr/ndr_wkssvc_c.h"
25 #include "torture/rpc/torture_rpc.h"
26 #include "lib/cmdline/popt_common.h"
27 #include "param/param.h"
28 #include "../lib/crypto/crypto.h"
29 #include "libcli/auth/libcli_auth.h"
31 #define SMBTORTURE_MACHINE_NAME "smbtrt_name"
32 #define SMBTORTURE_ALTERNATE_NAME "smbtrt_altname"
33 #define SMBTORTURE_TRANSPORT_NAME "\\Device\\smbtrt_transport_name"
34 #define SMBTORTURE_USE_NAME "S:"
35 #define SMBTORTURE_MESSAGE "You are currently tortured by Samba"
37 static bool test_NetWkstaGetInfo(struct torture_context
*tctx
,
38 struct dcerpc_pipe
*p
)
41 struct wkssvc_NetWkstaGetInfo r
;
42 union wkssvc_NetWkstaInfo info
;
43 uint16_t levels
[] = {100, 101, 102, 502};
45 struct dcerpc_binding_handle
*b
= p
->binding_handle
;
47 r
.in
.server_name
= dcerpc_server_name(p
);
50 for (i
=0;i
<ARRAY_SIZE(levels
);i
++) {
51 r
.in
.level
= levels
[i
];
52 torture_comment(tctx
, "Testing NetWkstaGetInfo level %u\n",
54 status
= dcerpc_wkssvc_NetWkstaGetInfo_r(b
, tctx
, &r
);
55 torture_assert_ntstatus_ok(tctx
, status
,
56 talloc_asprintf(tctx
, "NetWkstaGetInfo level %u failed",
58 torture_assert_werr_ok(tctx
, r
.out
.result
,
59 talloc_asprintf(tctx
, "NetWkstaGetInfo level %u failed",
66 static bool test_NetWkstaTransportEnum(struct torture_context
*tctx
,
67 struct dcerpc_pipe
*p
)
70 struct wkssvc_NetWkstaTransportEnum r
;
71 uint32_t resume_handle
= 0;
72 struct wkssvc_NetWkstaTransportInfo info
;
73 union wkssvc_NetWkstaTransportCtr ctr
;
74 struct wkssvc_NetWkstaTransportCtr0 ctr0
;
75 uint32_t total_entries
= 0;
76 struct dcerpc_binding_handle
*b
= p
->binding_handle
;
84 r
.in
.server_name
= dcerpc_server_name(p
);
86 r
.in
.max_buffer
= (uint32_t)-1;
87 r
.in
.resume_handle
= &resume_handle
;
88 r
.out
.total_entries
= &total_entries
;
90 r
.out
.resume_handle
= &resume_handle
;
92 torture_comment(tctx
, "Testing NetWkstaTransportEnum level 0\n");
94 status
= dcerpc_wkssvc_NetWkstaTransportEnum_r(b
, tctx
, &r
);
95 torture_assert_ntstatus_ok(tctx
, status
,
96 "NetWkstaTransportEnum failed");
97 torture_assert_werr_ok(tctx
, r
.out
.result
, talloc_asprintf(tctx
,
98 "NetWkstaTransportEnum level %u failed",
104 static bool test_NetrWkstaTransportAdd(struct torture_context
*tctx
,
105 struct dcerpc_pipe
*p
)
108 struct wkssvc_NetrWkstaTransportAdd r
;
109 struct wkssvc_NetWkstaTransportInfo0 info0
;
110 uint32_t parm_err
= 0;
111 struct dcerpc_binding_handle
*b
= p
->binding_handle
;
115 info0
.quality_of_service
= 0xffff;
117 info0
.name
= SMBTORTURE_TRANSPORT_NAME
;
118 info0
.address
= "000000000000";
119 info0
.wan_link
= 0x400;
121 r
.in
.server_name
= dcerpc_server_name(p
);
124 r
.in
.parm_err
= r
.out
.parm_err
= &parm_err
;
126 torture_comment(tctx
, "Testing NetrWkstaTransportAdd level 0\n");
128 status
= dcerpc_wkssvc_NetrWkstaTransportAdd_r(b
, tctx
, &r
);
129 torture_assert_ntstatus_ok(tctx
, status
,
130 "NetrWkstaTransportAdd failed");
131 torture_assert_werr_equal(tctx
, r
.out
.result
,
133 "NetrWkstaTransportAdd level 0 failed");
138 static bool test_NetrWkstaTransportDel(struct torture_context
*tctx
,
139 struct dcerpc_pipe
*p
)
142 struct wkssvc_NetrWkstaTransportDel r
;
143 struct dcerpc_binding_handle
*b
= p
->binding_handle
;
145 r
.in
.server_name
= dcerpc_server_name(p
);
146 r
.in
.transport_name
= SMBTORTURE_TRANSPORT_NAME
;
149 torture_comment(tctx
, "Testing NetrWkstaTransportDel\n");
151 status
= dcerpc_wkssvc_NetrWkstaTransportDel_r(b
, tctx
, &r
);
152 torture_assert_ntstatus_ok(tctx
, status
,
153 "NetrWkstaTransportDel failed");
154 torture_assert_werr_ok(tctx
, r
.out
.result
,
155 "NetrWkstaTransportDel");
160 static bool test_NetWkstaEnumUsers(struct torture_context
*tctx
,
161 struct dcerpc_pipe
*p
)
164 struct wkssvc_NetWkstaEnumUsers r
;
166 uint32_t entries_read
= 0;
167 struct wkssvc_NetWkstaEnumUsersInfo info
;
168 struct wkssvc_NetWkstaEnumUsersCtr0
*user0
;
169 struct wkssvc_NetWkstaEnumUsersCtr1
*user1
;
170 uint32_t levels
[] = { 0, 1 };
172 struct dcerpc_binding_handle
*b
= p
->binding_handle
;
174 for (i
=0; i
<ARRAY_SIZE(levels
); i
++) {
178 info
.level
= levels
[i
];
179 switch (info
.level
) {
181 user0
= talloc_zero(tctx
,
182 struct wkssvc_NetWkstaEnumUsersCtr0
);
183 info
.ctr
.user0
= user0
;
186 user1
= talloc_zero(tctx
,
187 struct wkssvc_NetWkstaEnumUsersCtr1
);
188 info
.ctr
.user1
= user1
;
194 r
.in
.server_name
= dcerpc_server_name(p
);
195 r
.in
.prefmaxlen
= (uint32_t)-1;
196 r
.in
.info
= r
.out
.info
= &info
;
197 r
.in
.resume_handle
= r
.out
.resume_handle
= &handle
;
199 r
.out
.entries_read
= &entries_read
;
201 torture_comment(tctx
, "Testing NetWkstaEnumUsers level %u\n",
204 status
= dcerpc_wkssvc_NetWkstaEnumUsers_r(b
, tctx
, &r
);
205 torture_assert_ntstatus_ok(tctx
, status
,
206 "NetWkstaEnumUsers failed");
207 torture_assert_werr_ok(tctx
, r
.out
.result
,
208 "NetWkstaEnumUsers failed");
214 static bool test_NetrWkstaUserGetInfo(struct torture_context
*tctx
,
215 struct dcerpc_pipe
*p
)
218 struct wkssvc_NetrWkstaUserGetInfo r
;
219 union wkssvc_NetrWkstaUserInfo info
;
220 const char *dom
= lpcfg_workgroup(tctx
->lp_ctx
);
221 struct cli_credentials
*creds
= cmdline_credentials
;
222 const char *user
= cli_credentials_get_username(creds
);
224 struct dcerpc_binding_handle
*b
= p
->binding_handle
;
231 { NULL
, 0, WERR_NO_SUCH_LOGON_SESSION
},
232 { NULL
, 1, WERR_NO_SUCH_LOGON_SESSION
},
233 { NULL
, 1101, WERR_OK
},
234 { dom
, 0, WERR_INVALID_PARAM
},
235 { dom
, 1, WERR_INVALID_PARAM
},
236 { dom
, 1101, WERR_INVALID_PARAM
},
237 { user
, 0, WERR_INVALID_PARAM
},
238 { user
, 1, WERR_INVALID_PARAM
},
239 { user
, 1101, WERR_INVALID_PARAM
},
242 for (i
=0; i
<ARRAY_SIZE(tests
); i
++) {
243 r
.in
.unknown
= tests
[i
].unknown
;
244 r
.in
.level
= tests
[i
].level
;
247 torture_comment(tctx
, "Testing NetrWkstaUserGetInfo level %u\n",
250 status
= dcerpc_wkssvc_NetrWkstaUserGetInfo_r(b
, tctx
, &r
);
251 torture_assert_ntstatus_ok(tctx
, status
,
252 "NetrWkstaUserGetInfo failed");
253 torture_assert_werr_equal(tctx
, r
.out
.result
,
255 "NetrWkstaUserGetInfo failed");
261 static bool test_NetrUseEnum(struct torture_context
*tctx
,
262 struct dcerpc_pipe
*p
)
265 struct wkssvc_NetrUseEnum r
;
267 uint32_t entries_read
= 0;
268 struct wkssvc_NetrUseEnumInfo info
;
269 struct wkssvc_NetrUseEnumCtr0
*use0
;
270 struct wkssvc_NetrUseEnumCtr1
*use1
;
271 struct wkssvc_NetrUseEnumCtr2
*use2
;
272 uint32_t levels
[] = { 0, 1, 2 };
274 struct dcerpc_binding_handle
*b
= p
->binding_handle
;
276 for (i
=0; i
<ARRAY_SIZE(levels
); i
++) {
280 info
.level
= levels
[i
];
281 switch (info
.level
) {
283 use0
= talloc_zero(tctx
, struct wkssvc_NetrUseEnumCtr0
);
284 info
.ctr
.ctr0
= use0
;
287 use1
= talloc_zero(tctx
, struct wkssvc_NetrUseEnumCtr1
);
288 info
.ctr
.ctr1
= use1
;
291 use2
= talloc_zero(tctx
, struct wkssvc_NetrUseEnumCtr2
);
292 info
.ctr
.ctr2
= use2
;
298 r
.in
.server_name
= talloc_asprintf(tctx
, "\\\\%s", dcerpc_server_name(p
));
299 r
.in
.prefmaxlen
= (uint32_t)-1;
300 r
.in
.info
= r
.out
.info
= &info
;
301 r
.in
.resume_handle
= r
.out
.resume_handle
= &handle
;
303 r
.out
.entries_read
= &entries_read
;
305 torture_comment(tctx
, "Testing NetrUseEnum level %u\n",
308 status
= dcerpc_wkssvc_NetrUseEnum_r(b
, tctx
, &r
);
309 torture_assert_ntstatus_ok(tctx
, status
,
310 "NetrUseEnum failed");
311 torture_assert_werr_ok(tctx
, r
.out
.result
,
312 "NetrUseEnum failed");
318 static bool test_NetrUseAdd(struct torture_context
*tctx
,
319 struct dcerpc_pipe
*p
)
322 struct wkssvc_NetrUseAdd r
;
323 struct wkssvc_NetrUseInfo0 info0
;
324 struct wkssvc_NetrUseInfo1 info1
;
325 union wkssvc_NetrUseGetInfoCtr
*ctr
;
326 uint32_t parm_err
= 0;
327 struct dcerpc_binding_handle
*b
= p
->binding_handle
;
329 ctr
= talloc(tctx
, union wkssvc_NetrUseGetInfoCtr
);
333 info0
.local
= SMBTORTURE_USE_NAME
;
334 info0
.remote
= "\\\\localhost\\c$";
338 r
.in
.server_name
= talloc_asprintf(tctx
, "\\\\%s", dcerpc_server_name(p
));
341 r
.in
.parm_err
= r
.out
.parm_err
= &parm_err
;
343 torture_comment(tctx
, "Testing NetrUseAdd level %u\n",
346 status
= dcerpc_wkssvc_NetrUseAdd_r(b
, tctx
, &r
);
347 torture_assert_ntstatus_ok(tctx
, status
,
348 "NetrUseAdd failed");
349 torture_assert_werr_equal(tctx
, r
.out
.result
, WERR_UNKNOWN_LEVEL
,
350 "NetrUseAdd failed");
355 info1
.local
= SMBTORTURE_USE_NAME
;
356 info1
.remote
= "\\\\localhost\\sysvol";
357 info1
.password
= NULL
;
361 r
.in
.server_name
= talloc_asprintf(tctx
, "\\\\%s", dcerpc_server_name(p
));
364 r
.in
.parm_err
= r
.out
.parm_err
= &parm_err
;
366 torture_comment(tctx
, "Testing NetrUseAdd level %u\n",
369 status
= dcerpc_wkssvc_NetrUseAdd_r(b
, tctx
, &r
);
370 torture_assert_ntstatus_ok(tctx
, status
,
371 "NetrUseAdd failed");
372 torture_assert_werr_ok(tctx
, r
.out
.result
,
373 "NetrUseAdd failed");
378 static bool test_NetrUseDel(struct torture_context
*tctx
,
379 struct dcerpc_pipe
*p
)
382 struct wkssvc_NetrUseDel r
;
383 struct dcerpc_binding_handle
*b
= p
->binding_handle
;
385 r
.in
.server_name
= talloc_asprintf(tctx
, "\\\\%s", dcerpc_server_name(p
));
386 r
.in
.use_name
= SMBTORTURE_USE_NAME
;
389 torture_comment(tctx
, "Testing NetrUseDel\n");
391 status
= dcerpc_wkssvc_NetrUseDel_r(b
, tctx
, &r
);
392 torture_assert_ntstatus_ok(tctx
, status
,
393 "NetrUseDel failed");
394 torture_assert_werr_ok(tctx
, r
.out
.result
,
395 "NetrUseDel failed");
399 static bool test_NetrUseGetInfo_level(struct torture_context
*tctx
,
400 struct dcerpc_pipe
*p
,
401 const char *use_name
,
406 struct wkssvc_NetrUseGetInfo r
;
407 union wkssvc_NetrUseGetInfoCtr ctr
;
408 struct dcerpc_binding_handle
*b
= p
->binding_handle
;
412 r
.in
.server_name
= talloc_asprintf(tctx
, "\\\\%s", dcerpc_server_name(p
));
413 r
.in
.use_name
= use_name
;
416 status
= dcerpc_wkssvc_NetrUseGetInfo_r(b
, tctx
, &r
);
418 torture_assert_ntstatus_ok(tctx
, status
,
419 "NetrUseGetInfo failed");
420 torture_assert_werr_equal(tctx
, r
.out
.result
, werr
,
421 "NetrUseGetInfo failed");
425 static bool test_NetrUseGetInfo(struct torture_context
*tctx
,
426 struct dcerpc_pipe
*p
)
429 struct wkssvc_NetrUseEnum r
;
431 uint32_t entries_read
= 0;
432 struct wkssvc_NetrUseEnumInfo info
;
433 struct wkssvc_NetrUseEnumCtr0
*use0
;
434 uint32_t levels
[] = { 0, 1, 2 };
435 const char *use_name
= NULL
;
437 struct dcerpc_binding_handle
*b
= p
->binding_handle
;
442 use0
= talloc_zero(tctx
, struct wkssvc_NetrUseEnumCtr0
);
443 info
.ctr
.ctr0
= use0
;
445 r
.in
.server_name
= talloc_asprintf(tctx
, "\\\\%s", dcerpc_server_name(p
));
446 r
.in
.prefmaxlen
= (uint32_t)-1;
447 r
.in
.info
= r
.out
.info
= &info
;
448 r
.in
.resume_handle
= r
.out
.resume_handle
= &handle
;
449 r
.out
.entries_read
= &entries_read
;
451 status
= dcerpc_wkssvc_NetrUseEnum_r(b
, tctx
, &r
);
452 torture_assert_ntstatus_ok(tctx
, status
,
453 "NetrUseEnum failed");
454 torture_assert_werr_ok(tctx
, r
.out
.result
,
455 "NetrUseEnum failed");
457 for (k
=0; k
< r
.out
.info
->ctr
.ctr0
->count
; k
++) {
459 use_name
= r
.out
.info
->ctr
.ctr0
->array
[k
].local
;
461 for (i
=0; i
<ARRAY_SIZE(levels
); i
++) {
463 if (!test_NetrUseGetInfo_level(tctx
, p
, use_name
,
467 if (levels
[i
] != 0) {
473 use_name
= r
.out
.info
->ctr
.ctr0
->array
[k
].remote
;
475 for (i
=0; i
<ARRAY_SIZE(levels
); i
++) {
477 if (!test_NetrUseGetInfo_level(tctx
, p
, use_name
,
481 if (levels
[i
] != 0) {
491 static bool test_NetrLogonDomainNameAdd(struct torture_context
*tctx
,
492 struct dcerpc_pipe
*p
)
495 struct wkssvc_NetrLogonDomainNameAdd r
;
496 struct dcerpc_binding_handle
*b
= p
->binding_handle
;
498 r
.in
.domain_name
= lpcfg_workgroup(tctx
->lp_ctx
);
500 torture_comment(tctx
, "Testing NetrLogonDomainNameAdd\n");
502 status
= dcerpc_wkssvc_NetrLogonDomainNameAdd_r(b
, tctx
, &r
);
503 torture_assert_ntstatus_ok(tctx
, status
,
504 "NetrLogonDomainNameAdd failed");
505 torture_assert_werr_equal(tctx
, r
.out
.result
, WERR_NOT_SUPPORTED
,
506 "NetrLogonDomainNameAdd failed");
510 static bool test_NetrLogonDomainNameDel(struct torture_context
*tctx
,
511 struct dcerpc_pipe
*p
)
514 struct wkssvc_NetrLogonDomainNameDel r
;
515 struct dcerpc_binding_handle
*b
= p
->binding_handle
;
517 r
.in
.domain_name
= lpcfg_workgroup(tctx
->lp_ctx
);
519 torture_comment(tctx
, "Testing NetrLogonDomainNameDel\n");
521 status
= dcerpc_wkssvc_NetrLogonDomainNameDel_r(b
, tctx
, &r
);
522 torture_assert_ntstatus_ok(tctx
, status
,
523 "NetrLogonDomainNameDel failed");
524 torture_assert_werr_equal(tctx
, r
.out
.result
, WERR_NOT_SUPPORTED
,
525 "NetrLogonDomainNameDel failed");
529 static bool test_NetrEnumerateComputerNames_level(struct torture_context
*tctx
,
530 struct dcerpc_pipe
*p
,
536 struct wkssvc_NetrEnumerateComputerNames r
;
537 struct wkssvc_ComputerNamesCtr
*ctr
;
539 struct dcerpc_binding_handle
*b
= p
->binding_handle
;
541 ctr
= talloc_zero(tctx
, struct wkssvc_ComputerNamesCtr
);
543 r
.in
.server_name
= dcerpc_server_name(p
);
544 r
.in
.name_type
= level
;
548 torture_comment(tctx
, "Testing NetrEnumerateComputerNames level %u\n",
551 status
= dcerpc_wkssvc_NetrEnumerateComputerNames_r(b
, tctx
, &r
);
552 torture_assert_ntstatus_ok(tctx
, status
,
553 "NetrEnumerateComputerNames failed");
554 torture_assert_werr_ok(tctx
, r
.out
.result
,
555 "NetrEnumerateComputerNames failed");
557 if ((level
== NetPrimaryComputerName
) && ctr
->count
!= 1) {
558 torture_comment(tctx
,
559 "NetrEnumerateComputerNames did not return one "
560 "name but %u\n", ctr
->count
);
564 if (names
&& num_names
) {
567 for (i
=0; i
<ctr
->count
; i
++) {
568 if (!add_string_to_array(tctx
,
569 ctr
->computer_name
[i
].string
,
581 static bool test_NetrEnumerateComputerNames(struct torture_context
*tctx
,
582 struct dcerpc_pipe
*p
)
584 uint16_t levels
[] = {0,1,2};
587 for (i
=0; i
<ARRAY_SIZE(levels
); i
++) {
589 if (!test_NetrEnumerateComputerNames_level(tctx
,
601 static bool test_NetrValidateName(struct torture_context
*tctx
,
602 struct dcerpc_pipe
*p
)
605 struct wkssvc_NetrValidateName r
;
606 uint16_t levels
[] = {0,1,2,3,4,5};
608 struct dcerpc_binding_handle
*b
= p
->binding_handle
;
610 for (i
=0; i
<ARRAY_SIZE(levels
); i
++) {
612 r
.in
.server_name
= talloc_asprintf(tctx
, "\\\\%s", dcerpc_server_name(p
));
613 r
.in
.name
= lpcfg_workgroup(tctx
->lp_ctx
);
615 r
.in
.Password
= NULL
;
616 r
.in
.name_type
= levels
[i
];
618 torture_comment(tctx
, "Testing NetrValidateName level %u\n",
621 status
= dcerpc_wkssvc_NetrValidateName_r(b
, tctx
, &r
);
622 torture_assert_ntstatus_ok(tctx
, status
,
623 "NetrValidateName failed");
624 torture_assert_werr_equal(tctx
, r
.out
.result
,
626 "NetrValidateName failed");
632 static bool test_NetrValidateName2(struct torture_context
*tctx
,
633 struct dcerpc_pipe
*p
)
636 struct wkssvc_NetrValidateName2 r
;
637 uint16_t levels
[] = {0,1,2,3,4,5};
639 struct dcerpc_binding_handle
*b
= p
->binding_handle
;
641 for (i
=0; i
<ARRAY_SIZE(levels
); i
++) {
643 r
.in
.server_name
= talloc_asprintf(tctx
, "\\\\%s", dcerpc_server_name(p
));
644 r
.in
.name
= lpcfg_workgroup(tctx
->lp_ctx
);
646 r
.in
.EncryptedPassword
= NULL
;
647 r
.in
.name_type
= levels
[i
];
649 torture_comment(tctx
, "Testing NetrValidateName2 level %u\n",
652 status
= dcerpc_wkssvc_NetrValidateName2_r(b
, tctx
, &r
);
653 torture_assert_ntstatus_ok(tctx
, status
,
654 "NetrValidateName2 failed");
655 torture_assert_werr_equal(tctx
, r
.out
.result
,
656 WERR_RPC_E_REMOTE_DISABLED
,
657 "NetrValidateName2 failed");
663 static bool test_NetrAddAlternateComputerName(struct torture_context
*tctx
,
664 struct dcerpc_pipe
*p
)
667 struct wkssvc_NetrAddAlternateComputerName r
;
668 const char **names
= NULL
;
671 struct dcerpc_binding_handle
*b
= p
->binding_handle
;
673 r
.in
.server_name
= dcerpc_server_name(p
);
674 r
.in
.NewAlternateMachineName
= SMBTORTURE_ALTERNATE_NAME
;
676 r
.in
.EncryptedPassword
= NULL
;
679 torture_comment(tctx
, "Testing NetrAddAlternateComputerName\n");
681 status
= dcerpc_wkssvc_NetrAddAlternateComputerName_r(b
, tctx
, &r
);
682 torture_assert_ntstatus_ok(tctx
, status
,
683 "NetrAddAlternateComputerName failed");
684 torture_assert_werr_ok(tctx
, r
.out
.result
,
685 "NetrAddAlternateComputerName failed");
687 if (!test_NetrEnumerateComputerNames_level(tctx
, p
,
688 NetAlternateComputerNames
,
694 for (i
=0; i
<num_names
; i
++) {
695 if (strequal(names
[i
], SMBTORTURE_ALTERNATE_NAME
)) {
700 torture_comment(tctx
, "new alternate name not set\n");
705 static bool test_NetrRemoveAlternateComputerName(struct torture_context
*tctx
,
706 struct dcerpc_pipe
*p
)
709 struct wkssvc_NetrRemoveAlternateComputerName r
;
710 const char **names
= NULL
;
713 struct dcerpc_binding_handle
*b
= p
->binding_handle
;
715 r
.in
.server_name
= dcerpc_server_name(p
);
716 r
.in
.AlternateMachineNameToRemove
= SMBTORTURE_ALTERNATE_NAME
;
718 r
.in
.EncryptedPassword
= NULL
;
721 torture_comment(tctx
, "Testing NetrRemoveAlternateComputerName\n");
723 status
= dcerpc_wkssvc_NetrRemoveAlternateComputerName_r(b
, tctx
, &r
);
724 torture_assert_ntstatus_ok(tctx
, status
,
725 "NetrRemoveAlternateComputerName failed");
726 torture_assert_werr_ok(tctx
, r
.out
.result
,
727 "NetrRemoveAlternateComputerName failed");
729 if (!test_NetrEnumerateComputerNames_level(tctx
, p
,
730 NetAlternateComputerNames
,
736 for (i
=0; i
<num_names
; i
++) {
737 if (strequal(names
[i
], SMBTORTURE_ALTERNATE_NAME
)) {
745 static bool test_NetrSetPrimaryComputername_name(struct torture_context
*tctx
,
746 struct dcerpc_pipe
*p
,
750 struct wkssvc_NetrSetPrimaryComputername r
;
751 struct dcerpc_binding_handle
*b
= p
->binding_handle
;
753 r
.in
.server_name
= dcerpc_server_name(p
);
754 r
.in
.primary_name
= name
;
756 r
.in
.EncryptedPassword
= NULL
;
759 status
= dcerpc_wkssvc_NetrSetPrimaryComputername_r(b
, tctx
, &r
);
760 torture_assert_ntstatus_ok(tctx
, status
,
761 "NetrSetPrimaryComputername failed");
762 torture_assert_werr_ok(tctx
, r
.out
.result
,
763 "NetrSetPrimaryComputername failed");
768 static bool test_NetrSetPrimaryComputername(struct torture_context
*tctx
,
769 struct dcerpc_pipe
*p
)
775 set new primary (alternate)
777 later: check if del is possible
778 set primary back to origin
783 const char **names_o
= NULL
, **names
= NULL
;
784 int num_names_o
= 0, num_names
= 0;
786 torture_comment(tctx
, "Testing NetrSetPrimaryComputername\n");
788 if (!test_NetrAddAlternateComputerName(tctx
, p
)) {
792 if (!test_NetrEnumerateComputerNames_level(tctx
, p
,
793 NetPrimaryComputerName
,
794 &names_o
, &num_names_o
))
799 if (num_names_o
!= 1) {
803 if (!test_NetrSetPrimaryComputername_name(tctx
, p
,
804 SMBTORTURE_ALTERNATE_NAME
))
809 if (!test_NetrEnumerateComputerNames_level(tctx
, p
,
810 NetPrimaryComputerName
,
816 if (num_names
!= 1) {
820 if (!strequal(names
[0], SMBTORTURE_ALTERNATE_NAME
)) {
821 torture_comment(tctx
,
822 "name mismatch (%s != %s) after NetrSetPrimaryComputername!\n",
823 names
[0], SMBTORTURE_ALTERNATE_NAME
);
827 if (!test_NetrSetPrimaryComputername_name(tctx
, p
,
833 if (!test_NetrRemoveAlternateComputerName(tctx
, p
)) {
841 static bool test_NetrRenameMachineInDomain(struct torture_context
*tctx
,
842 struct dcerpc_pipe
*p
)
845 struct wkssvc_NetrRenameMachineInDomain r
;
846 struct dcerpc_binding_handle
*b
= p
->binding_handle
;
848 r
.in
.server_name
= dcerpc_server_name(p
);
849 r
.in
.NewMachineName
= SMBTORTURE_MACHINE_NAME
;
851 r
.in
.password
= NULL
;
852 r
.in
.RenameOptions
= 0;
854 torture_comment(tctx
, "Testing NetrRenameMachineInDomain\n");
856 status
= dcerpc_wkssvc_NetrRenameMachineInDomain_r(b
, tctx
, &r
);
857 torture_assert_ntstatus_ok(tctx
, status
,
858 "NetrRenameMachineInDomain failed");
859 torture_assert_werr_equal(tctx
, r
.out
.result
, WERR_NOT_SUPPORTED
,
860 "NetrRenameMachineInDomain failed");
864 static bool test_NetrRenameMachineInDomain2_name(struct torture_context
*tctx
,
865 struct dcerpc_pipe
*p
,
866 const char *new_name
)
869 struct wkssvc_NetrRenameMachineInDomain2 r
;
870 struct dcerpc_binding_handle
*b
= p
->binding_handle
;
872 r
.in
.server_name
= dcerpc_server_name(p
);
873 r
.in
.NewMachineName
= new_name
;
875 r
.in
.EncryptedPassword
= NULL
;
876 r
.in
.RenameOptions
= 0;
878 status
= dcerpc_wkssvc_NetrRenameMachineInDomain2_r(b
, tctx
, &r
);
879 torture_assert_ntstatus_ok(tctx
, status
,
880 "NetrRenameMachineInDomain2 failed");
881 torture_assert_werr_ok(tctx
, r
.out
.result
,
882 "NetrRenameMachineInDomain2 failed");
886 static bool test_NetrRenameMachineInDomain2(struct torture_context
*tctx
,
887 struct dcerpc_pipe
*p
)
889 const char **names_o
= NULL
, **names
= NULL
;
890 int num_names_o
= 0, num_names
= 0;
892 torture_comment(tctx
, "Testing NetrRenameMachineInDomain2\n");
894 if (!test_NetrEnumerateComputerNames_level(tctx
, p
,
895 NetPrimaryComputerName
,
896 &names_o
, &num_names_o
))
901 if (num_names_o
!= 1) {
905 if (!test_NetrRenameMachineInDomain2_name(tctx
, p
,
906 SMBTORTURE_MACHINE_NAME
))
911 if (!test_NetrEnumerateComputerNames_level(tctx
, p
,
912 NetPrimaryComputerName
,
918 if (num_names
!= 1) {
922 if (strequal(names
[0], names_o
[0])) {
923 test_NetrRenameMachineInDomain2_name(tctx
, p
, names_o
[0]);
927 if (!strequal(names
[0], SMBTORTURE_MACHINE_NAME
)) {
928 test_NetrRenameMachineInDomain2_name(tctx
, p
, names_o
[0]);
932 if (!test_NetrRenameMachineInDomain2_name(tctx
, p
, names_o
[0]))
937 if (!test_NetrEnumerateComputerNames_level(tctx
, p
,
938 NetPrimaryComputerName
,
944 if (num_names
!= 1) {
948 if (!strequal(names
[0], names_o
[0])) {
955 static bool test_NetrWorkstationStatisticsGet(struct torture_context
*tctx
,
956 struct dcerpc_pipe
*p
)
959 struct wkssvc_NetrWorkstationStatisticsGet r
;
960 struct wkssvc_NetrWorkstationStatistics
*info
;
961 struct dcerpc_binding_handle
*b
= p
->binding_handle
;
965 info
= talloc_zero(tctx
, struct wkssvc_NetrWorkstationStatistics
);
967 r
.in
.server_name
= dcerpc_server_name(p
);
970 torture_comment(tctx
, "Testing NetrWorkstationStatisticsGet\n");
972 status
= dcerpc_wkssvc_NetrWorkstationStatisticsGet_r(b
, tctx
, &r
);
973 torture_assert_ntstatus_ok(tctx
, status
,
974 "NetrWorkstationStatisticsGet failed");
975 torture_assert_werr_ok(tctx
, r
.out
.result
,
976 "NetrWorkstationStatisticsGet failed");
980 /* only succeeds as long as the local messenger service is running - Guenther */
982 static bool test_NetrMessageBufferSend(struct torture_context
*tctx
,
983 struct dcerpc_pipe
*p
)
986 struct wkssvc_NetrMessageBufferSend r
;
987 const char *message
= SMBTORTURE_MESSAGE
;
990 struct dcerpc_binding_handle
*b
= p
->binding_handle
;
992 if (!push_ucs2_talloc(tctx
, &msg
, message
, &size
)) {
996 r
.in
.server_name
= dcerpc_server_name(p
);
997 r
.in
.message_name
= dcerpc_server_name(p
);
998 r
.in
.message_sender_name
= dcerpc_server_name(p
);
999 r
.in
.message_buffer
= (uint8_t *)msg
;
1000 r
.in
.message_size
= size
;
1002 torture_comment(tctx
, "Testing NetrMessageBufferSend\n");
1004 status
= dcerpc_wkssvc_NetrMessageBufferSend_r(b
, tctx
, &r
);
1005 torture_assert_ntstatus_ok(tctx
, status
,
1006 "NetrMessageBufferSend failed");
1007 torture_assert_werr_ok(tctx
, r
.out
.result
,
1008 "NetrMessageBufferSend failed");
1012 static bool test_NetrGetJoinInformation(struct torture_context
*tctx
,
1013 struct dcerpc_pipe
*p
)
1016 struct wkssvc_NetrGetJoinInformation r
;
1017 enum wkssvc_NetJoinStatus join_status
;
1018 const char *name_buffer
= "";
1019 struct dcerpc_binding_handle
*b
= p
->binding_handle
;
1021 r
.in
.server_name
= dcerpc_server_name(p
);
1022 r
.in
.name_buffer
= r
.out
.name_buffer
= &name_buffer
;
1023 r
.out
.name_type
= &join_status
;
1025 torture_comment(tctx
, "Testing NetrGetJoinInformation\n");
1027 status
= dcerpc_wkssvc_NetrGetJoinInformation_r(b
, tctx
, &r
);
1028 torture_assert_ntstatus_ok(tctx
, status
,
1029 "NetrGetJoinInformation failed");
1030 torture_assert_werr_ok(tctx
, r
.out
.result
,
1031 "NetrGetJoinInformation failed");
1035 static bool test_GetJoinInformation(struct torture_context
*tctx
,
1036 struct dcerpc_pipe
*p
,
1037 enum wkssvc_NetJoinStatus
*join_status_p
,
1041 struct wkssvc_NetrGetJoinInformation r
;
1042 enum wkssvc_NetJoinStatus join_status
;
1043 const char *name_buffer
= "";
1044 struct dcerpc_binding_handle
*b
= p
->binding_handle
;
1046 r
.in
.server_name
= dcerpc_server_name(p
);
1047 r
.in
.name_buffer
= r
.out
.name_buffer
= &name_buffer
;
1048 r
.out
.name_type
= &join_status
;
1050 status
= dcerpc_wkssvc_NetrGetJoinInformation_r(b
, tctx
, &r
);
1051 torture_assert_ntstatus_ok(tctx
, status
,
1052 "NetrGetJoinInformation failed");
1053 torture_assert_werr_ok(tctx
, r
.out
.result
,
1054 "NetrGetJoinInformation failed");
1056 if (join_status_p
) {
1057 *join_status_p
= join_status
;
1061 *name
= talloc_strdup(tctx
, name_buffer
);
1068 static bool test_NetrGetJoinableOus(struct torture_context
*tctx
,
1069 struct dcerpc_pipe
*p
)
1072 struct wkssvc_NetrGetJoinableOus r
;
1073 uint32_t num_ous
= 0;
1074 const char **ous
= NULL
;
1075 struct dcerpc_binding_handle
*b
= p
->binding_handle
;
1077 r
.in
.server_name
= dcerpc_server_name(p
);
1078 r
.in
.domain_name
= lpcfg_workgroup(tctx
->lp_ctx
);
1079 r
.in
.Account
= NULL
;
1080 r
.in
.unknown
= NULL
;
1081 r
.in
.num_ous
= r
.out
.num_ous
= &num_ous
;
1084 torture_comment(tctx
, "Testing NetrGetJoinableOus\n");
1086 status
= dcerpc_wkssvc_NetrGetJoinableOus_r(b
, tctx
, &r
);
1087 torture_assert_ntstatus_ok(tctx
, status
, "NetrGetJoinableOus failed");
1088 torture_assert_werr_equal(tctx
, r
.out
.result
,
1090 "NetrGetJoinableOus failed");
1095 static bool test_NetrGetJoinableOus2(struct torture_context
*tctx
,
1096 struct dcerpc_pipe
*p
)
1099 struct wkssvc_NetrGetJoinableOus2 r
;
1100 uint32_t num_ous
= 0;
1101 const char **ous
= NULL
;
1102 struct dcerpc_binding_handle
*b
= p
->binding_handle
;
1104 r
.in
.server_name
= dcerpc_server_name(p
);
1105 r
.in
.domain_name
= lpcfg_workgroup(tctx
->lp_ctx
);
1106 r
.in
.Account
= NULL
;
1107 r
.in
.EncryptedPassword
= NULL
;
1108 r
.in
.num_ous
= r
.out
.num_ous
= &num_ous
;
1111 torture_comment(tctx
, "Testing NetrGetJoinableOus2\n");
1113 status
= dcerpc_wkssvc_NetrGetJoinableOus2_r(b
, tctx
, &r
);
1114 torture_assert_ntstatus_ok(tctx
, status
, "NetrGetJoinableOus2 failed");
1115 torture_assert_werr_equal(tctx
, r
.out
.result
,
1116 WERR_RPC_E_REMOTE_DISABLED
,
1117 "NetrGetJoinableOus2 failed");
1122 static bool test_NetrUnjoinDomain(struct torture_context
*tctx
,
1123 struct dcerpc_pipe
*p
)
1126 struct wkssvc_NetrUnjoinDomain r
;
1127 struct cli_credentials
*creds
= cmdline_credentials
;
1128 const char *user
= cli_credentials_get_username(creds
);
1129 const char *admin_account
= NULL
;
1130 struct dcerpc_binding_handle
*b
= p
->binding_handle
;
1132 admin_account
= talloc_asprintf(tctx
, "%s\\%s",
1133 lpcfg_workgroup(tctx
->lp_ctx
),
1136 r
.in
.server_name
= dcerpc_server_name(p
);
1137 r
.in
.Account
= admin_account
;
1138 r
.in
.password
= NULL
;
1139 r
.in
.unjoin_flags
= 0;
1141 torture_comment(tctx
, "Testing NetrUnjoinDomain\n");
1143 status
= dcerpc_wkssvc_NetrUnjoinDomain_r(b
, tctx
, &r
);
1144 torture_assert_ntstatus_ok(tctx
, status
,
1145 "NetrUnjoinDomain failed");
1146 torture_assert_werr_equal(tctx
, r
.out
.result
, WERR_NOT_SUPPORTED
,
1147 "NetrUnjoinDomain failed");
1151 static bool test_NetrJoinDomain(struct torture_context
*tctx
,
1152 struct dcerpc_pipe
*p
)
1155 struct wkssvc_NetrJoinDomain r
;
1156 struct cli_credentials
*creds
= cmdline_credentials
;
1157 const char *user
= cli_credentials_get_username(creds
);
1158 const char *admin_account
= NULL
;
1159 struct dcerpc_binding_handle
*b
= p
->binding_handle
;
1161 admin_account
= talloc_asprintf(tctx
, "%s\\%s",
1162 lpcfg_workgroup(tctx
->lp_ctx
),
1165 r
.in
.server_name
= dcerpc_server_name(p
);
1166 r
.in
.domain_name
= lpcfg_dnsdomain(tctx
->lp_ctx
);
1167 r
.in
.account_ou
= NULL
;
1168 r
.in
.Account
= admin_account
;
1169 r
.in
.password
= NULL
;
1170 r
.in
.join_flags
= 0;
1172 torture_comment(tctx
, "Testing NetrJoinDomain\n");
1174 status
= dcerpc_wkssvc_NetrJoinDomain_r(b
, tctx
, &r
);
1175 torture_assert_ntstatus_ok(tctx
, status
,
1176 "NetrJoinDomain failed");
1177 torture_assert_werr_equal(tctx
, r
.out
.result
, WERR_NOT_SUPPORTED
,
1178 "NetrJoinDomain failed");
1183 * prerequisites for remotely joining an unjoined XP SP2 workstation:
1184 * - firewall needs to be disabled (or open for ncacn_np access)
1185 * - HKLM\System\CurrentControlSet\Control\Lsa\forceguest needs to 0
1187 * http://support.microsoft.com/kb/294355/EN-US/ and
1188 * http://support.microsoft.com/kb/290403/EN-US/
1191 static bool test_NetrJoinDomain2(struct torture_context
*tctx
,
1192 struct dcerpc_pipe
*p
)
1195 struct wkssvc_NetrJoinDomain2 r
;
1196 const char *domain_admin_account
= NULL
;
1197 const char *domain_admin_password
= NULL
;
1198 const char *domain_name
= NULL
;
1199 struct wkssvc_PasswordBuffer
*pwd_buf
;
1200 enum wkssvc_NetJoinStatus join_status
;
1201 const char *join_name
= NULL
;
1202 WERROR expected_err
;
1203 DATA_BLOB session_key
;
1204 struct dcerpc_binding_handle
*b
= p
->binding_handle
;
1206 /* FIXME: this test assumes to join workstations / servers and does not
1207 * handle DCs (WERR_SETUP_DOMAIN_CONTROLLER) */
1209 if (!test_GetJoinInformation(tctx
, p
, &join_status
, &join_name
))
1214 switch (join_status
) {
1215 case NET_SETUP_DOMAIN_NAME
:
1216 expected_err
= WERR_SETUP_ALREADY_JOINED
;
1218 case NET_SETUP_UNKNOWN_STATUS
:
1219 case NET_SETUP_UNJOINED
:
1220 case NET_SETUP_WORKGROUP_NAME
:
1222 expected_err
= WERR_OK
;
1226 domain_admin_account
= torture_setting_string(tctx
, "domain_admin_account", NULL
);
1228 domain_admin_password
= torture_setting_string(tctx
, "domain_admin_password", NULL
);
1230 domain_name
= torture_setting_string(tctx
, "domain_name", NULL
);
1232 if ((domain_admin_account
== NULL
) ||
1233 (domain_admin_password
== NULL
) ||
1234 (domain_name
== NULL
)) {
1235 torture_comment(tctx
, "not enough input parameter\n");
1239 status
= dcerpc_fetch_session_key(p
, &session_key
);
1240 if (!NT_STATUS_IS_OK(status
)) {
1244 encode_wkssvc_join_password_buffer(tctx
, domain_admin_password
,
1245 &session_key
, &pwd_buf
);
1247 r
.in
.server_name
= dcerpc_server_name(p
);
1248 r
.in
.domain_name
= domain_name
;
1249 r
.in
.account_ou
= NULL
;
1250 r
.in
.admin_account
= domain_admin_account
;
1251 r
.in
.encrypted_password
= pwd_buf
;
1252 r
.in
.join_flags
= WKSSVC_JOIN_FLAGS_JOIN_TYPE
|
1253 WKSSVC_JOIN_FLAGS_ACCOUNT_CREATE
;
1255 torture_comment(tctx
, "Testing NetrJoinDomain2 (assuming non-DC)\n");
1257 status
= dcerpc_wkssvc_NetrJoinDomain2_r(b
, tctx
, &r
);
1258 torture_assert_ntstatus_ok(tctx
, status
,
1259 "NetrJoinDomain2 failed");
1260 torture_assert_werr_equal(tctx
, r
.out
.result
, expected_err
,
1261 "NetrJoinDomain2 failed");
1263 if (!test_GetJoinInformation(tctx
, p
, &join_status
, &join_name
))
1268 if (join_status
!= NET_SETUP_DOMAIN_NAME
) {
1269 torture_comment(tctx
,
1270 "Join verify failed: got %d\n", join_status
);
1277 static bool test_NetrUnjoinDomain2(struct torture_context
*tctx
,
1278 struct dcerpc_pipe
*p
)
1281 struct wkssvc_NetrUnjoinDomain2 r
;
1282 const char *domain_admin_account
= NULL
;
1283 const char *domain_admin_password
= NULL
;
1284 struct wkssvc_PasswordBuffer
*pwd_buf
;
1285 enum wkssvc_NetJoinStatus join_status
;
1286 const char *join_name
= NULL
;
1287 WERROR expected_err
;
1288 DATA_BLOB session_key
;
1289 struct dcerpc_binding_handle
*b
= p
->binding_handle
;
1291 /* FIXME: this test assumes to join workstations / servers and does not
1292 * handle DCs (WERR_SETUP_DOMAIN_CONTROLLER) */
1294 if (!test_GetJoinInformation(tctx
, p
, &join_status
, &join_name
))
1299 switch (join_status
) {
1300 case NET_SETUP_UNJOINED
:
1301 expected_err
= WERR_SETUP_NOT_JOINED
;
1303 case NET_SETUP_DOMAIN_NAME
:
1304 case NET_SETUP_UNKNOWN_STATUS
:
1305 case NET_SETUP_WORKGROUP_NAME
:
1307 expected_err
= WERR_OK
;
1311 domain_admin_account
= torture_setting_string(tctx
, "domain_admin_account", NULL
);
1313 domain_admin_password
= torture_setting_string(tctx
, "domain_admin_password", NULL
);
1315 if ((domain_admin_account
== NULL
) ||
1316 (domain_admin_password
== NULL
)) {
1317 torture_comment(tctx
, "not enough input parameter\n");
1321 status
= dcerpc_fetch_session_key(p
, &session_key
);
1322 if (!NT_STATUS_IS_OK(status
)) {
1326 encode_wkssvc_join_password_buffer(tctx
, domain_admin_password
,
1327 &session_key
, &pwd_buf
);
1329 r
.in
.server_name
= dcerpc_server_name(p
);
1330 r
.in
.account
= domain_admin_account
;
1331 r
.in
.encrypted_password
= pwd_buf
;
1332 r
.in
.unjoin_flags
= 0;
1334 torture_comment(tctx
, "Testing NetrUnjoinDomain2 (assuming non-DC)\n");
1336 status
= dcerpc_wkssvc_NetrUnjoinDomain2_r(b
, tctx
, &r
);
1337 torture_assert_ntstatus_ok(tctx
, status
,
1338 "NetrUnjoinDomain2 failed");
1339 torture_assert_werr_equal(tctx
, r
.out
.result
, expected_err
,
1340 "NetrUnjoinDomain2 failed");
1342 if (!test_GetJoinInformation(tctx
, p
, &join_status
, &join_name
))
1347 switch (join_status
) {
1348 case NET_SETUP_UNJOINED
:
1349 case NET_SETUP_WORKGROUP_NAME
:
1351 case NET_SETUP_UNKNOWN_STATUS
:
1352 case NET_SETUP_DOMAIN_NAME
:
1354 torture_comment(tctx
,
1355 "Unjoin verify failed: got %d\n", join_status
);
1363 struct torture_suite
*torture_rpc_wkssvc(TALLOC_CTX
*mem_ctx
)
1365 struct torture_suite
*suite
;
1366 struct torture_rpc_tcase
*tcase
;
1367 struct torture_test
*test
;
1369 suite
= torture_suite_create(mem_ctx
, "wkssvc");
1370 tcase
= torture_suite_add_rpc_iface_tcase(suite
, "wkssvc",
1373 torture_rpc_tcase_add_test(tcase
, "NetWkstaGetInfo",
1374 test_NetWkstaGetInfo
);
1376 torture_rpc_tcase_add_test(tcase
, "NetWkstaTransportEnum",
1377 test_NetWkstaTransportEnum
);
1378 torture_rpc_tcase_add_test(tcase
, "NetrWkstaTransportDel",
1379 test_NetrWkstaTransportDel
);
1380 torture_rpc_tcase_add_test(tcase
, "NetrWkstaTransportAdd",
1381 test_NetrWkstaTransportAdd
);
1383 torture_rpc_tcase_add_test(tcase
, "NetWkstaEnumUsers",
1384 test_NetWkstaEnumUsers
);
1385 torture_rpc_tcase_add_test(tcase
, "NetrWkstaUserGetInfo",
1386 test_NetrWkstaUserGetInfo
);
1388 torture_rpc_tcase_add_test(tcase
, "NetrUseDel",
1390 torture_rpc_tcase_add_test(tcase
, "NetrUseGetInfo",
1391 test_NetrUseGetInfo
);
1392 torture_rpc_tcase_add_test(tcase
, "NetrUseEnum",
1394 torture_rpc_tcase_add_test(tcase
, "NetrUseAdd",
1397 torture_rpc_tcase_add_test(tcase
, "NetrValidateName",
1398 test_NetrValidateName
);
1399 torture_rpc_tcase_add_test(tcase
, "NetrValidateName2",
1400 test_NetrValidateName2
);
1401 torture_rpc_tcase_add_test(tcase
, "NetrLogonDomainNameDel",
1402 test_NetrLogonDomainNameDel
);
1403 torture_rpc_tcase_add_test(tcase
, "NetrLogonDomainNameAdd",
1404 test_NetrLogonDomainNameAdd
);
1405 torture_rpc_tcase_add_test(tcase
, "NetrRemoveAlternateComputerName",
1406 test_NetrRemoveAlternateComputerName
);
1407 torture_rpc_tcase_add_test(tcase
, "NetrAddAlternateComputerName",
1408 test_NetrAddAlternateComputerName
);
1409 test
= torture_rpc_tcase_add_test(tcase
, "NetrSetPrimaryComputername",
1410 test_NetrSetPrimaryComputername
);
1411 test
->dangerous
= true;
1412 test
= torture_rpc_tcase_add_test(tcase
, "NetrRenameMachineInDomain",
1413 test_NetrRenameMachineInDomain
);
1414 test
->dangerous
= true;
1415 test
= torture_rpc_tcase_add_test(tcase
, "NetrRenameMachineInDomain2",
1416 test_NetrRenameMachineInDomain2
);
1417 test
->dangerous
= true;
1418 torture_rpc_tcase_add_test(tcase
, "NetrEnumerateComputerNames",
1419 test_NetrEnumerateComputerNames
);
1421 test
= torture_rpc_tcase_add_test(tcase
, "NetrJoinDomain2",
1422 test_NetrJoinDomain2
);
1423 test
->dangerous
= true;
1424 test
= torture_rpc_tcase_add_test(tcase
, "NetrUnjoinDomain2",
1425 test_NetrUnjoinDomain2
);
1426 test
->dangerous
= true;
1428 torture_rpc_tcase_add_test(tcase
, "NetrJoinDomain",
1429 test_NetrJoinDomain
);
1430 test
->dangerous
= true;
1431 torture_rpc_tcase_add_test(tcase
, "NetrUnjoinDomain",
1432 test_NetrUnjoinDomain
);
1433 test
->dangerous
= true;
1434 torture_rpc_tcase_add_test(tcase
, "NetrGetJoinInformation",
1435 test_NetrGetJoinInformation
);
1436 torture_rpc_tcase_add_test(tcase
, "NetrGetJoinableOus",
1437 test_NetrGetJoinableOus
);
1438 torture_rpc_tcase_add_test(tcase
, "NetrGetJoinableOus2",
1439 test_NetrGetJoinableOus2
);
1441 torture_rpc_tcase_add_test(tcase
, "NetrWorkstationStatisticsGet",
1442 test_NetrWorkstationStatisticsGet
);
1443 torture_rpc_tcase_add_test(tcase
, "NetrMessageBufferSend",
1444 test_NetrMessageBufferSend
);