From 46d29fe088714fb4dc2c7e3b5ba2c121ac9f951d Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 19 Sep 2009 08:25:41 -0700 Subject: [PATCH] s4-netlogon: implement dcesrv_netr_DsRAddressToSitenamesExW We don't implement sites properly at the moment so we just return Default-First-Site-Name --- source4/rpc_server/netlogon/dcerpc_netlogon.c | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/source4/rpc_server/netlogon/dcerpc_netlogon.c b/source4/rpc_server/netlogon/dcerpc_netlogon.c index baba4157e62..ab7cc340992 100644 --- a/source4/rpc_server/netlogon/dcerpc_netlogon.c +++ b/source4/rpc_server/netlogon/dcerpc_netlogon.c @@ -1529,9 +1529,31 @@ static WERROR dcesrv_netr_NetrEnumerateTrustedDomainsEx(struct dcesrv_call_state netr_DsRAddressToSitenamesExW */ static WERROR dcesrv_netr_DsRAddressToSitenamesExW(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, - struct netr_DsRAddressToSitenamesExW *r) + struct netr_DsRAddressToSitenamesExW *r) { - DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR); + struct netr_DsRAddressToSitenamesExWCtr *ctr; + int i; + + /* we should map the provided IPs to site names, once we have + * sites support + */ + ctr = talloc(mem_ctx, struct netr_DsRAddressToSitenamesExWCtr); + W_ERROR_HAVE_NO_MEMORY(ctr); + + *r->out.ctr = ctr; + + ctr->count = r->in.count; + ctr->sitename = talloc_array(ctr, struct lsa_String, ctr->count); + W_ERROR_HAVE_NO_MEMORY(ctr->sitename); + ctr->subnetname = talloc_array(ctr, struct lsa_String, ctr->count); + W_ERROR_HAVE_NO_MEMORY(ctr->subnetname); + + for (i=0; icount; i++) { + ctr->sitename[i].string = "Default-First-Site-Name"; + ctr->subnetname[i].string = NULL; + } + + return WERR_OK; } -- 2.11.4.GIT