summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2007-05-30 10:24:40 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:53:06 -0500
commitadf23c651b120d3bfe67a551d0569705831999b8 (patch)
treeb2e2fe16760b7ad6ecfbefb826bea6e18e5b0d46
parent4d1a21f24d9d2f4326e380cadb24c842c2dfb688 (diff)
downloadsamba-adf23c651b120d3bfe67a551d0569705831999b8.tar.gz
samba-adf23c651b120d3bfe67a551d0569705831999b8.tar.bz2
samba-adf23c651b120d3bfe67a551d0569705831999b8.zip
r23240: Fill in netr_DsrGetDcSiteCoverageW.
Guenther (This used to be commit 9c2b9642336ed954c8f9fc0ccce95547d7c18aa8)
-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);