summaryrefslogtreecommitdiff
path: root/source4/rpc_server
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2009-09-19 08:25:41 -0700
committerAndrew Tridgell <tridge@samba.org>2009-09-19 08:25:41 -0700
commit46d29fe088714fb4dc2c7e3b5ba2c121ac9f951d (patch)
tree7951f9b5c7485063078e46a5f0e0b40d1c143c5f /source4/rpc_server
parent92786aebf1b8aa17612ebaf5dd0ee8cd4abf9616 (diff)
downloadsamba-46d29fe088714fb4dc2c7e3b5ba2c121ac9f951d.tar.gz
samba-46d29fe088714fb4dc2c7e3b5ba2c121ac9f951d.tar.bz2
samba-46d29fe088714fb4dc2c7e3b5ba2c121ac9f951d.zip
s4-netlogon: implement dcesrv_netr_DsRAddressToSitenamesExW
We don't implement sites properly at the moment so we just return Default-First-Site-Name
Diffstat (limited to 'source4/rpc_server')
-rw-r--r--source4/rpc_server/netlogon/dcerpc_netlogon.c26
1 files changed, 24 insertions, 2 deletions
diff --git a/source4/rpc_server/netlogon/dcerpc_netlogon.c b/source4/rpc_server/netlogon/dcerpc_netlogon.c
index baba4157e6..ab7cc34099 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; i<ctr->count; i++) {
+ ctr->sitename[i].string = "Default-First-Site-Name";
+ ctr->subnetname[i].string = NULL;
+ }
+
+ return WERR_OK;
}