From b653bea814d4a738a0fc5082945b9d619e21ceb7 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Tue, 27 Nov 2007 10:29:19 +0100 Subject: r26150: Add IDL and torture test for wkssvc_NetrLogonDomainNameAdd() and wkssvc_NetrLogonDomainNameDel(), both unsupported on w2k3. Guenther (This used to be commit 9e1ed6eb68ae899aa577fc3a2e4cbfe066ee403e) --- source4/torture/rpc/wkssvc.c | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) (limited to 'source4/torture/rpc') diff --git a/source4/torture/rpc/wkssvc.c b/source4/torture/rpc/wkssvc.c index c1e08d396b..f40af73538 100644 --- a/source4/torture/rpc/wkssvc.c +++ b/source4/torture/rpc/wkssvc.c @@ -468,6 +468,42 @@ static bool test_NetrUseGetInfo(struct torture_context *tctx, return true; } +static bool test_NetrLogonDomainNameAdd(struct torture_context *tctx, + struct dcerpc_pipe *p) +{ + NTSTATUS status; + struct wkssvc_NetrLogonDomainNameAdd r; + + r.in.domain_name = lp_workgroup(global_loadparm); + + torture_comment(tctx, "testing NetrLogonDomainNameAdd\n"); + + status = dcerpc_wkssvc_NetrLogonDomainNameAdd(p, tctx, &r); + torture_assert_ntstatus_ok(tctx, status, + "NetrLogonDomainNameAdd failed"); + torture_assert_werr_equal(tctx, r.out.result, WERR_NOT_SUPPORTED, + "NetrLogonDomainNameAdd failed"); + return true; +} + +static bool test_NetrLogonDomainNameDel(struct torture_context *tctx, + struct dcerpc_pipe *p) +{ + NTSTATUS status; + struct wkssvc_NetrLogonDomainNameDel r; + + r.in.domain_name = lp_workgroup(global_loadparm); + + torture_comment(tctx, "testing NetrLogonDomainNameDel\n"); + + status = dcerpc_wkssvc_NetrLogonDomainNameDel(p, tctx, &r); + torture_assert_ntstatus_ok(tctx, status, + "NetrLogonDomainNameDel failed"); + torture_assert_werr_equal(tctx, r.out.result, WERR_NOT_SUPPORTED, + "NetrLogonDomainNameDel failed"); + return true; +} + struct torture_suite *torture_rpc_wkssvc(TALLOC_CTX *mem_ctx) { struct torture_suite *suite; @@ -501,5 +537,10 @@ struct torture_suite *torture_rpc_wkssvc(TALLOC_CTX *mem_ctx) torture_rpc_tcase_add_test(tcase, "NetrUseAdd", test_NetrUseAdd); + torture_rpc_tcase_add_test(tcase, "NetrLogonDomainNameDel", + test_NetrLogonDomainNameDel); + torture_rpc_tcase_add_test(tcase, "NetrLogonDomainNameAdd", + test_NetrLogonDomainNameAdd); + return suite; } -- cgit