summaryrefslogtreecommitdiff
path: root/source4/rpc_server/browser
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2008-12-06 14:19:58 +0100
committerStefan Metzmacher <metze@samba.org>2008-12-06 14:56:49 +0100
commitf8bbdb100ba9293e45f345d12e92d693e079e6e1 (patch)
treecc0ab619a6c55edc1cebf7a3ab24b2405d75499b /source4/rpc_server/browser
parent6627080e0015acff5cfaf283f342c18fcba59117 (diff)
downloadsamba-f8bbdb100ba9293e45f345d12e92d693e079e6e1.tar.gz
s4:dcesrv_browser: implement dcesrv_BrowserrQueryOtherDomains()
metze
Diffstat (limited to 'source4/rpc_server/browser')
-rw-r--r--source4/rpc_server/browser/dcesrv_browser.c25
1 files changed, 24 insertions, 1 deletions
diff --git a/source4/rpc_server/browser/dcesrv_browser.c b/source4/rpc_server/browser/dcesrv_browser.c
index b67bfa398f4..33fed508575 100644
--- a/source4/rpc_server/browser/dcesrv_browser.c
+++ b/source4/rpc_server/browser/dcesrv_browser.c
@@ -51,7 +51,30 @@ static void dcesrv_BrowserrDebugCall(struct dcesrv_call_state *dce_call, TALLOC_
static WERROR dcesrv_BrowserrQueryOtherDomains(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct BrowserrQueryOtherDomains *r)
{
- DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
+ struct BrowserrSrvInfo100Ctr *ctr100;
+
+ switch (r->in.info->level) {
+ case 100:
+ if (!r->in.info->info.info100) {
+ return WERR_INVALID_PARAM;
+ }
+
+ ctr100 = talloc(mem_ctx, struct BrowserrSrvInfo100Ctr);
+ W_ERROR_HAVE_NO_MEMORY(ctr100);
+
+ ctr100->entries_read = 0;
+ ctr100->entries = talloc_zero_array(ctr100, struct srvsvc_NetSrvInfo100,
+ ctr100->entries_read);
+ W_ERROR_HAVE_NO_MEMORY(ctr100->entries);
+
+ r->out.info->info.info100 = ctr100;
+ *r->out.total_entries = ctr100->entries_read;
+ return WERR_OK;
+ default:
+ return WERR_UNKNOWN_LEVEL;
+ }
+
+ return WERR_INVALID_PARAM;
}