summaryrefslogtreecommitdiffstats
path: root/source4/rpc_server/browser/dcesrv_browser.c
blob: 1ce4652df70ad26b16e065ef05f2bb43dcd8dfb6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
/*
   Unix SMB/CIFS implementation.

   endpoint server for the browser pipe

   Copyright (C) Stefan Metzmacher 2008

   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 3 of the License, or
   (at your option) any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

#include "includes.h"
#include "rpc_server/dcerpc_server.h"
#include "librpc/gen_ndr/ndr_browser.h"


/*
  BrowserrServerEnum
*/
static void dcesrv_BrowserrServerEnum(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
		       struct BrowserrServerEnum *r)
{
	DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
}


/*
  BrowserrDebugCall
*/
static void dcesrv_BrowserrDebugCall(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
		       struct BrowserrDebugCall *r)
{
	DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
}


/*
  BrowserrQueryOtherDomains
*/
static WERROR dcesrv_BrowserrQueryOtherDomains(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
		       struct BrowserrQueryOtherDomains *r)
{
	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;
	}
}


/*
  BrowserrResetNetlogonState
*/
static void dcesrv_BrowserrResetNetlogonState(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
		       struct BrowserrResetNetlogonState *r)
{
	DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
}


/*
  BrowserrDebugTrace
*/
static void dcesrv_BrowserrDebugTrace(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
		       struct BrowserrDebugTrace *r)
{
	DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
}


/*
  BrowserrQueryStatistics
*/
static void dcesrv_BrowserrQueryStatistics(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
		       struct BrowserrQueryStatistics *r)
{
	DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
}


/*
  BrowserResetStatistics
*/
static void dcesrv_BrowserResetStatistics(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
		       struct BrowserResetStatistics *r)
{
	DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
}


/*
  NetrBrowserStatisticsClear
*/
static void dcesrv_NetrBrowserStatisticsClear(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
		       struct NetrBrowserStatisticsClear *r)
{
	DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
}


/*
  NetrBrowserStatisticsGet
*/
static void dcesrv_NetrBrowserStatisticsGet(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
		       struct NetrBrowserStatisticsGet *r)
{
	DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
}


/*
  BrowserrSetNetlogonState
*/
static void dcesrv_BrowserrSetNetlogonState(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
		       struct BrowserrSetNetlogonState *r)
{
	DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
}


/*
  BrowserrQueryEmulatedDomains
*/
static void dcesrv_BrowserrQueryEmulatedDomains(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
		       struct BrowserrQueryEmulatedDomains *r)
{
	DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
}


/*
  BrowserrServerEnumEx
*/
static void dcesrv_BrowserrServerEnumEx(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
		       struct BrowserrServerEnumEx *r)
{
	DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
}


/* include the generated boilerplate */
#include "librpc/gen_ndr/ndr_browser_s.c"