summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/librpc/idl/netlogon.idl11
-rw-r--r--source4/rpc_server/netlogon/dcerpc_netlogon.c6
-rw-r--r--source4/torture/rpc/netlogon.c26
3 files changed, 38 insertions, 5 deletions
diff --git a/source4/librpc/idl/netlogon.idl b/source4/librpc/idl/netlogon.idl
index 6f860a8ca4..b83454908e 100644
--- a/source4/librpc/idl/netlogon.idl
+++ b/source4/librpc/idl/netlogon.idl
@@ -1145,7 +1145,16 @@ interface netlogon
/****************/
/* Function 0x26 */
- WERROR netr_DSRGETDCSITECOVERAGEW();
+
+ typedef struct {
+ uint32 num_sites;
+ [size_is(num_sites)] [unique] lsa_String *sites;
+ } DcSitesCtr;
+
+ WERROR netr_DsrGetDcSiteCoverageW(
+ [in] [string,charset(UTF16)] uint16 *server_name,
+ [out] DcSitesCtr *ctr
+ );
/****************/
/* Function 0x27 */
diff --git a/source4/rpc_server/netlogon/dcerpc_netlogon.c b/source4/rpc_server/netlogon/dcerpc_netlogon.c
index 619f678b3f..38356f7260 100644
--- a/source4/rpc_server/netlogon/dcerpc_netlogon.c
+++ b/source4/rpc_server/netlogon/dcerpc_netlogon.c
@@ -1119,10 +1119,10 @@ static WERROR dcesrv_netr_DSRADDRESSTOSITENAMESEXW(struct dcesrv_call_state *dce
/*
- netr_DSRGETDCSITECOVERAGEW
+ netr_DsrGetDcSiteCoverageW
*/
-static WERROR dcesrv_netr_DSRGETDCSITECOVERAGEW(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
- struct netr_DSRGETDCSITECOVERAGEW *r)
+static WERROR dcesrv_netr_DsrGetDcSiteCoverageW(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+ struct netr_DsrGetDcSiteCoverageW *r)
{
DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
}
diff --git a/source4/torture/rpc/netlogon.c b/source4/torture/rpc/netlogon.c
index 967b615bc3..2c566d38ce 100644
--- a/source4/torture/rpc/netlogon.c
+++ b/source4/torture/rpc/netlogon.c
@@ -594,7 +594,6 @@ BOOL test_netlogon_ops(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
}
-
return ret;
}
@@ -1318,6 +1317,30 @@ static BOOL test_netr_DsRGetDCNameEx2(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx
return ret;
}
+static BOOL test_netr_DsrGetDcSiteCoverageW(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
+{
+ NTSTATUS status;
+ struct netr_DsrGetDcSiteCoverageW r;
+ BOOL ret = True;
+
+ if (lp_parm_bool(-1, "torture", "samba4", False)) {
+ printf("skipping DsrGetDcSiteCoverageW test against Samba4\n");
+ return True;
+ }
+
+ r.in.server_name = "";
+ printf("Testing netr_DsrGetDcSiteCoverageW\n");
+
+ status = dcerpc_netr_DsrGetDcSiteCoverageW(p, mem_ctx, &r);
+ if (!NT_STATUS_IS_OK(status) || !W_ERROR_IS_OK(r.out.result)) {
+ printf("netr_DsrGetDcSiteCoverageW - %s/%s\n",
+ nt_errstr(status), win_errstr(r.out.result));
+ ret = False;
+ }
+ return ret;
+}
+
+
static BOOL test_GetDomainInfo(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
{
NTSTATUS status;
@@ -1605,6 +1628,7 @@ BOOL torture_rpc_netlogon(struct torture_context *torture)
ret &= test_netr_DsRGetDCName(p, mem_ctx);
ret &= test_netr_DsRGetDCNameEx(p, mem_ctx);
ret &= test_netr_DsRGetDCNameEx2(p, mem_ctx);
+ ret &= test_netr_DsrGetDcSiteCoverageW(p, mem_ctx);
talloc_free(mem_ctx);