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/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};
46 r
.in
.server_name
= dcerpc_server_name(p
);
49 for (i
=0;i
<ARRAY_SIZE(levels
);i
++) {
50 r
.in
.level
= levels
[i
];
51 torture_comment(tctx
, "testing NetWkstaGetInfo level %u\n",
53 status
= dcerpc_wkssvc_NetWkstaGetInfo(p
, tctx
, &r
);
54 torture_assert_ntstatus_ok(tctx
, status
,
55 talloc_asprintf(tctx
, "NetWkstaGetInfo level %u failed",
57 torture_assert_werr_ok(tctx
, r
.out
.result
,
58 talloc_asprintf(tctx
, "NetWkstaGetInfo level %u failed",
65 static bool test_NetWkstaTransportEnum(struct torture_context
*tctx
,
66 struct dcerpc_pipe
*p
)
69 struct wkssvc_NetWkstaTransportEnum r
;
70 uint32_t resume_handle
= 0;
71 struct wkssvc_NetWkstaTransportInfo info
;
72 union wkssvc_NetWkstaTransportCtr ctr
;
73 struct wkssvc_NetWkstaTransportCtr0 ctr0
;
74 uint32_t total_entries
= 0;
82 r
.in
.server_name
= dcerpc_server_name(p
);
84 r
.in
.max_buffer
= (uint32_t)-1;
85 r
.in
.resume_handle
= &resume_handle
;
86 r
.out
.total_entries
= &total_entries
;
88 r
.out
.resume_handle
= &resume_handle
;
90 torture_comment(tctx
, "testing NetWkstaTransportEnum level 0\n");
92 status
= dcerpc_wkssvc_NetWkstaTransportEnum(p
, tctx
, &r
);
93 torture_assert_ntstatus_ok(tctx
, status
,
94 "NetWkstaTransportEnum failed");
95 torture_assert_werr_ok(tctx
, r
.out
.result
, talloc_asprintf(tctx
,
96 "NetWkstaTransportEnum level %u failed",
102 static bool test_NetrWkstaTransportAdd(struct torture_context
*tctx
,
103 struct dcerpc_pipe
*p
)
106 struct wkssvc_NetrWkstaTransportAdd r
;
107 struct wkssvc_NetWkstaTransportInfo0 info0
;
108 uint32_t parm_err
= 0;
112 info0
.quality_of_service
= 0xffff;
114 info0
.name
= SMBTORTURE_TRANSPORT_NAME
;
115 info0
.address
= "000000000000";
116 info0
.wan_link
= 0x400;
118 r
.in
.server_name
= dcerpc_server_name(p
);
121 r
.in
.parm_err
= r
.out
.parm_err
= &parm_err
;
123 torture_comment(tctx
, "testing NetrWkstaTransportAdd level 0\n");
125 status
= dcerpc_wkssvc_NetrWkstaTransportAdd(p
, tctx
, &r
);
126 torture_assert_ntstatus_ok(tctx
, status
,
127 "NetrWkstaTransportAdd failed");
128 torture_assert_werr_equal(tctx
, r
.out
.result
,
130 "NetrWkstaTransportAdd level 0 failed");
135 static bool test_NetrWkstaTransportDel(struct torture_context
*tctx
,
136 struct dcerpc_pipe
*p
)
139 struct wkssvc_NetrWkstaTransportDel r
;
141 r
.in
.server_name
= dcerpc_server_name(p
);
142 r
.in
.transport_name
= SMBTORTURE_TRANSPORT_NAME
;
145 torture_comment(tctx
, "testing NetrWkstaTransportDel\n");
147 status
= dcerpc_wkssvc_NetrWkstaTransportDel(p
, tctx
, &r
);
148 torture_assert_ntstatus_ok(tctx
, status
,
149 "NetrWkstaTransportDel failed");
150 torture_assert_werr_ok(tctx
, r
.out
.result
,
151 "NetrWkstaTransportDel");
156 static bool test_NetWkstaEnumUsers(struct torture_context
*tctx
,
157 struct dcerpc_pipe
*p
)
160 struct wkssvc_NetWkstaEnumUsers r
;
162 uint32_t entries_read
= 0;
163 struct wkssvc_NetWkstaEnumUsersInfo info
;
164 struct wkssvc_NetWkstaEnumUsersCtr0
*user0
;
165 struct wkssvc_NetWkstaEnumUsersCtr1
*user1
;
166 uint32_t levels
[] = { 0, 1 };
169 for (i
=0; i
<ARRAY_SIZE(levels
); i
++) {
173 info
.level
= levels
[i
];
174 switch (info
.level
) {
176 user0
= talloc_zero(tctx
,
177 struct wkssvc_NetWkstaEnumUsersCtr0
);
178 info
.ctr
.user0
= user0
;
181 user1
= talloc_zero(tctx
,
182 struct wkssvc_NetWkstaEnumUsersCtr1
);
183 info
.ctr
.user1
= user1
;
189 r
.in
.server_name
= dcerpc_server_name(p
);
190 r
.in
.prefmaxlen
= (uint32_t)-1;
191 r
.in
.info
= r
.out
.info
= &info
;
192 r
.in
.resume_handle
= r
.out
.resume_handle
= &handle
;
194 r
.out
.entries_read
= &entries_read
;
196 torture_comment(tctx
, "testing NetWkstaEnumUsers level %u\n",
199 status
= dcerpc_wkssvc_NetWkstaEnumUsers(p
, tctx
, &r
);
200 torture_assert_ntstatus_ok(tctx
, status
,
201 "NetWkstaEnumUsers failed");
202 torture_assert_werr_ok(tctx
, r
.out
.result
,
203 "NetWkstaEnumUsers failed");
209 static bool test_NetrWkstaUserGetInfo(struct torture_context
*tctx
,
210 struct dcerpc_pipe
*p
)
213 struct wkssvc_NetrWkstaUserGetInfo r
;
214 union wkssvc_NetrWkstaUserInfo info
;
215 const char *dom
= lp_workgroup(tctx
->lp_ctx
);
216 struct cli_credentials
*creds
= cmdline_credentials
;
217 const char *user
= cli_credentials_get_username(creds
);
225 { NULL
, 0, WERR_NO_SUCH_LOGON_SESSION
},
226 { NULL
, 1, WERR_NO_SUCH_LOGON_SESSION
},
227 { NULL
, 1101, WERR_OK
},
228 { dom
, 0, WERR_INVALID_PARAM
},
229 { dom
, 1, WERR_INVALID_PARAM
},
230 { dom
, 1101, WERR_INVALID_PARAM
},
231 { user
, 0, WERR_INVALID_PARAM
},
232 { user
, 1, WERR_INVALID_PARAM
},
233 { user
, 1101, WERR_INVALID_PARAM
},
236 for (i
=0; i
<ARRAY_SIZE(tests
); i
++) {
237 r
.in
.unknown
= tests
[i
].unknown
;
238 r
.in
.level
= tests
[i
].level
;
241 torture_comment(tctx
, "testing NetrWkstaUserGetInfo level %u\n",
244 status
= dcerpc_wkssvc_NetrWkstaUserGetInfo(p
, tctx
, &r
);
245 torture_assert_ntstatus_ok(tctx
, status
,
246 "NetrWkstaUserGetInfo failed");
247 torture_assert_werr_equal(tctx
, r
.out
.result
,
249 "NetrWkstaUserGetInfo failed");
255 static bool test_NetrUseEnum(struct torture_context
*tctx
,
256 struct dcerpc_pipe
*p
)
259 struct wkssvc_NetrUseEnum r
;
261 uint32_t entries_read
= 0;
262 struct wkssvc_NetrUseEnumInfo info
;
263 struct wkssvc_NetrUseEnumCtr0
*use0
;
264 struct wkssvc_NetrUseEnumCtr1
*use1
;
265 struct wkssvc_NetrUseEnumCtr2
*use2
;
266 uint32_t levels
[] = { 0, 1, 2 };
269 for (i
=0; i
<ARRAY_SIZE(levels
); i
++) {
273 info
.level
= levels
[i
];
274 switch (info
.level
) {
276 use0
= talloc_zero(tctx
, struct wkssvc_NetrUseEnumCtr0
);
277 info
.ctr
.ctr0
= use0
;
280 use1
= talloc_zero(tctx
, struct wkssvc_NetrUseEnumCtr1
);
281 info
.ctr
.ctr1
= use1
;
284 use2
= talloc_zero(tctx
, struct wkssvc_NetrUseEnumCtr2
);
285 info
.ctr
.ctr2
= use2
;
291 r
.in
.server_name
= talloc_asprintf(tctx
, "\\\\%s", dcerpc_server_name(p
));
292 r
.in
.prefmaxlen
= (uint32_t)-1;
293 r
.in
.info
= r
.out
.info
= &info
;
294 r
.in
.resume_handle
= r
.out
.resume_handle
= &handle
;
296 r
.out
.entries_read
= &entries_read
;
298 torture_comment(tctx
, "testing NetrUseEnum level %u\n",
301 status
= dcerpc_wkssvc_NetrUseEnum(p
, tctx
, &r
);
302 torture_assert_ntstatus_ok(tctx
, status
,
303 "NetrUseEnum failed");
304 torture_assert_werr_ok(tctx
, r
.out
.result
,
305 "NetrUseEnum failed");
311 static bool test_NetrUseAdd(struct torture_context
*tctx
,
312 struct dcerpc_pipe
*p
)
315 struct wkssvc_NetrUseAdd r
;
316 struct wkssvc_NetrUseInfo0 info0
;
317 struct wkssvc_NetrUseInfo1 info1
;
318 union wkssvc_NetrUseGetInfoCtr
*ctr
;
319 uint32_t parm_err
= 0;
321 ctr
= talloc(tctx
, union wkssvc_NetrUseGetInfoCtr
);
325 info0
.local
= SMBTORTURE_USE_NAME
;
326 info0
.remote
= "\\\\localhost\\c$";
330 r
.in
.server_name
= talloc_asprintf(tctx
, "\\\\%s", dcerpc_server_name(p
));
333 r
.in
.parm_err
= r
.out
.parm_err
= &parm_err
;
335 torture_comment(tctx
, "testing NetrUseAdd level %u\n",
338 status
= dcerpc_wkssvc_NetrUseAdd(p
, tctx
, &r
);
339 torture_assert_ntstatus_ok(tctx
, status
,
340 "NetrUseAdd failed");
341 torture_assert_werr_equal(tctx
, r
.out
.result
, WERR_UNKNOWN_LEVEL
,
342 "NetrUseAdd failed");
347 info1
.local
= SMBTORTURE_USE_NAME
;
348 info1
.remote
= "\\\\localhost\\sysvol";
349 info1
.password
= NULL
;
353 r
.in
.server_name
= talloc_asprintf(tctx
, "\\\\%s", dcerpc_server_name(p
));
356 r
.in
.parm_err
= r
.out
.parm_err
= &parm_err
;
358 torture_comment(tctx
, "testing NetrUseAdd level %u\n",
361 status
= dcerpc_wkssvc_NetrUseAdd(p
, tctx
, &r
);
362 torture_assert_ntstatus_ok(tctx
, status
,
363 "NetrUseAdd failed");
364 torture_assert_werr_ok(tctx
, r
.out
.result
,
365 "NetrUseAdd failed");
370 static bool test_NetrUseDel(struct torture_context
*tctx
,
371 struct dcerpc_pipe
*p
)
374 struct wkssvc_NetrUseDel r
;
376 r
.in
.server_name
= talloc_asprintf(tctx
, "\\\\%s", dcerpc_server_name(p
));
377 r
.in
.use_name
= SMBTORTURE_USE_NAME
;
380 torture_comment(tctx
, "testing NetrUseDel\n");
382 status
= dcerpc_wkssvc_NetrUseDel(p
, tctx
, &r
);
383 torture_assert_ntstatus_ok(tctx
, status
,
384 "NetrUseDel failed");
385 torture_assert_werr_ok(tctx
, r
.out
.result
,
386 "NetrUseDel failed");
390 static bool test_NetrUseGetInfo_level(struct torture_context
*tctx
,
391 struct dcerpc_pipe
*p
,
392 const char *use_name
,
397 struct wkssvc_NetrUseGetInfo r
;
398 union wkssvc_NetrUseGetInfoCtr ctr
;
402 r
.in
.server_name
= talloc_asprintf(tctx
, "\\\\%s", dcerpc_server_name(p
));
403 r
.in
.use_name
= use_name
;
406 status
= dcerpc_wkssvc_NetrUseGetInfo(p
, tctx
, &r
);
408 torture_assert_ntstatus_ok(tctx
, status
,
409 "NetrUseGetInfo failed");
410 torture_assert_werr_equal(tctx
, r
.out
.result
, werr
,
411 "NetrUseGetInfo failed");
415 static bool test_NetrUseGetInfo(struct torture_context
*tctx
,
416 struct dcerpc_pipe
*p
)
419 struct wkssvc_NetrUseEnum r
;
421 uint32_t entries_read
= 0;
422 struct wkssvc_NetrUseEnumInfo info
;
423 struct wkssvc_NetrUseEnumCtr0
*use0
;
424 uint32_t levels
[] = { 0, 1, 2 };
425 const char *use_name
= NULL
;
431 use0
= talloc_zero(tctx
, struct wkssvc_NetrUseEnumCtr0
);
432 info
.ctr
.ctr0
= use0
;
434 r
.in
.server_name
= talloc_asprintf(tctx
, "\\\\%s", dcerpc_server_name(p
));
435 r
.in
.prefmaxlen
= (uint32_t)-1;
436 r
.in
.info
= r
.out
.info
= &info
;
437 r
.in
.resume_handle
= r
.out
.resume_handle
= &handle
;
438 r
.out
.entries_read
= &entries_read
;
440 status
= dcerpc_wkssvc_NetrUseEnum(p
, tctx
, &r
);
441 torture_assert_ntstatus_ok(tctx
, status
,
442 "NetrUseEnum failed");
443 torture_assert_werr_ok(tctx
, r
.out
.result
,
444 "NetrUseEnum failed");
446 for (k
=0; k
< r
.out
.info
->ctr
.ctr0
->count
; k
++) {
448 use_name
= r
.out
.info
->ctr
.ctr0
->array
[k
].local
;
450 for (i
=0; i
<ARRAY_SIZE(levels
); i
++) {
452 if (!test_NetrUseGetInfo_level(tctx
, p
, use_name
,
456 if (levels
[i
] != 0) {
462 use_name
= r
.out
.info
->ctr
.ctr0
->array
[k
].remote
;
464 for (i
=0; i
<ARRAY_SIZE(levels
); i
++) {
466 if (!test_NetrUseGetInfo_level(tctx
, p
, use_name
,
470 if (levels
[i
] != 0) {
480 static bool test_NetrLogonDomainNameAdd(struct torture_context
*tctx
,
481 struct dcerpc_pipe
*p
)
484 struct wkssvc_NetrLogonDomainNameAdd r
;
486 r
.in
.domain_name
= lp_workgroup(tctx
->lp_ctx
);
488 torture_comment(tctx
, "testing NetrLogonDomainNameAdd\n");
490 status
= dcerpc_wkssvc_NetrLogonDomainNameAdd(p
, tctx
, &r
);
491 torture_assert_ntstatus_ok(tctx
, status
,
492 "NetrLogonDomainNameAdd failed");
493 torture_assert_werr_equal(tctx
, r
.out
.result
, WERR_NOT_SUPPORTED
,
494 "NetrLogonDomainNameAdd failed");
498 static bool test_NetrLogonDomainNameDel(struct torture_context
*tctx
,
499 struct dcerpc_pipe
*p
)
502 struct wkssvc_NetrLogonDomainNameDel r
;
504 r
.in
.domain_name
= lp_workgroup(tctx
->lp_ctx
);
506 torture_comment(tctx
, "testing NetrLogonDomainNameDel\n");
508 status
= dcerpc_wkssvc_NetrLogonDomainNameDel(p
, tctx
, &r
);
509 torture_assert_ntstatus_ok(tctx
, status
,
510 "NetrLogonDomainNameDel failed");
511 torture_assert_werr_equal(tctx
, r
.out
.result
, WERR_NOT_SUPPORTED
,
512 "NetrLogonDomainNameDel failed");
516 static bool test_NetrEnumerateComputerNames_level(struct torture_context
*tctx
,
517 struct dcerpc_pipe
*p
,
523 struct wkssvc_NetrEnumerateComputerNames r
;
524 struct wkssvc_ComputerNamesCtr
*ctr
;
527 ctr
= talloc_zero(tctx
, struct wkssvc_ComputerNamesCtr
);
529 r
.in
.server_name
= dcerpc_server_name(p
);
530 r
.in
.name_type
= level
;
534 torture_comment(tctx
, "testing NetrEnumerateComputerNames level %u\n",
537 status
= dcerpc_wkssvc_NetrEnumerateComputerNames(p
, tctx
, &r
);
538 torture_assert_ntstatus_ok(tctx
, status
,
539 "NetrEnumerateComputerNames failed");
540 torture_assert_werr_ok(tctx
, r
.out
.result
,
541 "NetrEnumerateComputerNames failed");
543 if ((level
== NetPrimaryComputerName
) && ctr
->count
!= 1) {
544 torture_comment(tctx
,
545 "NetrEnumerateComputerNames did not return one "
546 "name but %u\n", ctr
->count
);
550 if (names
&& num_names
) {
553 for (i
=0; i
<ctr
->count
; i
++) {
554 if (!add_string_to_array(tctx
,
555 ctr
->computer_name
[i
].string
,
567 static bool test_NetrEnumerateComputerNames(struct torture_context
*tctx
,
568 struct dcerpc_pipe
*p
)
570 uint16_t levels
[] = {0,1,2};
573 for (i
=0; i
<ARRAY_SIZE(levels
); i
++) {
575 if (!test_NetrEnumerateComputerNames_level(tctx
,
587 static bool test_NetrValidateName(struct torture_context
*tctx
,
588 struct dcerpc_pipe
*p
)
591 struct wkssvc_NetrValidateName r
;
592 uint16_t levels
[] = {0,1,2,3,4,5};
595 for (i
=0; i
<ARRAY_SIZE(levels
); i
++) {
597 r
.in
.server_name
= talloc_asprintf(tctx
, "\\\\%s", dcerpc_server_name(p
));
598 r
.in
.name
= lp_workgroup(tctx
->lp_ctx
);
600 r
.in
.Password
= NULL
;
601 r
.in
.name_type
= levels
[i
];
603 torture_comment(tctx
, "testing NetrValidateName level %u\n",
606 status
= dcerpc_wkssvc_NetrValidateName(p
, tctx
, &r
);
607 torture_assert_ntstatus_ok(tctx
, status
,
608 "NetrValidateName failed");
609 torture_assert_werr_equal(tctx
, r
.out
.result
,
611 "NetrValidateName failed");
617 static bool test_NetrValidateName2(struct torture_context
*tctx
,
618 struct dcerpc_pipe
*p
)
621 struct wkssvc_NetrValidateName2 r
;
622 uint16_t levels
[] = {0,1,2,3,4,5};
625 for (i
=0; i
<ARRAY_SIZE(levels
); i
++) {
627 r
.in
.server_name
= talloc_asprintf(tctx
, "\\\\%s", dcerpc_server_name(p
));
628 r
.in
.name
= lp_workgroup(tctx
->lp_ctx
);
630 r
.in
.EncryptedPassword
= NULL
;
631 r
.in
.name_type
= levels
[i
];
633 torture_comment(tctx
, "testing NetrValidateName2 level %u\n",
636 status
= dcerpc_wkssvc_NetrValidateName2(p
, tctx
, &r
);
637 torture_assert_ntstatus_ok(tctx
, status
,
638 "NetrValidateName2 failed");
639 torture_assert_werr_equal(tctx
, r
.out
.result
,
640 WERR_RPC_E_REMOTE_DISABLED
,
641 "NetrValidateName2 failed");
647 static bool test_NetrAddAlternateComputerName(struct torture_context
*tctx
,
648 struct dcerpc_pipe
*p
)
651 struct wkssvc_NetrAddAlternateComputerName r
;
652 const char **names
= NULL
;
656 r
.in
.server_name
= dcerpc_server_name(p
);
657 r
.in
.NewAlternateMachineName
= SMBTORTURE_ALTERNATE_NAME
;
659 r
.in
.EncryptedPassword
= NULL
;
662 torture_comment(tctx
, "testing NetrAddAlternateComputerName\n");
664 status
= dcerpc_wkssvc_NetrAddAlternateComputerName(p
, tctx
, &r
);
665 torture_assert_ntstatus_ok(tctx
, status
,
666 "NetrAddAlternateComputerName failed");
667 torture_assert_werr_ok(tctx
, r
.out
.result
,
668 "NetrAddAlternateComputerName failed");
670 if (!test_NetrEnumerateComputerNames_level(tctx
, p
,
671 NetAlternateComputerNames
,
677 for (i
=0; i
<num_names
; i
++) {
678 if (strequal(names
[i
], SMBTORTURE_ALTERNATE_NAME
)) {
683 torture_comment(tctx
, "new alternate name not set\n");
688 static bool test_NetrRemoveAlternateComputerName(struct torture_context
*tctx
,
689 struct dcerpc_pipe
*p
)
692 struct wkssvc_NetrRemoveAlternateComputerName r
;
693 const char **names
= NULL
;
697 r
.in
.server_name
= dcerpc_server_name(p
);
698 r
.in
.AlternateMachineNameToRemove
= SMBTORTURE_ALTERNATE_NAME
;
700 r
.in
.EncryptedPassword
= NULL
;
703 torture_comment(tctx
, "testing NetrRemoveAlternateComputerName\n");
705 status
= dcerpc_wkssvc_NetrRemoveAlternateComputerName(p
, tctx
, &r
);
706 torture_assert_ntstatus_ok(tctx
, status
,
707 "NetrRemoveAlternateComputerName failed");
708 torture_assert_werr_ok(tctx
, r
.out
.result
,
709 "NetrRemoveAlternateComputerName failed");
711 if (!test_NetrEnumerateComputerNames_level(tctx
, p
,
712 NetAlternateComputerNames
,
718 for (i
=0; i
<num_names
; i
++) {
719 if (strequal(names
[i
], SMBTORTURE_ALTERNATE_NAME
)) {
727 static bool test_NetrSetPrimaryComputername_name(struct torture_context
*tctx
,
728 struct dcerpc_pipe
*p
,
732 struct wkssvc_NetrSetPrimaryComputername r
;
734 r
.in
.server_name
= dcerpc_server_name(p
);
735 r
.in
.primary_name
= name
;
737 r
.in
.EncryptedPassword
= NULL
;
740 status
= dcerpc_wkssvc_NetrSetPrimaryComputername(p
, tctx
, &r
);
741 torture_assert_ntstatus_ok(tctx
, status
,
742 "NetrSetPrimaryComputername failed");
743 torture_assert_werr_ok(tctx
, r
.out
.result
,
744 "NetrSetPrimaryComputername failed");
749 static bool test_NetrSetPrimaryComputername(struct torture_context
*tctx
,
750 struct dcerpc_pipe
*p
)
756 set new primary (alternate)
758 later: check if del is possible
759 set primary back to origin
764 const char **names_o
= NULL
, **names
= NULL
;
765 int num_names_o
= 0, num_names
= 0;
767 torture_comment(tctx
, "testing NetrSetPrimaryComputername\n");
769 if (!test_NetrAddAlternateComputerName(tctx
, p
)) {
773 if (!test_NetrEnumerateComputerNames_level(tctx
, p
,
774 NetPrimaryComputerName
,
775 &names_o
, &num_names_o
))
780 if (num_names_o
!= 1) {
784 if (!test_NetrSetPrimaryComputername_name(tctx
, p
,
785 SMBTORTURE_ALTERNATE_NAME
))
790 if (!test_NetrEnumerateComputerNames_level(tctx
, p
,
791 NetPrimaryComputerName
,
797 if (num_names
!= 1) {
801 if (!strequal(names
[0], SMBTORTURE_ALTERNATE_NAME
)) {
802 torture_comment(tctx
,
803 "name mismatch (%s != %s) after NetrSetPrimaryComputername!\n",
804 names
[0], SMBTORTURE_ALTERNATE_NAME
);
808 if (!test_NetrSetPrimaryComputername_name(tctx
, p
,
814 if (!test_NetrRemoveAlternateComputerName(tctx
, p
)) {
822 static bool test_NetrRenameMachineInDomain(struct torture_context
*tctx
,
823 struct dcerpc_pipe
*p
)
826 struct wkssvc_NetrRenameMachineInDomain r
;
828 r
.in
.server_name
= dcerpc_server_name(p
);
829 r
.in
.NewMachineName
= SMBTORTURE_MACHINE_NAME
;
831 r
.in
.password
= NULL
;
832 r
.in
.RenameOptions
= 0;
834 torture_comment(tctx
, "testing NetrRenameMachineInDomain\n");
836 status
= dcerpc_wkssvc_NetrRenameMachineInDomain(p
, tctx
, &r
);
837 torture_assert_ntstatus_ok(tctx
, status
,
838 "NetrRenameMachineInDomain failed");
839 torture_assert_werr_equal(tctx
, r
.out
.result
, WERR_NOT_SUPPORTED
,
840 "NetrRenameMachineInDomain failed");
844 static bool test_NetrRenameMachineInDomain2_name(struct torture_context
*tctx
,
845 struct dcerpc_pipe
*p
,
846 const char *new_name
)
849 struct wkssvc_NetrRenameMachineInDomain2 r
;
851 r
.in
.server_name
= dcerpc_server_name(p
);
852 r
.in
.NewMachineName
= new_name
;
854 r
.in
.EncryptedPassword
= NULL
;
855 r
.in
.RenameOptions
= 0;
857 status
= dcerpc_wkssvc_NetrRenameMachineInDomain2(p
, tctx
, &r
);
858 torture_assert_ntstatus_ok(tctx
, status
,
859 "NetrRenameMachineInDomain2 failed");
860 torture_assert_werr_ok(tctx
, r
.out
.result
,
861 "NetrRenameMachineInDomain2 failed");
865 static bool test_NetrRenameMachineInDomain2(struct torture_context
*tctx
,
866 struct dcerpc_pipe
*p
)
868 const char **names_o
= NULL
, **names
= NULL
;
869 int num_names_o
= 0, num_names
= 0;
871 torture_comment(tctx
, "testing NetrRenameMachineInDomain2\n");
873 if (!test_NetrEnumerateComputerNames_level(tctx
, p
,
874 NetPrimaryComputerName
,
875 &names_o
, &num_names_o
))
880 if (num_names_o
!= 1) {
884 if (!test_NetrRenameMachineInDomain2_name(tctx
, p
,
885 SMBTORTURE_MACHINE_NAME
))
890 if (!test_NetrEnumerateComputerNames_level(tctx
, p
,
891 NetPrimaryComputerName
,
897 if (num_names
!= 1) {
901 if (strequal(names
[0], names_o
[0])) {
902 test_NetrRenameMachineInDomain2_name(tctx
, p
, names_o
[0]);
906 if (!strequal(names
[0], SMBTORTURE_MACHINE_NAME
)) {
907 test_NetrRenameMachineInDomain2_name(tctx
, p
, names_o
[0]);
911 if (!test_NetrRenameMachineInDomain2_name(tctx
, p
, names_o
[0]))
916 if (!test_NetrEnumerateComputerNames_level(tctx
, p
,
917 NetPrimaryComputerName
,
923 if (num_names
!= 1) {
927 if (!strequal(names
[0], names_o
[0])) {
934 static bool test_NetrWorkstationStatisticsGet(struct torture_context
*tctx
,
935 struct dcerpc_pipe
*p
)
938 struct wkssvc_NetrWorkstationStatisticsGet r
;
939 struct wkssvc_NetrWorkstationStatistics
*info
;
943 info
= talloc_zero(tctx
, struct wkssvc_NetrWorkstationStatistics
);
945 r
.in
.server_name
= dcerpc_server_name(p
);
948 torture_comment(tctx
, "testing NetrWorkstationStatisticsGet\n");
950 status
= dcerpc_wkssvc_NetrWorkstationStatisticsGet(p
, tctx
, &r
);
951 torture_assert_ntstatus_ok(tctx
, status
,
952 "NetrWorkstationStatisticsGet failed");
953 torture_assert_werr_ok(tctx
, r
.out
.result
,
954 "NetrWorkstationStatisticsGet failed");
958 /* only succeeds as long as the local messenger service is running - Guenther */
960 static bool test_NetrMessageBufferSend(struct torture_context
*tctx
,
961 struct dcerpc_pipe
*p
)
964 struct wkssvc_NetrMessageBufferSend r
;
965 const char *message
= SMBTORTURE_MESSAGE
;
969 push_ucs2_talloc(tctx
, (void **)&msg
, message
, &size
);
971 r
.in
.server_name
= dcerpc_server_name(p
);
972 r
.in
.message_name
= dcerpc_server_name(p
);
973 r
.in
.message_sender_name
= dcerpc_server_name(p
);
974 r
.in
.message_buffer
= msg
;
975 r
.in
.message_size
= size
;
977 torture_comment(tctx
, "testing NetrMessageBufferSend\n");
979 status
= dcerpc_wkssvc_NetrMessageBufferSend(p
, tctx
, &r
);
980 torture_assert_ntstatus_ok(tctx
, status
,
981 "NetrMessageBufferSend failed");
982 torture_assert_werr_ok(tctx
, r
.out
.result
,
983 "NetrMessageBufferSend failed");
987 static bool test_NetrGetJoinInformation(struct torture_context
*tctx
,
988 struct dcerpc_pipe
*p
)
991 struct wkssvc_NetrGetJoinInformation r
;
992 enum wkssvc_NetJoinStatus join_status
;
993 const char *name_buffer
= "";
995 r
.in
.server_name
= dcerpc_server_name(p
);
996 r
.in
.name_buffer
= r
.out
.name_buffer
= &name_buffer
;
997 r
.out
.name_type
= &join_status
;
999 torture_comment(tctx
, "testing NetrGetJoinInformation\n");
1001 status
= dcerpc_wkssvc_NetrGetJoinInformation(p
, tctx
, &r
);
1002 torture_assert_ntstatus_ok(tctx
, status
,
1003 "NetrGetJoinInformation failed");
1004 torture_assert_werr_ok(tctx
, r
.out
.result
,
1005 "NetrGetJoinInformation failed");
1009 static bool test_GetJoinInformation(struct torture_context
*tctx
,
1010 struct dcerpc_pipe
*p
,
1011 enum wkssvc_NetJoinStatus
*join_status_p
,
1015 struct wkssvc_NetrGetJoinInformation r
;
1016 enum wkssvc_NetJoinStatus join_status
;
1017 const char *name_buffer
= "";
1019 r
.in
.server_name
= dcerpc_server_name(p
);
1020 r
.in
.name_buffer
= r
.out
.name_buffer
= &name_buffer
;
1021 r
.out
.name_type
= &join_status
;
1023 status
= dcerpc_wkssvc_NetrGetJoinInformation(p
, tctx
, &r
);
1024 torture_assert_ntstatus_ok(tctx
, status
,
1025 "NetrGetJoinInformation failed");
1026 torture_assert_werr_ok(tctx
, r
.out
.result
,
1027 "NetrGetJoinInformation failed");
1029 if (join_status_p
) {
1030 *join_status_p
= join_status
;
1034 *name
= talloc_strdup(tctx
, name_buffer
);
1041 static bool test_NetrGetJoinableOus(struct torture_context
*tctx
,
1042 struct dcerpc_pipe
*p
)
1045 struct wkssvc_NetrGetJoinableOus r
;
1046 uint32_t num_ous
= 0;
1047 const char **ous
= NULL
;
1049 r
.in
.server_name
= dcerpc_server_name(p
);
1050 r
.in
.domain_name
= lp_workgroup(tctx
->lp_ctx
);
1051 r
.in
.Account
= NULL
;
1052 r
.in
.unknown
= NULL
;
1053 r
.in
.num_ous
= r
.out
.num_ous
= &num_ous
;
1056 torture_comment(tctx
, "testing NetrGetJoinableOus\n");
1058 status
= dcerpc_wkssvc_NetrGetJoinableOus(p
, tctx
, &r
);
1059 torture_assert_ntstatus_ok(tctx
, status
, "NetrGetJoinableOus failed");
1060 torture_assert_werr_equal(tctx
, r
.out
.result
,
1062 "NetrGetJoinableOus failed");
1067 static bool test_NetrGetJoinableOus2(struct torture_context
*tctx
,
1068 struct dcerpc_pipe
*p
)
1071 struct wkssvc_NetrGetJoinableOus2 r
;
1072 uint32_t num_ous
= 0;
1073 const char **ous
= NULL
;
1075 r
.in
.server_name
= dcerpc_server_name(p
);
1076 r
.in
.domain_name
= lp_workgroup(tctx
->lp_ctx
);
1077 r
.in
.Account
= NULL
;
1078 r
.in
.EncryptedPassword
= NULL
;
1079 r
.in
.num_ous
= r
.out
.num_ous
= &num_ous
;
1082 torture_comment(tctx
, "testing NetrGetJoinableOus2\n");
1084 status
= dcerpc_wkssvc_NetrGetJoinableOus2(p
, tctx
, &r
);
1085 torture_assert_ntstatus_ok(tctx
, status
, "NetrGetJoinableOus2 failed");
1086 torture_assert_werr_equal(tctx
, r
.out
.result
,
1087 WERR_RPC_E_REMOTE_DISABLED
,
1088 "NetrGetJoinableOus2 failed");
1093 static bool test_NetrUnjoinDomain(struct torture_context
*tctx
,
1094 struct dcerpc_pipe
*p
)
1097 struct wkssvc_NetrUnjoinDomain r
;
1098 struct cli_credentials
*creds
= cmdline_credentials
;
1099 const char *user
= cli_credentials_get_username(creds
);
1100 const char *admin_account
= NULL
;
1102 admin_account
= talloc_asprintf(tctx
, "%s\\%s",
1103 lp_workgroup(tctx
->lp_ctx
),
1106 r
.in
.server_name
= dcerpc_server_name(p
);
1107 r
.in
.Account
= admin_account
;
1108 r
.in
.password
= NULL
;
1109 r
.in
.unjoin_flags
= 0;
1111 torture_comment(tctx
, "testing NetrUnjoinDomain\n");
1113 status
= dcerpc_wkssvc_NetrUnjoinDomain(p
, tctx
, &r
);
1114 torture_assert_ntstatus_ok(tctx
, status
,
1115 "NetrUnjoinDomain failed");
1116 torture_assert_werr_equal(tctx
, r
.out
.result
, WERR_NOT_SUPPORTED
,
1117 "NetrUnjoinDomain failed");
1121 static bool test_NetrJoinDomain(struct torture_context
*tctx
,
1122 struct dcerpc_pipe
*p
)
1125 struct wkssvc_NetrJoinDomain r
;
1126 struct cli_credentials
*creds
= cmdline_credentials
;
1127 const char *user
= cli_credentials_get_username(creds
);
1128 const char *admin_account
= NULL
;
1130 admin_account
= talloc_asprintf(tctx
, "%s\\%s",
1131 lp_workgroup(tctx
->lp_ctx
),
1134 r
.in
.server_name
= dcerpc_server_name(p
);
1135 r
.in
.domain_name
= lp_realm(tctx
->lp_ctx
);
1136 r
.in
.account_ou
= NULL
;
1137 r
.in
.Account
= admin_account
;
1138 r
.in
.password
= NULL
;
1139 r
.in
.join_flags
= 0;
1141 torture_comment(tctx
, "testing NetrJoinDomain\n");
1143 status
= dcerpc_wkssvc_NetrJoinDomain(p
, tctx
, &r
);
1144 torture_assert_ntstatus_ok(tctx
, status
,
1145 "NetrJoinDomain failed");
1146 torture_assert_werr_equal(tctx
, r
.out
.result
, WERR_NOT_SUPPORTED
,
1147 "NetrJoinDomain failed");
1151 /* encode a wkssvc_PasswordBuffer for remote joining/unjoining:
1153 * similar to samr_CryptPasswordEx. Different: 8byte confounder (instead of
1154 * 16byte), confounder in front of the 516 byte buffer (instead of after that
1155 * buffer), calling MD5Update() first with session_key and then with confounder
1156 * (vice versa in samr) - Guenther */
1158 static void encode_wkssvc_join_password_buffer(TALLOC_CTX
*mem_ctx
,
1160 DATA_BLOB
*session_key
,
1161 struct wkssvc_PasswordBuffer
*pwd_buf
)
1163 uint8_t buffer
[516];
1164 struct MD5Context ctx
;
1166 DATA_BLOB confounded_session_key
= data_blob_talloc(mem_ctx
, NULL
, 16);
1168 int confounder_len
= 8;
1169 uint8_t confounder
[8];
1171 encode_pw_buffer(buffer
, pwd
, STR_UNICODE
);
1173 generate_random_buffer((uint8_t *)confounder
, confounder_len
);
1176 MD5Update(&ctx
, session_key
->data
, session_key
->length
);
1177 MD5Update(&ctx
, confounder
, confounder_len
);
1178 MD5Final(confounded_session_key
.data
, &ctx
);
1180 arcfour_crypt_blob(buffer
, 516, &confounded_session_key
);
1182 memcpy(&pwd_buf
->data
[0], confounder
, confounder_len
);
1183 memcpy(&pwd_buf
->data
[8], buffer
, 516);
1185 data_blob_free(&confounded_session_key
);
1189 * prerequisites for remotely joining an unjoined XP SP2 workstation:
1190 * - firewall needs to be disabled (or open for ncacn_np access)
1191 * - HKLM\System\CurrentControlSet\Control\Lsa\forceguest needs to 0
1193 * http://support.microsoft.com/kb/294355/EN-US/ and
1194 * http://support.microsoft.com/kb/290403/EN-US/
1197 static bool test_NetrJoinDomain2(struct torture_context
*tctx
,
1198 struct dcerpc_pipe
*p
)
1201 struct wkssvc_NetrJoinDomain2 r
;
1202 const char *domain_admin_account
= NULL
;
1203 const char *domain_admin_password
= NULL
;
1204 const char *domain_name
= NULL
;
1205 struct wkssvc_PasswordBuffer pwd_buf
;
1206 enum wkssvc_NetJoinStatus join_status
;
1207 const char *join_name
= NULL
;
1208 WERROR expected_err
;
1209 DATA_BLOB session_key
;
1211 /* FIXME: this test assumes to join workstations / servers and does not
1212 * handle DCs (WERR_SETUP_DOMAIN_CONTROLLER) */
1214 if (!test_GetJoinInformation(tctx
, p
, &join_status
, &join_name
))
1219 switch (join_status
) {
1220 case NET_SETUP_DOMAIN_NAME
:
1221 expected_err
= WERR_SETUP_ALREADY_JOINED
;
1223 case NET_SETUP_UNKNOWN_STATUS
:
1224 case NET_SETUP_UNJOINED
:
1225 case NET_SETUP_WORKGROUP_NAME
:
1227 expected_err
= WERR_OK
;
1231 domain_admin_account
= torture_setting_string(tctx
, "domain_admin_account", NULL
);
1233 domain_admin_password
= torture_setting_string(tctx
, "domain_admin_password", NULL
);
1235 domain_name
= torture_setting_string(tctx
, "domain_name", NULL
);
1237 if ((domain_admin_account
== NULL
) ||
1238 (domain_admin_password
== NULL
) ||
1239 (domain_name
== NULL
)) {
1240 torture_comment(tctx
, "not enough input parameter\n");
1244 status
= dcerpc_fetch_session_key(p
, &session_key
);
1245 if (!NT_STATUS_IS_OK(status
)) {
1249 encode_wkssvc_join_password_buffer(tctx
, domain_admin_password
,
1250 &session_key
, &pwd_buf
);
1252 r
.in
.server_name
= dcerpc_server_name(p
);
1253 r
.in
.domain_name
= domain_name
;
1254 r
.in
.account_ou
= NULL
;
1255 r
.in
.admin_account
= domain_admin_account
;
1256 r
.in
.encrypted_password
= &pwd_buf
;
1257 r
.in
.join_flags
= WKSSVC_JOIN_FLAGS_JOIN_TYPE
|
1258 WKSSVC_JOIN_FLAGS_ACCOUNT_CREATE
;
1260 torture_comment(tctx
, "testing NetrJoinDomain2 (assuming non-DC)\n");
1262 status
= dcerpc_wkssvc_NetrJoinDomain2(p
, tctx
, &r
);
1263 torture_assert_ntstatus_ok(tctx
, status
,
1264 "NetrJoinDomain2 failed");
1265 torture_assert_werr_equal(tctx
, r
.out
.result
, expected_err
,
1266 "NetrJoinDomain2 failed");
1268 if (!test_GetJoinInformation(tctx
, p
, &join_status
, &join_name
))
1273 if (join_status
!= NET_SETUP_DOMAIN_NAME
) {
1274 torture_comment(tctx
,
1275 "Join verify failed: got %d\n", join_status
);
1282 static bool test_NetrUnjoinDomain2(struct torture_context
*tctx
,
1283 struct dcerpc_pipe
*p
)
1286 struct wkssvc_NetrUnjoinDomain2 r
;
1287 const char *domain_admin_account
= NULL
;
1288 const char *domain_admin_password
= NULL
;
1289 struct wkssvc_PasswordBuffer pwd_buf
;
1290 enum wkssvc_NetJoinStatus join_status
;
1291 const char *join_name
= NULL
;
1292 WERROR expected_err
;
1293 DATA_BLOB session_key
;
1295 /* FIXME: this test assumes to join workstations / servers and does not
1296 * handle DCs (WERR_SETUP_DOMAIN_CONTROLLER) */
1298 if (!test_GetJoinInformation(tctx
, p
, &join_status
, &join_name
))
1303 switch (join_status
) {
1304 case NET_SETUP_UNJOINED
:
1305 expected_err
= WERR_SETUP_NOT_JOINED
;
1307 case NET_SETUP_DOMAIN_NAME
:
1308 case NET_SETUP_UNKNOWN_STATUS
:
1309 case NET_SETUP_WORKGROUP_NAME
:
1311 expected_err
= WERR_OK
;
1315 domain_admin_account
= torture_setting_string(tctx
, "domain_admin_account", NULL
);
1317 domain_admin_password
= torture_setting_string(tctx
, "domain_admin_password", NULL
);
1319 if ((domain_admin_account
== NULL
) ||
1320 (domain_admin_password
== NULL
)) {
1321 torture_comment(tctx
, "not enough input parameter\n");
1325 status
= dcerpc_fetch_session_key(p
, &session_key
);
1326 if (!NT_STATUS_IS_OK(status
)) {
1330 encode_wkssvc_join_password_buffer(tctx
, domain_admin_password
,
1331 &session_key
, &pwd_buf
);
1333 r
.in
.server_name
= dcerpc_server_name(p
);
1334 r
.in
.account
= domain_admin_account
;
1335 r
.in
.encrypted_password
= &pwd_buf
;
1336 r
.in
.unjoin_flags
= 0;
1338 torture_comment(tctx
, "testing NetrUnjoinDomain2 (assuming non-DC)\n");
1340 status
= dcerpc_wkssvc_NetrUnjoinDomain2(p
, tctx
, &r
);
1341 torture_assert_ntstatus_ok(tctx
, status
,
1342 "NetrUnjoinDomain2 failed");
1343 torture_assert_werr_equal(tctx
, r
.out
.result
, expected_err
,
1344 "NetrUnjoinDomain2 failed");
1346 if (!test_GetJoinInformation(tctx
, p
, &join_status
, &join_name
))
1351 switch (join_status
) {
1352 case NET_SETUP_UNJOINED
:
1353 case NET_SETUP_WORKGROUP_NAME
:
1355 case NET_SETUP_UNKNOWN_STATUS
:
1356 case NET_SETUP_DOMAIN_NAME
:
1358 torture_comment(tctx
,
1359 "Unjoin verify failed: got %d\n", join_status
);
1367 struct torture_suite
*torture_rpc_wkssvc(TALLOC_CTX
*mem_ctx
)
1369 struct torture_suite
*suite
;
1370 struct torture_rpc_tcase
*tcase
;
1371 struct torture_test
*test
;
1373 suite
= torture_suite_create(mem_ctx
, "WKSSVC");
1374 tcase
= torture_suite_add_rpc_iface_tcase(suite
, "wkssvc",
1377 torture_rpc_tcase_add_test(tcase
, "NetWkstaGetInfo",
1378 test_NetWkstaGetInfo
);
1380 torture_rpc_tcase_add_test(tcase
, "NetWkstaTransportEnum",
1381 test_NetWkstaTransportEnum
);
1382 torture_rpc_tcase_add_test(tcase
, "NetrWkstaTransportDel",
1383 test_NetrWkstaTransportDel
);
1384 torture_rpc_tcase_add_test(tcase
, "NetrWkstaTransportAdd",
1385 test_NetrWkstaTransportAdd
);
1387 torture_rpc_tcase_add_test(tcase
, "NetWkstaEnumUsers",
1388 test_NetWkstaEnumUsers
);
1389 torture_rpc_tcase_add_test(tcase
, "NetrWkstaUserGetInfo",
1390 test_NetrWkstaUserGetInfo
);
1392 torture_rpc_tcase_add_test(tcase
, "NetrUseDel",
1394 torture_rpc_tcase_add_test(tcase
, "NetrUseGetInfo",
1395 test_NetrUseGetInfo
);
1396 torture_rpc_tcase_add_test(tcase
, "NetrUseEnum",
1398 torture_rpc_tcase_add_test(tcase
, "NetrUseAdd",
1401 torture_rpc_tcase_add_test(tcase
, "NetrValidateName",
1402 test_NetrValidateName
);
1403 torture_rpc_tcase_add_test(tcase
, "NetrValidateName2",
1404 test_NetrValidateName2
);
1405 torture_rpc_tcase_add_test(tcase
, "NetrLogonDomainNameDel",
1406 test_NetrLogonDomainNameDel
);
1407 torture_rpc_tcase_add_test(tcase
, "NetrLogonDomainNameAdd",
1408 test_NetrLogonDomainNameAdd
);
1409 torture_rpc_tcase_add_test(tcase
, "NetrRemoveAlternateComputerName",
1410 test_NetrRemoveAlternateComputerName
);
1411 torture_rpc_tcase_add_test(tcase
, "NetrAddAlternateComputerName",
1412 test_NetrAddAlternateComputerName
);
1413 test
= torture_rpc_tcase_add_test(tcase
, "NetrSetPrimaryComputername",
1414 test_NetrSetPrimaryComputername
);
1415 test
->dangerous
= true;
1416 test
= torture_rpc_tcase_add_test(tcase
, "NetrRenameMachineInDomain",
1417 test_NetrRenameMachineInDomain
);
1418 test
->dangerous
= true;
1419 test
= torture_rpc_tcase_add_test(tcase
, "NetrRenameMachineInDomain2",
1420 test_NetrRenameMachineInDomain2
);
1421 test
->dangerous
= true;
1422 torture_rpc_tcase_add_test(tcase
, "NetrEnumerateComputerNames",
1423 test_NetrEnumerateComputerNames
);
1425 test
= torture_rpc_tcase_add_test(tcase
, "NetrJoinDomain2",
1426 test_NetrJoinDomain2
);
1427 test
->dangerous
= true;
1428 test
= torture_rpc_tcase_add_test(tcase
, "NetrUnjoinDomain2",
1429 test_NetrUnjoinDomain2
);
1430 test
->dangerous
= true;
1432 torture_rpc_tcase_add_test(tcase
, "NetrJoinDomain",
1433 test_NetrJoinDomain
);
1434 test
->dangerous
= true;
1435 torture_rpc_tcase_add_test(tcase
, "NetrUnjoinDomain",
1436 test_NetrUnjoinDomain
);
1437 test
->dangerous
= true;
1438 torture_rpc_tcase_add_test(tcase
, "NetrGetJoinInformation",
1439 test_NetrGetJoinInformation
);
1440 torture_rpc_tcase_add_test(tcase
, "NetrGetJoinableOus",
1441 test_NetrGetJoinableOus
);
1442 torture_rpc_tcase_add_test(tcase
, "NetrGetJoinableOus2",
1443 test_NetrGetJoinableOus2
);
1445 torture_rpc_tcase_add_test(tcase
, "NetrWorkstationStatisticsGet",
1446 test_NetrWorkstationStatisticsGet
);
1447 torture_rpc_tcase_add_test(tcase
, "NetrMessageBufferSend",
1448 test_NetrMessageBufferSend
);