summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2007-11-27 10:29:19 +0100
committerStefan Metzmacher <metze@samba.org>2007-12-21 05:46:24 +0100
commitb653bea814d4a738a0fc5082945b9d619e21ceb7 (patch)
treeb72dec0a663002e5d1f3d9ae785559ca84d18ebd
parent5c76e9b41858e0e3bc712b1d1c6e6b4d94f028d2 (diff)
downloadsamba-b653bea814d4a738a0fc5082945b9d619e21ceb7.tar.gz
samba-b653bea814d4a738a0fc5082945b9d619e21ceb7.tar.bz2
samba-b653bea814d4a738a0fc5082945b9d619e21ceb7.zip
r26150: Add IDL and torture test for wkssvc_NetrLogonDomainNameAdd() and
wkssvc_NetrLogonDomainNameDel(), both unsupported on w2k3. Guenther (This used to be commit 9e1ed6eb68ae899aa577fc3a2e4cbfe066ee403e)
-rw-r--r--source4/librpc/idl/wkssvc.idl8
-rw-r--r--source4/rpc_server/wkssvc/dcesrv_wkssvc.c16
-rw-r--r--source4/torture/rpc/wkssvc.c41
3 files changed, 55 insertions, 10 deletions
diff --git a/source4/librpc/idl/wkssvc.idl b/source4/librpc/idl/wkssvc.idl
index 08fea33e8d..cabd8a210d 100644
--- a/source4/librpc/idl/wkssvc.idl
+++ b/source4/librpc/idl/wkssvc.idl
@@ -380,11 +380,15 @@ import "srvsvc.idl";
/*****************************/
/* Function 0x0e */
- WERROR WKSSVC_NETRLOGONDOMAINNAMEADD ();
+ WERROR wkssvc_NetrLogonDomainNameAdd(
+ [in,ref] [string,charset(UTF16)] uint16 *domain_name
+ );
/*****************************/
/* Function 0x0f */
- WERROR WKSSVC_NETRLOGONDOMAINNAMEDEL ();
+ WERROR wkssvc_NetrLogonDomainNameDel(
+ [in,ref] [string,charset(UTF16)] uint16 *domain_name
+ );
/*****************************/
/* Function 0x10 */
diff --git a/source4/rpc_server/wkssvc/dcesrv_wkssvc.c b/source4/rpc_server/wkssvc/dcesrv_wkssvc.c
index 99a50d3d26..3ab02c1047 100644
--- a/source4/rpc_server/wkssvc/dcesrv_wkssvc.c
+++ b/source4/rpc_server/wkssvc/dcesrv_wkssvc.c
@@ -242,21 +242,21 @@ static WERROR dcesrv_WKSSVC_NETRWORKSTATIONSTATISTICSGET(struct dcesrv_call_stat
}
-/*
- WKSSVC_NETRLOGONDOMAINNAMEADD
+/*
+ wkssvc_NetrLogonDomainNameAdd
*/
-static WERROR dcesrv_WKSSVC_NETRLOGONDOMAINNAMEADD(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
- struct WKSSVC_NETRLOGONDOMAINNAMEADD *r)
+static WERROR dcesrv_wkssvc_NetrLogonDomainNameAdd(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+ struct wkssvc_NetrLogonDomainNameAdd *r)
{
DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
}
-/*
- WKSSVC_NETRLOGONDOMAINNAMEDEL
+/*
+ wkssvc_NetrLogonDomainNameDel
*/
-static WERROR dcesrv_WKSSVC_NETRLOGONDOMAINNAMEDEL(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
- struct WKSSVC_NETRLOGONDOMAINNAMEDEL *r)
+static WERROR dcesrv_wkssvc_NetrLogonDomainNameDel(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+ struct wkssvc_NetrLogonDomainNameDel *r)
{
DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
}
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;
}