summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-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;
}