Line data Source code
1 : /* s3 compat server functions auto-generated by pidl */
2 : #include "bin/default/librpc/gen_ndr/ndr_eventlog.h"
3 : #include "bin/default/librpc/gen_ndr/ndr_eventlog_scompat.h"
4 : #include <librpc/rpc/dcesrv_core.h>
5 : #include <rpc_server/rpc_config.h>
6 : #include <rpc_server/rpc_server.h>
7 : #include <util/debug.h>
8 :
9 : enum s3compat_rpc_dispatch {
10 : S3COMPAT_RPC_DISPATCH_EXTERNAL = 0x00000001,
11 : S3COMPAT_RPC_DISPATCH_INTERNAL = 0x00000002,
12 : };
13 :
14 : /* eventlog - dcerpc server boilerplate generated by pidl */
15 4 : static NTSTATUS eventlog__op_bind(struct dcesrv_connection_context *context, const struct dcesrv_interface *iface)
16 : {
17 : #ifdef DCESRV_INTERFACE_EVENTLOG_BIND
18 : return DCESRV_INTERFACE_EVENTLOG_BIND(context,iface);
19 : #else
20 4 : return NT_STATUS_OK;
21 : #endif
22 : }
23 :
24 4 : static void eventlog__op_unbind(struct dcesrv_connection_context *context, const struct dcesrv_interface *iface)
25 : {
26 : #ifdef DCESRV_INTERFACE_EVENTLOG_UNBIND
27 : DCESRV_INTERFACE_EVENTLOG_UNBIND(context, iface);
28 : #else
29 4 : return;
30 : #endif
31 : }
32 :
33 52 : NTSTATUS eventlog__op_ndr_pull(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, struct ndr_pull *pull, void **r)
34 : {
35 0 : enum ndr_err_code ndr_err;
36 52 : uint16_t opnum = dce_call->pkt.u.request.opnum;
37 :
38 52 : dce_call->fault_code = 0;
39 :
40 52 : if (opnum >= ndr_table_eventlog.num_calls) {
41 0 : dce_call->fault_code = DCERPC_FAULT_OP_RNG_ERROR;
42 0 : return NT_STATUS_NET_WRITE_FAULT;
43 : }
44 :
45 52 : *r = talloc_named(mem_ctx, ndr_table_eventlog.calls[opnum].struct_size, "struct %s", ndr_table_eventlog.calls[opnum].name);
46 52 : NT_STATUS_HAVE_NO_MEMORY(*r);
47 :
48 : /* unravel the NDR for the packet */
49 52 : ndr_err = ndr_table_eventlog.calls[opnum].ndr_pull(pull, NDR_IN, *r);
50 52 : if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
51 0 : dce_call->fault_code = DCERPC_FAULT_NDR;
52 0 : return NT_STATUS_NET_WRITE_FAULT;
53 : }
54 :
55 52 : return NT_STATUS_OK;
56 : }
57 :
58 52 : static NTSTATUS eventlog__op_dispatch_internal(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, void *r, enum s3compat_rpc_dispatch dispatch)
59 : {
60 52 : uint16_t opnum = dce_call->pkt.u.request.opnum;
61 52 : struct pipes_struct *p = NULL;
62 52 : NTSTATUS status = NT_STATUS_OK;
63 52 : bool impersonated = false;
64 :
65 : /* Retrieve pipes struct */
66 52 : p = dcesrv_get_pipes_struct(dce_call->conn);
67 52 : p->dce_call = dce_call;
68 52 : p->mem_ctx = mem_ctx;
69 : /* Reset pipes struct fault state */
70 52 : p->fault_state = 0;
71 :
72 : /* Impersonate */
73 52 : if (dispatch == S3COMPAT_RPC_DISPATCH_EXTERNAL) {
74 52 : impersonated = become_authenticated_pipe_user(dce_call->auth_state->session_info);
75 52 : if (!impersonated) {
76 0 : dce_call->fault_code = DCERPC_FAULT_ACCESS_DENIED;
77 0 : status = NT_STATUS_NET_WRITE_FAULT;
78 0 : goto fail;
79 : }
80 : }
81 :
82 52 : switch (opnum) {
83 0 : case 0: { /* eventlog_ClearEventLogW */
84 0 : struct eventlog_ClearEventLogW *r2 = (struct eventlog_ClearEventLogW *)r;
85 0 : if (DEBUGLEVEL >= 10) {
86 0 : NDR_PRINT_FUNCTION_DEBUG(eventlog_ClearEventLogW, NDR_IN, r2);
87 : }
88 0 : r2->out.result = _eventlog_ClearEventLogW(p, r2);
89 0 : break;
90 : }
91 0 : case 1: { /* eventlog_BackupEventLogW */
92 0 : struct eventlog_BackupEventLogW *r2 = (struct eventlog_BackupEventLogW *)r;
93 0 : if (DEBUGLEVEL >= 10) {
94 0 : NDR_PRINT_FUNCTION_DEBUG(eventlog_BackupEventLogW, NDR_IN, r2);
95 : }
96 0 : r2->out.result = _eventlog_BackupEventLogW(p, r2);
97 0 : break;
98 : }
99 12 : case 2: { /* eventlog_CloseEventLog */
100 12 : struct eventlog_CloseEventLog *r2 = (struct eventlog_CloseEventLog *)r;
101 12 : if (DEBUGLEVEL >= 10) {
102 0 : NDR_PRINT_FUNCTION_DEBUG(eventlog_CloseEventLog, NDR_IN, r2);
103 : }
104 12 : NDR_ZERO_STRUCT(r2->out);
105 12 : r2->out.handle = r2->in.handle;
106 12 : r2->out.result = _eventlog_CloseEventLog(p, r2);
107 12 : break;
108 : }
109 0 : case 3: { /* eventlog_DeregisterEventSource */
110 0 : struct eventlog_DeregisterEventSource *r2 = (struct eventlog_DeregisterEventSource *)r;
111 0 : if (DEBUGLEVEL >= 10) {
112 0 : NDR_PRINT_FUNCTION_DEBUG(eventlog_DeregisterEventSource, NDR_IN, r2);
113 : }
114 0 : NDR_ZERO_STRUCT(r2->out);
115 0 : r2->out.handle = r2->in.handle;
116 0 : r2->out.result = _eventlog_DeregisterEventSource(p, r2);
117 0 : break;
118 : }
119 2 : case 4: { /* eventlog_GetNumRecords */
120 2 : struct eventlog_GetNumRecords *r2 = (struct eventlog_GetNumRecords *)r;
121 2 : if (DEBUGLEVEL >= 10) {
122 0 : NDR_PRINT_FUNCTION_DEBUG(eventlog_GetNumRecords, NDR_IN, r2);
123 : }
124 2 : NDR_ZERO_STRUCT(r2->out);
125 2 : r2->out.number = talloc_zero(r2, uint32_t);
126 2 : if (r2->out.number == NULL) {
127 0 : status = NT_STATUS_NO_MEMORY;
128 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
129 0 : goto fail;
130 : }
131 :
132 2 : r2->out.result = _eventlog_GetNumRecords(p, r2);
133 2 : break;
134 : }
135 0 : case 5: { /* eventlog_GetOldestRecord */
136 0 : struct eventlog_GetOldestRecord *r2 = (struct eventlog_GetOldestRecord *)r;
137 0 : if (DEBUGLEVEL >= 10) {
138 0 : NDR_PRINT_FUNCTION_DEBUG(eventlog_GetOldestRecord, NDR_IN, r2);
139 : }
140 0 : NDR_ZERO_STRUCT(r2->out);
141 0 : r2->out.oldest_entry = talloc_zero(r2, uint32_t);
142 0 : if (r2->out.oldest_entry == NULL) {
143 0 : status = NT_STATUS_NO_MEMORY;
144 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
145 0 : goto fail;
146 : }
147 :
148 0 : r2->out.result = _eventlog_GetOldestRecord(p, r2);
149 0 : break;
150 : }
151 0 : case 6: { /* eventlog_ChangeNotify */
152 0 : struct eventlog_ChangeNotify *r2 = (struct eventlog_ChangeNotify *)r;
153 0 : if (DEBUGLEVEL >= 10) {
154 0 : NDR_PRINT_FUNCTION_DEBUG(eventlog_ChangeNotify, NDR_IN, r2);
155 : }
156 0 : r2->out.result = _eventlog_ChangeNotify(p, r2);
157 0 : break;
158 : }
159 24 : case 7: { /* eventlog_OpenEventLogW */
160 24 : struct eventlog_OpenEventLogW *r2 = (struct eventlog_OpenEventLogW *)r;
161 24 : if (DEBUGLEVEL >= 10) {
162 0 : NDR_PRINT_FUNCTION_DEBUG(eventlog_OpenEventLogW, NDR_IN, r2);
163 : }
164 24 : NDR_ZERO_STRUCT(r2->out);
165 24 : r2->out.handle = talloc_zero(r2, struct policy_handle);
166 24 : if (r2->out.handle == NULL) {
167 0 : status = NT_STATUS_NO_MEMORY;
168 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
169 0 : goto fail;
170 : }
171 :
172 24 : r2->out.result = _eventlog_OpenEventLogW(p, r2);
173 24 : break;
174 : }
175 0 : case 8: { /* eventlog_RegisterEventSourceW */
176 0 : struct eventlog_RegisterEventSourceW *r2 = (struct eventlog_RegisterEventSourceW *)r;
177 0 : if (DEBUGLEVEL >= 10) {
178 0 : NDR_PRINT_FUNCTION_DEBUG(eventlog_RegisterEventSourceW, NDR_IN, r2);
179 : }
180 0 : NDR_ZERO_STRUCT(r2->out);
181 0 : r2->out.log_handle = talloc_zero(r2, struct policy_handle);
182 0 : if (r2->out.log_handle == NULL) {
183 0 : status = NT_STATUS_NO_MEMORY;
184 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
185 0 : goto fail;
186 : }
187 :
188 0 : r2->out.result = _eventlog_RegisterEventSourceW(p, r2);
189 0 : break;
190 : }
191 0 : case 9: { /* eventlog_OpenBackupEventLogW */
192 0 : struct eventlog_OpenBackupEventLogW *r2 = (struct eventlog_OpenBackupEventLogW *)r;
193 0 : if (DEBUGLEVEL >= 10) {
194 0 : NDR_PRINT_FUNCTION_DEBUG(eventlog_OpenBackupEventLogW, NDR_IN, r2);
195 : }
196 0 : NDR_ZERO_STRUCT(r2->out);
197 0 : r2->out.handle = talloc_zero(r2, struct policy_handle);
198 0 : if (r2->out.handle == NULL) {
199 0 : status = NT_STATUS_NO_MEMORY;
200 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
201 0 : goto fail;
202 : }
203 :
204 0 : r2->out.result = _eventlog_OpenBackupEventLogW(p, r2);
205 0 : break;
206 : }
207 4 : case 10: { /* eventlog_ReadEventLogW */
208 4 : struct eventlog_ReadEventLogW *r2 = (struct eventlog_ReadEventLogW *)r;
209 4 : if (DEBUGLEVEL >= 10) {
210 0 : NDR_PRINT_FUNCTION_DEBUG(eventlog_ReadEventLogW, NDR_IN, r2);
211 : }
212 4 : NDR_ZERO_STRUCT(r2->out);
213 4 : r2->out.data = talloc_zero_array(r2, uint8_t, r2->in.number_of_bytes);
214 4 : if (r2->out.data == NULL) {
215 0 : status = NT_STATUS_NO_MEMORY;
216 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
217 0 : goto fail;
218 : }
219 :
220 4 : r2->out.sent_size = talloc_zero(r2, uint32_t);
221 4 : if (r2->out.sent_size == NULL) {
222 0 : status = NT_STATUS_NO_MEMORY;
223 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
224 0 : goto fail;
225 : }
226 :
227 4 : r2->out.real_size = talloc_zero(r2, uint32_t);
228 4 : if (r2->out.real_size == NULL) {
229 0 : status = NT_STATUS_NO_MEMORY;
230 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
231 0 : goto fail;
232 : }
233 :
234 4 : r2->out.result = _eventlog_ReadEventLogW(p, r2);
235 4 : break;
236 : }
237 2 : case 11: { /* eventlog_ReportEventW */
238 2 : struct eventlog_ReportEventW *r2 = (struct eventlog_ReportEventW *)r;
239 2 : if (DEBUGLEVEL >= 10) {
240 0 : NDR_PRINT_FUNCTION_DEBUG(eventlog_ReportEventW, NDR_IN, r2);
241 : }
242 2 : NDR_ZERO_STRUCT(r2->out);
243 2 : r2->out.record_number = r2->in.record_number;
244 2 : r2->out.time_written = r2->in.time_written;
245 2 : r2->out.result = _eventlog_ReportEventW(p, r2);
246 2 : break;
247 : }
248 0 : case 12: { /* eventlog_ClearEventLogA */
249 0 : struct eventlog_ClearEventLogA *r2 = (struct eventlog_ClearEventLogA *)r;
250 0 : if (DEBUGLEVEL >= 10) {
251 0 : NDR_PRINT_FUNCTION_DEBUG(eventlog_ClearEventLogA, NDR_IN, r2);
252 : }
253 0 : r2->out.result = _eventlog_ClearEventLogA(p, r2);
254 0 : break;
255 : }
256 0 : case 13: { /* eventlog_BackupEventLogA */
257 0 : struct eventlog_BackupEventLogA *r2 = (struct eventlog_BackupEventLogA *)r;
258 0 : if (DEBUGLEVEL >= 10) {
259 0 : NDR_PRINT_FUNCTION_DEBUG(eventlog_BackupEventLogA, NDR_IN, r2);
260 : }
261 0 : r2->out.result = _eventlog_BackupEventLogA(p, r2);
262 0 : break;
263 : }
264 0 : case 14: { /* eventlog_OpenEventLogA */
265 0 : struct eventlog_OpenEventLogA *r2 = (struct eventlog_OpenEventLogA *)r;
266 0 : if (DEBUGLEVEL >= 10) {
267 0 : NDR_PRINT_FUNCTION_DEBUG(eventlog_OpenEventLogA, NDR_IN, r2);
268 : }
269 0 : r2->out.result = _eventlog_OpenEventLogA(p, r2);
270 0 : break;
271 : }
272 0 : case 15: { /* eventlog_RegisterEventSourceA */
273 0 : struct eventlog_RegisterEventSourceA *r2 = (struct eventlog_RegisterEventSourceA *)r;
274 0 : if (DEBUGLEVEL >= 10) {
275 0 : NDR_PRINT_FUNCTION_DEBUG(eventlog_RegisterEventSourceA, NDR_IN, r2);
276 : }
277 0 : r2->out.result = _eventlog_RegisterEventSourceA(p, r2);
278 0 : break;
279 : }
280 0 : case 16: { /* eventlog_OpenBackupEventLogA */
281 0 : struct eventlog_OpenBackupEventLogA *r2 = (struct eventlog_OpenBackupEventLogA *)r;
282 0 : if (DEBUGLEVEL >= 10) {
283 0 : NDR_PRINT_FUNCTION_DEBUG(eventlog_OpenBackupEventLogA, NDR_IN, r2);
284 : }
285 0 : r2->out.result = _eventlog_OpenBackupEventLogA(p, r2);
286 0 : break;
287 : }
288 0 : case 17: { /* eventlog_ReadEventLogA */
289 0 : struct eventlog_ReadEventLogA *r2 = (struct eventlog_ReadEventLogA *)r;
290 0 : if (DEBUGLEVEL >= 10) {
291 0 : NDR_PRINT_FUNCTION_DEBUG(eventlog_ReadEventLogA, NDR_IN, r2);
292 : }
293 0 : r2->out.result = _eventlog_ReadEventLogA(p, r2);
294 0 : break;
295 : }
296 0 : case 18: { /* eventlog_ReportEventA */
297 0 : struct eventlog_ReportEventA *r2 = (struct eventlog_ReportEventA *)r;
298 0 : if (DEBUGLEVEL >= 10) {
299 0 : NDR_PRINT_FUNCTION_DEBUG(eventlog_ReportEventA, NDR_IN, r2);
300 : }
301 0 : r2->out.result = _eventlog_ReportEventA(p, r2);
302 0 : break;
303 : }
304 0 : case 19: { /* eventlog_RegisterClusterSvc */
305 0 : struct eventlog_RegisterClusterSvc *r2 = (struct eventlog_RegisterClusterSvc *)r;
306 0 : if (DEBUGLEVEL >= 10) {
307 0 : NDR_PRINT_FUNCTION_DEBUG(eventlog_RegisterClusterSvc, NDR_IN, r2);
308 : }
309 0 : r2->out.result = _eventlog_RegisterClusterSvc(p, r2);
310 0 : break;
311 : }
312 0 : case 20: { /* eventlog_DeregisterClusterSvc */
313 0 : struct eventlog_DeregisterClusterSvc *r2 = (struct eventlog_DeregisterClusterSvc *)r;
314 0 : if (DEBUGLEVEL >= 10) {
315 0 : NDR_PRINT_FUNCTION_DEBUG(eventlog_DeregisterClusterSvc, NDR_IN, r2);
316 : }
317 0 : r2->out.result = _eventlog_DeregisterClusterSvc(p, r2);
318 0 : break;
319 : }
320 0 : case 21: { /* eventlog_WriteClusterEvents */
321 0 : struct eventlog_WriteClusterEvents *r2 = (struct eventlog_WriteClusterEvents *)r;
322 0 : if (DEBUGLEVEL >= 10) {
323 0 : NDR_PRINT_FUNCTION_DEBUG(eventlog_WriteClusterEvents, NDR_IN, r2);
324 : }
325 0 : r2->out.result = _eventlog_WriteClusterEvents(p, r2);
326 0 : break;
327 : }
328 6 : case 22: { /* eventlog_GetLogInformation */
329 6 : struct eventlog_GetLogInformation *r2 = (struct eventlog_GetLogInformation *)r;
330 6 : if (DEBUGLEVEL >= 10) {
331 0 : NDR_PRINT_FUNCTION_DEBUG(eventlog_GetLogInformation, NDR_IN, r2);
332 : }
333 6 : NDR_ZERO_STRUCT(r2->out);
334 6 : r2->out.buffer = talloc_zero_array(r2, uint8_t, r2->in.buf_size);
335 6 : if (r2->out.buffer == NULL) {
336 0 : status = NT_STATUS_NO_MEMORY;
337 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
338 0 : goto fail;
339 : }
340 :
341 6 : r2->out.bytes_needed = talloc_zero(r2, uint32_t);
342 6 : if (r2->out.bytes_needed == NULL) {
343 0 : status = NT_STATUS_NO_MEMORY;
344 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
345 0 : goto fail;
346 : }
347 :
348 6 : r2->out.result = _eventlog_GetLogInformation(p, r2);
349 6 : break;
350 : }
351 2 : case 23: { /* eventlog_FlushEventLog */
352 2 : struct eventlog_FlushEventLog *r2 = (struct eventlog_FlushEventLog *)r;
353 2 : if (DEBUGLEVEL >= 10) {
354 0 : NDR_PRINT_FUNCTION_DEBUG(eventlog_FlushEventLog, NDR_IN, r2);
355 : }
356 2 : r2->out.result = _eventlog_FlushEventLog(p, r2);
357 2 : break;
358 : }
359 0 : case 24: { /* eventlog_ReportEventAndSourceW */
360 0 : struct eventlog_ReportEventAndSourceW *r2 = (struct eventlog_ReportEventAndSourceW *)r;
361 0 : if (DEBUGLEVEL >= 10) {
362 0 : NDR_PRINT_FUNCTION_DEBUG(eventlog_ReportEventAndSourceW, NDR_IN, r2);
363 : }
364 0 : NDR_ZERO_STRUCT(r2->out);
365 0 : r2->out.record_number = r2->in.record_number;
366 0 : r2->out.time_written = r2->in.time_written;
367 0 : r2->out.result = _eventlog_ReportEventAndSourceW(p, r2);
368 0 : break;
369 : }
370 0 : default:
371 0 : dce_call->fault_code = DCERPC_FAULT_OP_RNG_ERROR;
372 0 : break;
373 : }
374 :
375 52 : fail:
376 : /* Unimpersonate */
377 52 : if (impersonated) {
378 52 : unbecome_authenticated_pipe_user();
379 : }
380 :
381 52 : p->dce_call = NULL;
382 52 : p->mem_ctx = NULL;
383 : /* Check pipes struct fault state */
384 52 : if (p->fault_state != 0) {
385 0 : dce_call->fault_code = p->fault_state;
386 : }
387 52 : if (dce_call->fault_code != 0) {
388 0 : status = NT_STATUS_NET_WRITE_FAULT;
389 : }
390 :
391 52 : return status;
392 : }
393 :
394 52 : NTSTATUS eventlog__op_dispatch(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, void *r)
395 : {
396 52 : return eventlog__op_dispatch_internal(dce_call, mem_ctx, r, S3COMPAT_RPC_DISPATCH_EXTERNAL);
397 : }
398 :
399 52 : NTSTATUS eventlog__op_reply(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, void *r)
400 : {
401 52 : uint16_t opnum = dce_call->pkt.u.request.opnum;
402 :
403 52 : switch (opnum) {
404 0 : case 0: { /* eventlog_ClearEventLogW */
405 0 : struct eventlog_ClearEventLogW *r2 = (struct eventlog_ClearEventLogW *)r;
406 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
407 0 : DEBUG(5,("function eventlog_ClearEventLogW replied async\n"));
408 : }
409 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
410 0 : NDR_PRINT_FUNCTION_DEBUG(eventlog_ClearEventLogW, NDR_OUT | NDR_SET_VALUES, r2);
411 : }
412 0 : if (dce_call->fault_code != 0) {
413 0 : DBG_WARNING("dcerpc_fault %s in eventlog_ClearEventLogW\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
414 : }
415 0 : break;
416 : }
417 0 : case 1: { /* eventlog_BackupEventLogW */
418 0 : struct eventlog_BackupEventLogW *r2 = (struct eventlog_BackupEventLogW *)r;
419 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
420 0 : DEBUG(5,("function eventlog_BackupEventLogW replied async\n"));
421 : }
422 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
423 0 : NDR_PRINT_FUNCTION_DEBUG(eventlog_BackupEventLogW, NDR_OUT | NDR_SET_VALUES, r2);
424 : }
425 0 : if (dce_call->fault_code != 0) {
426 0 : DBG_WARNING("dcerpc_fault %s in eventlog_BackupEventLogW\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
427 : }
428 0 : break;
429 : }
430 12 : case 2: { /* eventlog_CloseEventLog */
431 12 : struct eventlog_CloseEventLog *r2 = (struct eventlog_CloseEventLog *)r;
432 12 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
433 0 : DEBUG(5,("function eventlog_CloseEventLog replied async\n"));
434 : }
435 12 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
436 0 : NDR_PRINT_FUNCTION_DEBUG(eventlog_CloseEventLog, NDR_OUT | NDR_SET_VALUES, r2);
437 : }
438 12 : if (dce_call->fault_code != 0) {
439 0 : DBG_WARNING("dcerpc_fault %s in eventlog_CloseEventLog\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
440 : }
441 12 : break;
442 : }
443 0 : case 3: { /* eventlog_DeregisterEventSource */
444 0 : struct eventlog_DeregisterEventSource *r2 = (struct eventlog_DeregisterEventSource *)r;
445 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
446 0 : DEBUG(5,("function eventlog_DeregisterEventSource replied async\n"));
447 : }
448 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
449 0 : NDR_PRINT_FUNCTION_DEBUG(eventlog_DeregisterEventSource, NDR_OUT | NDR_SET_VALUES, r2);
450 : }
451 0 : if (dce_call->fault_code != 0) {
452 0 : DBG_WARNING("dcerpc_fault %s in eventlog_DeregisterEventSource\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
453 : }
454 0 : break;
455 : }
456 2 : case 4: { /* eventlog_GetNumRecords */
457 2 : struct eventlog_GetNumRecords *r2 = (struct eventlog_GetNumRecords *)r;
458 2 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
459 0 : DEBUG(5,("function eventlog_GetNumRecords replied async\n"));
460 : }
461 2 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
462 0 : NDR_PRINT_FUNCTION_DEBUG(eventlog_GetNumRecords, NDR_OUT | NDR_SET_VALUES, r2);
463 : }
464 2 : if (dce_call->fault_code != 0) {
465 0 : DBG_WARNING("dcerpc_fault %s in eventlog_GetNumRecords\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
466 : }
467 2 : break;
468 : }
469 0 : case 5: { /* eventlog_GetOldestRecord */
470 0 : struct eventlog_GetOldestRecord *r2 = (struct eventlog_GetOldestRecord *)r;
471 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
472 0 : DEBUG(5,("function eventlog_GetOldestRecord replied async\n"));
473 : }
474 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
475 0 : NDR_PRINT_FUNCTION_DEBUG(eventlog_GetOldestRecord, NDR_OUT | NDR_SET_VALUES, r2);
476 : }
477 0 : if (dce_call->fault_code != 0) {
478 0 : DBG_WARNING("dcerpc_fault %s in eventlog_GetOldestRecord\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
479 : }
480 0 : break;
481 : }
482 0 : case 6: { /* eventlog_ChangeNotify */
483 0 : struct eventlog_ChangeNotify *r2 = (struct eventlog_ChangeNotify *)r;
484 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
485 0 : DEBUG(5,("function eventlog_ChangeNotify replied async\n"));
486 : }
487 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
488 0 : NDR_PRINT_FUNCTION_DEBUG(eventlog_ChangeNotify, NDR_OUT | NDR_SET_VALUES, r2);
489 : }
490 0 : if (dce_call->fault_code != 0) {
491 0 : DBG_WARNING("dcerpc_fault %s in eventlog_ChangeNotify\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
492 : }
493 0 : break;
494 : }
495 24 : case 7: { /* eventlog_OpenEventLogW */
496 24 : struct eventlog_OpenEventLogW *r2 = (struct eventlog_OpenEventLogW *)r;
497 24 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
498 0 : DEBUG(5,("function eventlog_OpenEventLogW replied async\n"));
499 : }
500 24 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
501 0 : NDR_PRINT_FUNCTION_DEBUG(eventlog_OpenEventLogW, NDR_OUT | NDR_SET_VALUES, r2);
502 : }
503 24 : if (dce_call->fault_code != 0) {
504 0 : DBG_WARNING("dcerpc_fault %s in eventlog_OpenEventLogW\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
505 : }
506 24 : break;
507 : }
508 0 : case 8: { /* eventlog_RegisterEventSourceW */
509 0 : struct eventlog_RegisterEventSourceW *r2 = (struct eventlog_RegisterEventSourceW *)r;
510 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
511 0 : DEBUG(5,("function eventlog_RegisterEventSourceW replied async\n"));
512 : }
513 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
514 0 : NDR_PRINT_FUNCTION_DEBUG(eventlog_RegisterEventSourceW, NDR_OUT | NDR_SET_VALUES, r2);
515 : }
516 0 : if (dce_call->fault_code != 0) {
517 0 : DBG_WARNING("dcerpc_fault %s in eventlog_RegisterEventSourceW\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
518 : }
519 0 : break;
520 : }
521 0 : case 9: { /* eventlog_OpenBackupEventLogW */
522 0 : struct eventlog_OpenBackupEventLogW *r2 = (struct eventlog_OpenBackupEventLogW *)r;
523 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
524 0 : DEBUG(5,("function eventlog_OpenBackupEventLogW replied async\n"));
525 : }
526 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
527 0 : NDR_PRINT_FUNCTION_DEBUG(eventlog_OpenBackupEventLogW, NDR_OUT | NDR_SET_VALUES, r2);
528 : }
529 0 : if (dce_call->fault_code != 0) {
530 0 : DBG_WARNING("dcerpc_fault %s in eventlog_OpenBackupEventLogW\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
531 : }
532 0 : break;
533 : }
534 4 : case 10: { /* eventlog_ReadEventLogW */
535 4 : struct eventlog_ReadEventLogW *r2 = (struct eventlog_ReadEventLogW *)r;
536 4 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
537 0 : DEBUG(5,("function eventlog_ReadEventLogW replied async\n"));
538 : }
539 4 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
540 0 : NDR_PRINT_FUNCTION_DEBUG(eventlog_ReadEventLogW, NDR_OUT | NDR_SET_VALUES, r2);
541 : }
542 4 : if (dce_call->fault_code != 0) {
543 0 : DBG_WARNING("dcerpc_fault %s in eventlog_ReadEventLogW\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
544 : }
545 4 : break;
546 : }
547 2 : case 11: { /* eventlog_ReportEventW */
548 2 : struct eventlog_ReportEventW *r2 = (struct eventlog_ReportEventW *)r;
549 2 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
550 0 : DEBUG(5,("function eventlog_ReportEventW replied async\n"));
551 : }
552 2 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
553 0 : NDR_PRINT_FUNCTION_DEBUG(eventlog_ReportEventW, NDR_OUT | NDR_SET_VALUES, r2);
554 : }
555 2 : if (dce_call->fault_code != 0) {
556 0 : DBG_WARNING("dcerpc_fault %s in eventlog_ReportEventW\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
557 : }
558 2 : break;
559 : }
560 0 : case 12: { /* eventlog_ClearEventLogA */
561 0 : struct eventlog_ClearEventLogA *r2 = (struct eventlog_ClearEventLogA *)r;
562 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
563 0 : DEBUG(5,("function eventlog_ClearEventLogA replied async\n"));
564 : }
565 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
566 0 : NDR_PRINT_FUNCTION_DEBUG(eventlog_ClearEventLogA, NDR_OUT | NDR_SET_VALUES, r2);
567 : }
568 0 : if (dce_call->fault_code != 0) {
569 0 : DBG_WARNING("dcerpc_fault %s in eventlog_ClearEventLogA\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
570 : }
571 0 : break;
572 : }
573 0 : case 13: { /* eventlog_BackupEventLogA */
574 0 : struct eventlog_BackupEventLogA *r2 = (struct eventlog_BackupEventLogA *)r;
575 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
576 0 : DEBUG(5,("function eventlog_BackupEventLogA replied async\n"));
577 : }
578 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
579 0 : NDR_PRINT_FUNCTION_DEBUG(eventlog_BackupEventLogA, NDR_OUT | NDR_SET_VALUES, r2);
580 : }
581 0 : if (dce_call->fault_code != 0) {
582 0 : DBG_WARNING("dcerpc_fault %s in eventlog_BackupEventLogA\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
583 : }
584 0 : break;
585 : }
586 0 : case 14: { /* eventlog_OpenEventLogA */
587 0 : struct eventlog_OpenEventLogA *r2 = (struct eventlog_OpenEventLogA *)r;
588 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
589 0 : DEBUG(5,("function eventlog_OpenEventLogA replied async\n"));
590 : }
591 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
592 0 : NDR_PRINT_FUNCTION_DEBUG(eventlog_OpenEventLogA, NDR_OUT | NDR_SET_VALUES, r2);
593 : }
594 0 : if (dce_call->fault_code != 0) {
595 0 : DBG_WARNING("dcerpc_fault %s in eventlog_OpenEventLogA\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
596 : }
597 0 : break;
598 : }
599 0 : case 15: { /* eventlog_RegisterEventSourceA */
600 0 : struct eventlog_RegisterEventSourceA *r2 = (struct eventlog_RegisterEventSourceA *)r;
601 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
602 0 : DEBUG(5,("function eventlog_RegisterEventSourceA replied async\n"));
603 : }
604 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
605 0 : NDR_PRINT_FUNCTION_DEBUG(eventlog_RegisterEventSourceA, NDR_OUT | NDR_SET_VALUES, r2);
606 : }
607 0 : if (dce_call->fault_code != 0) {
608 0 : DBG_WARNING("dcerpc_fault %s in eventlog_RegisterEventSourceA\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
609 : }
610 0 : break;
611 : }
612 0 : case 16: { /* eventlog_OpenBackupEventLogA */
613 0 : struct eventlog_OpenBackupEventLogA *r2 = (struct eventlog_OpenBackupEventLogA *)r;
614 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
615 0 : DEBUG(5,("function eventlog_OpenBackupEventLogA replied async\n"));
616 : }
617 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
618 0 : NDR_PRINT_FUNCTION_DEBUG(eventlog_OpenBackupEventLogA, NDR_OUT | NDR_SET_VALUES, r2);
619 : }
620 0 : if (dce_call->fault_code != 0) {
621 0 : DBG_WARNING("dcerpc_fault %s in eventlog_OpenBackupEventLogA\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
622 : }
623 0 : break;
624 : }
625 0 : case 17: { /* eventlog_ReadEventLogA */
626 0 : struct eventlog_ReadEventLogA *r2 = (struct eventlog_ReadEventLogA *)r;
627 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
628 0 : DEBUG(5,("function eventlog_ReadEventLogA replied async\n"));
629 : }
630 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
631 0 : NDR_PRINT_FUNCTION_DEBUG(eventlog_ReadEventLogA, NDR_OUT | NDR_SET_VALUES, r2);
632 : }
633 0 : if (dce_call->fault_code != 0) {
634 0 : DBG_WARNING("dcerpc_fault %s in eventlog_ReadEventLogA\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
635 : }
636 0 : break;
637 : }
638 0 : case 18: { /* eventlog_ReportEventA */
639 0 : struct eventlog_ReportEventA *r2 = (struct eventlog_ReportEventA *)r;
640 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
641 0 : DEBUG(5,("function eventlog_ReportEventA replied async\n"));
642 : }
643 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
644 0 : NDR_PRINT_FUNCTION_DEBUG(eventlog_ReportEventA, NDR_OUT | NDR_SET_VALUES, r2);
645 : }
646 0 : if (dce_call->fault_code != 0) {
647 0 : DBG_WARNING("dcerpc_fault %s in eventlog_ReportEventA\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
648 : }
649 0 : break;
650 : }
651 0 : case 19: { /* eventlog_RegisterClusterSvc */
652 0 : struct eventlog_RegisterClusterSvc *r2 = (struct eventlog_RegisterClusterSvc *)r;
653 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
654 0 : DEBUG(5,("function eventlog_RegisterClusterSvc replied async\n"));
655 : }
656 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
657 0 : NDR_PRINT_FUNCTION_DEBUG(eventlog_RegisterClusterSvc, NDR_OUT | NDR_SET_VALUES, r2);
658 : }
659 0 : if (dce_call->fault_code != 0) {
660 0 : DBG_WARNING("dcerpc_fault %s in eventlog_RegisterClusterSvc\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
661 : }
662 0 : break;
663 : }
664 0 : case 20: { /* eventlog_DeregisterClusterSvc */
665 0 : struct eventlog_DeregisterClusterSvc *r2 = (struct eventlog_DeregisterClusterSvc *)r;
666 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
667 0 : DEBUG(5,("function eventlog_DeregisterClusterSvc replied async\n"));
668 : }
669 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
670 0 : NDR_PRINT_FUNCTION_DEBUG(eventlog_DeregisterClusterSvc, NDR_OUT | NDR_SET_VALUES, r2);
671 : }
672 0 : if (dce_call->fault_code != 0) {
673 0 : DBG_WARNING("dcerpc_fault %s in eventlog_DeregisterClusterSvc\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
674 : }
675 0 : break;
676 : }
677 0 : case 21: { /* eventlog_WriteClusterEvents */
678 0 : struct eventlog_WriteClusterEvents *r2 = (struct eventlog_WriteClusterEvents *)r;
679 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
680 0 : DEBUG(5,("function eventlog_WriteClusterEvents replied async\n"));
681 : }
682 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
683 0 : NDR_PRINT_FUNCTION_DEBUG(eventlog_WriteClusterEvents, NDR_OUT | NDR_SET_VALUES, r2);
684 : }
685 0 : if (dce_call->fault_code != 0) {
686 0 : DBG_WARNING("dcerpc_fault %s in eventlog_WriteClusterEvents\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
687 : }
688 0 : break;
689 : }
690 6 : case 22: { /* eventlog_GetLogInformation */
691 6 : struct eventlog_GetLogInformation *r2 = (struct eventlog_GetLogInformation *)r;
692 6 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
693 0 : DEBUG(5,("function eventlog_GetLogInformation replied async\n"));
694 : }
695 6 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
696 0 : NDR_PRINT_FUNCTION_DEBUG(eventlog_GetLogInformation, NDR_OUT | NDR_SET_VALUES, r2);
697 : }
698 6 : if (dce_call->fault_code != 0) {
699 0 : DBG_WARNING("dcerpc_fault %s in eventlog_GetLogInformation\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
700 : }
701 6 : break;
702 : }
703 2 : case 23: { /* eventlog_FlushEventLog */
704 2 : struct eventlog_FlushEventLog *r2 = (struct eventlog_FlushEventLog *)r;
705 2 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
706 0 : DEBUG(5,("function eventlog_FlushEventLog replied async\n"));
707 : }
708 2 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
709 0 : NDR_PRINT_FUNCTION_DEBUG(eventlog_FlushEventLog, NDR_OUT | NDR_SET_VALUES, r2);
710 : }
711 2 : if (dce_call->fault_code != 0) {
712 0 : DBG_WARNING("dcerpc_fault %s in eventlog_FlushEventLog\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
713 : }
714 2 : break;
715 : }
716 0 : case 24: { /* eventlog_ReportEventAndSourceW */
717 0 : struct eventlog_ReportEventAndSourceW *r2 = (struct eventlog_ReportEventAndSourceW *)r;
718 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
719 0 : DEBUG(5,("function eventlog_ReportEventAndSourceW replied async\n"));
720 : }
721 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
722 0 : NDR_PRINT_FUNCTION_DEBUG(eventlog_ReportEventAndSourceW, NDR_OUT | NDR_SET_VALUES, r2);
723 : }
724 0 : if (dce_call->fault_code != 0) {
725 0 : DBG_WARNING("dcerpc_fault %s in eventlog_ReportEventAndSourceW\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
726 : }
727 0 : break;
728 : }
729 0 : default:
730 0 : dce_call->fault_code = DCERPC_FAULT_OP_RNG_ERROR;
731 0 : break;
732 : }
733 :
734 52 : if (dce_call->fault_code != 0) {
735 0 : return NT_STATUS_NET_WRITE_FAULT;
736 : }
737 :
738 52 : return NT_STATUS_OK;
739 : }
740 :
741 52 : NTSTATUS eventlog__op_ndr_push(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, struct ndr_push *push, const void *r)
742 : {
743 0 : enum ndr_err_code ndr_err;
744 52 : uint16_t opnum = dce_call->pkt.u.request.opnum;
745 :
746 52 : ndr_err = ndr_table_eventlog.calls[opnum].ndr_push(push, NDR_OUT, r);
747 52 : if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
748 0 : dce_call->fault_code = DCERPC_FAULT_NDR;
749 0 : return NT_STATUS_NET_WRITE_FAULT;
750 : }
751 :
752 52 : return NT_STATUS_OK;
753 : }
754 :
755 0 : NTSTATUS eventlog__op_local(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, void *r)
756 : {
757 0 : return eventlog__op_dispatch_internal(dce_call, mem_ctx, r, S3COMPAT_RPC_DISPATCH_INTERNAL);
758 : }
759 :
760 : static const struct dcesrv_interface dcesrv_eventlog_interface = {
761 : .name = "eventlog",
762 : .syntax_id = {{0x82273fdc,0xe32a,0x18c3,{0x3f,0x78},{0x82,0x79,0x29,0xdc,0x23,0xea}},0.0},
763 : .bind = eventlog__op_bind,
764 : .unbind = eventlog__op_unbind,
765 : .ndr_pull = eventlog__op_ndr_pull,
766 : .dispatch = eventlog__op_dispatch,
767 : .reply = eventlog__op_reply,
768 : .ndr_push = eventlog__op_ndr_push,
769 : .local = eventlog__op_local,
770 : #ifdef DCESRV_INTERFACE_EVENTLOG_FLAGS
771 : .flags = DCESRV_INTERFACE_EVENTLOG_FLAGS
772 : #else
773 : .flags = 0
774 : #endif
775 : };
776 :
777 126 : static NTSTATUS eventlog__op_init_server(struct dcesrv_context *dce_ctx, const struct dcesrv_endpoint_server *ep_server)
778 : {
779 0 : uint32_t i;
780 0 : NTSTATUS ret;
781 :
782 : #ifdef DCESRV_INTERFACE_EVENTLOG_NCACN_NP_SECONDARY_ENDPOINT
783 : const char *ncacn_np_secondary_endpoint = DCESRV_INTERFACE_EVENTLOG_NCACN_NP_SECONDARY_ENDPOINT;
784 : #else
785 126 : const char *ncacn_np_secondary_endpoint = NULL;
786 : #endif
787 :
788 252 : for (i=0;i<ndr_table_eventlog.endpoints->count;i++) {
789 126 : const char *name = ndr_table_eventlog.endpoints->names[i];
790 :
791 126 : ret = dcesrv_interface_register(dce_ctx, name, ncacn_np_secondary_endpoint, &dcesrv_eventlog_interface, NULL);
792 126 : if (!NT_STATUS_IS_OK(ret)) {
793 0 : DBG_ERR("Failed to register endpoint '%s'\n",name);
794 0 : return ret;
795 : }
796 : }
797 :
798 126 : return NT_STATUS_OK;
799 : }
800 :
801 126 : static NTSTATUS eventlog__op_shutdown_server(struct dcesrv_context *dce_ctx, const struct dcesrv_endpoint_server *ep_server)
802 : {
803 126 : return NT_STATUS_OK;
804 : }
805 :
806 0 : static bool eventlog__op_interface_by_uuid(struct dcesrv_interface *iface, const struct GUID *uuid, uint32_t if_version)
807 : {
808 0 : if (dcesrv_eventlog_interface.syntax_id.if_version == if_version && GUID_equal(&dcesrv_eventlog_interface.syntax_id.uuid, uuid)) {
809 0 : memcpy(iface,&dcesrv_eventlog_interface, sizeof(*iface));
810 0 : return true;
811 : }
812 :
813 0 : return false;
814 : }
815 :
816 0 : static bool eventlog__op_interface_by_name(struct dcesrv_interface *iface, const char *name)
817 : {
818 0 : if (strcmp(dcesrv_eventlog_interface.name, name)==0) {
819 0 : memcpy(iface, &dcesrv_eventlog_interface, sizeof(*iface));
820 0 : return true;
821 : }
822 :
823 0 : return false;
824 : }
825 :
826 : static const struct dcesrv_endpoint_server eventlog_ep_server = {
827 : /* fill in our name */
828 : .name = "eventlog",
829 :
830 : /* Initialization flag */
831 : .initialized = false,
832 :
833 : /* fill in all the operations */
834 : #ifdef DCESRV_INTERFACE_EVENTLOG_INIT_SERVER
835 : .init_server = DCESRV_INTERFACE_EVENTLOG_INIT_SERVER,
836 : #else
837 : .init_server = eventlog__op_init_server,
838 : #endif
839 : #ifdef DCESRV_INTERFACE_EVENTLOG_SHUTDOWN_SERVER
840 : .shutdown_server = DCESRV_INTERFACE_EVENTLOG_SHUTDOWN_SERVER,
841 : #else
842 : .shutdown_server = eventlog__op_shutdown_server,
843 : #endif
844 : .interface_by_uuid = eventlog__op_interface_by_uuid,
845 : .interface_by_name = eventlog__op_interface_by_name
846 : };
847 :
848 126 : const struct dcesrv_endpoint_server *eventlog_get_ep_server(void)
849 : {
850 126 : return &eventlog_ep_server;
851 : }
|