diff options
author | Günther Deschner <gd@samba.org> | 2007-11-27 12:18:23 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2007-12-21 05:46:31 +0100 |
commit | 616a48faf94438a5e92538d7a7a9de9cf4fcc6a8 (patch) | |
tree | 659a974aba28795f0a5bd181fea1eb7854fa2c0e /source4/torture | |
parent | f287d5dcc9e6790008ad8d7cceaee976cd7d5d81 (diff) | |
download | samba-616a48faf94438a5e92538d7a7a9de9cf4fcc6a8.tar.gz samba-616a48faf94438a5e92538d7a7a9de9cf4fcc6a8.tar.bz2 samba-616a48faf94438a5e92538d7a7a9de9cf4fcc6a8.zip |
r26165: Add IDL and torture test for wkssvc_NetrGetJoinableOus() and
wkssvc_NetrGetJoinableOus2() (both unavailable remotely).
Guenther
(This used to be commit 256d0a15f50b38aec9505e6431d05c6f715df971)
Diffstat (limited to 'source4/torture')
-rw-r--r-- | source4/torture/rpc/wkssvc.c | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/source4/torture/rpc/wkssvc.c b/source4/torture/rpc/wkssvc.c index 4ab6b79ce6..f0af7426fd 100644 --- a/source4/torture/rpc/wkssvc.c +++ b/source4/torture/rpc/wkssvc.c @@ -1000,6 +1000,57 @@ static bool test_NetrGetJoinInformation(struct torture_context *tctx, return true; } +static bool test_NetrGetJoinableOus(struct torture_context *tctx, + struct dcerpc_pipe *p) +{ + NTSTATUS status; + struct wkssvc_NetrGetJoinableOus r; + uint32_t num_ous = 0; + const char **ous = NULL; + + r.in.server_name = dcerpc_server_name(p); + r.in.domain_name = lp_workgroup(global_loadparm); + r.in.Account = NULL; + r.in.unknown = NULL; + r.in.num_ous = r.out.num_ous = &num_ous; + r.out.ous = &ous; + + torture_comment(tctx, "testing NetrGetJoinableOus\n"); + + status = dcerpc_wkssvc_NetrGetJoinableOus(p, tctx, &r); + torture_assert_ntstatus_ok(tctx, status, "NetrGetJoinableOus failed"); + torture_assert_werr_equal(tctx, r.out.result, + WERR_NOT_SUPPORTED, + "NetrGetJoinableOus failed"); + + return true; +} + +static bool test_NetrGetJoinableOus2(struct torture_context *tctx, + struct dcerpc_pipe *p) +{ + NTSTATUS status; + struct wkssvc_NetrGetJoinableOus2 r; + uint32_t num_ous = 0; + const char **ous = NULL; + + r.in.server_name = dcerpc_server_name(p); + r.in.domain_name = lp_workgroup(global_loadparm); + r.in.Account = NULL; + r.in.EncryptedPassword = NULL; + r.in.num_ous = r.out.num_ous = &num_ous; + r.out.ous = &ous; + + torture_comment(tctx, "testing NetrGetJoinableOus2\n"); + + status = dcerpc_wkssvc_NetrGetJoinableOus2(p, tctx, &r); + torture_assert_ntstatus_ok(tctx, status, "NetrGetJoinableOus2 failed"); + torture_assert_werr_equal(tctx, r.out.result, + WERR_RPC_E_REMOTE_DISABLED, + "NetrGetJoinableOus2 failed"); + + return true; +} struct torture_suite *torture_rpc_wkssvc(TALLOC_CTX *mem_ctx) { struct torture_suite *suite; @@ -1060,6 +1111,10 @@ struct torture_suite *torture_rpc_wkssvc(TALLOC_CTX *mem_ctx) torture_rpc_tcase_add_test(tcase, "NetrGetJoinInformation", test_NetrGetJoinInformation); + torture_rpc_tcase_add_test(tcase, "NetrGetJoinableOus", + test_NetrGetJoinableOus); + torture_rpc_tcase_add_test(tcase, "NetrGetJoinableOus2", + test_NetrGetJoinableOus2); torture_rpc_tcase_add_test(tcase, "NetrWorkstationStatisticsGet", test_NetrWorkstationStatisticsGet); |