Covert several persistant tdb files to use state_path() instead of lock_path()
[Samba/gbeck.git] / librpc / gen_ndr / srv_eventlog.c
blob9a87ee648c0a208d870cc6099b564f1d8b1f3687
1 /*
2 * Unix SMB/CIFS implementation.
3 * server auto-generated by pidl. DO NOT MODIFY!
4 */
6 #include "includes.h"
7 #include "../librpc/gen_ndr/srv_eventlog.h"
9 static bool api_eventlog_ClearEventLogW(pipes_struct *p)
11 const struct ndr_interface_call *call;
12 struct ndr_pull *pull;
13 struct ndr_push *push;
14 enum ndr_err_code ndr_err;
15 DATA_BLOB blob;
16 struct eventlog_ClearEventLogW *r;
18 call = &ndr_table_eventlog.calls[NDR_EVENTLOG_CLEAREVENTLOGW];
20 r = talloc(talloc_tos(), struct eventlog_ClearEventLogW);
21 if (r == NULL) {
22 return false;
25 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
26 talloc_free(r);
27 return false;
30 pull = ndr_pull_init_blob(&blob, r, NULL);
31 if (pull == NULL) {
32 talloc_free(r);
33 return false;
36 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
37 ndr_err = call->ndr_pull(pull, NDR_IN, r);
38 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
39 talloc_free(r);
40 return false;
43 if (DEBUGLEVEL >= 10) {
44 NDR_PRINT_IN_DEBUG(eventlog_ClearEventLogW, r);
47 r->out.result = _eventlog_ClearEventLogW(p, r);
49 if (p->rng_fault_state) {
50 talloc_free(r);
51 /* Return true here, srv_pipe_hnd.c will take care */
52 return true;
55 if (DEBUGLEVEL >= 10) {
56 NDR_PRINT_OUT_DEBUG(eventlog_ClearEventLogW, r);
59 push = ndr_push_init_ctx(r, NULL);
60 if (push == NULL) {
61 talloc_free(r);
62 return false;
65 ndr_err = call->ndr_push(push, NDR_OUT, r);
66 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
67 talloc_free(r);
68 return false;
71 blob = ndr_push_blob(push);
72 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
73 talloc_free(r);
74 return false;
77 talloc_free(r);
79 return true;
82 static bool api_eventlog_BackupEventLogW(pipes_struct *p)
84 const struct ndr_interface_call *call;
85 struct ndr_pull *pull;
86 struct ndr_push *push;
87 enum ndr_err_code ndr_err;
88 DATA_BLOB blob;
89 struct eventlog_BackupEventLogW *r;
91 call = &ndr_table_eventlog.calls[NDR_EVENTLOG_BACKUPEVENTLOGW];
93 r = talloc(talloc_tos(), struct eventlog_BackupEventLogW);
94 if (r == NULL) {
95 return false;
98 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
99 talloc_free(r);
100 return false;
103 pull = ndr_pull_init_blob(&blob, r, NULL);
104 if (pull == NULL) {
105 talloc_free(r);
106 return false;
109 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
110 ndr_err = call->ndr_pull(pull, NDR_IN, r);
111 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
112 talloc_free(r);
113 return false;
116 if (DEBUGLEVEL >= 10) {
117 NDR_PRINT_IN_DEBUG(eventlog_BackupEventLogW, r);
120 r->out.result = _eventlog_BackupEventLogW(p, r);
122 if (p->rng_fault_state) {
123 talloc_free(r);
124 /* Return true here, srv_pipe_hnd.c will take care */
125 return true;
128 if (DEBUGLEVEL >= 10) {
129 NDR_PRINT_OUT_DEBUG(eventlog_BackupEventLogW, r);
132 push = ndr_push_init_ctx(r, NULL);
133 if (push == NULL) {
134 talloc_free(r);
135 return false;
138 ndr_err = call->ndr_push(push, NDR_OUT, r);
139 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
140 talloc_free(r);
141 return false;
144 blob = ndr_push_blob(push);
145 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
146 talloc_free(r);
147 return false;
150 talloc_free(r);
152 return true;
155 static bool api_eventlog_CloseEventLog(pipes_struct *p)
157 const struct ndr_interface_call *call;
158 struct ndr_pull *pull;
159 struct ndr_push *push;
160 enum ndr_err_code ndr_err;
161 DATA_BLOB blob;
162 struct eventlog_CloseEventLog *r;
164 call = &ndr_table_eventlog.calls[NDR_EVENTLOG_CLOSEEVENTLOG];
166 r = talloc(talloc_tos(), struct eventlog_CloseEventLog);
167 if (r == NULL) {
168 return false;
171 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
172 talloc_free(r);
173 return false;
176 pull = ndr_pull_init_blob(&blob, r, NULL);
177 if (pull == NULL) {
178 talloc_free(r);
179 return false;
182 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
183 ndr_err = call->ndr_pull(pull, NDR_IN, r);
184 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
185 talloc_free(r);
186 return false;
189 if (DEBUGLEVEL >= 10) {
190 NDR_PRINT_IN_DEBUG(eventlog_CloseEventLog, r);
193 ZERO_STRUCT(r->out);
194 r->out.handle = r->in.handle;
195 r->out.result = _eventlog_CloseEventLog(p, r);
197 if (p->rng_fault_state) {
198 talloc_free(r);
199 /* Return true here, srv_pipe_hnd.c will take care */
200 return true;
203 if (DEBUGLEVEL >= 10) {
204 NDR_PRINT_OUT_DEBUG(eventlog_CloseEventLog, r);
207 push = ndr_push_init_ctx(r, NULL);
208 if (push == NULL) {
209 talloc_free(r);
210 return false;
213 ndr_err = call->ndr_push(push, NDR_OUT, r);
214 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
215 talloc_free(r);
216 return false;
219 blob = ndr_push_blob(push);
220 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
221 talloc_free(r);
222 return false;
225 talloc_free(r);
227 return true;
230 static bool api_eventlog_DeregisterEventSource(pipes_struct *p)
232 const struct ndr_interface_call *call;
233 struct ndr_pull *pull;
234 struct ndr_push *push;
235 enum ndr_err_code ndr_err;
236 DATA_BLOB blob;
237 struct eventlog_DeregisterEventSource *r;
239 call = &ndr_table_eventlog.calls[NDR_EVENTLOG_DEREGISTEREVENTSOURCE];
241 r = talloc(talloc_tos(), struct eventlog_DeregisterEventSource);
242 if (r == NULL) {
243 return false;
246 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
247 talloc_free(r);
248 return false;
251 pull = ndr_pull_init_blob(&blob, r, NULL);
252 if (pull == NULL) {
253 talloc_free(r);
254 return false;
257 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
258 ndr_err = call->ndr_pull(pull, NDR_IN, r);
259 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
260 talloc_free(r);
261 return false;
264 if (DEBUGLEVEL >= 10) {
265 NDR_PRINT_IN_DEBUG(eventlog_DeregisterEventSource, r);
268 r->out.result = _eventlog_DeregisterEventSource(p, r);
270 if (p->rng_fault_state) {
271 talloc_free(r);
272 /* Return true here, srv_pipe_hnd.c will take care */
273 return true;
276 if (DEBUGLEVEL >= 10) {
277 NDR_PRINT_OUT_DEBUG(eventlog_DeregisterEventSource, r);
280 push = ndr_push_init_ctx(r, NULL);
281 if (push == NULL) {
282 talloc_free(r);
283 return false;
286 ndr_err = call->ndr_push(push, NDR_OUT, r);
287 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
288 talloc_free(r);
289 return false;
292 blob = ndr_push_blob(push);
293 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
294 talloc_free(r);
295 return false;
298 talloc_free(r);
300 return true;
303 static bool api_eventlog_GetNumRecords(pipes_struct *p)
305 const struct ndr_interface_call *call;
306 struct ndr_pull *pull;
307 struct ndr_push *push;
308 enum ndr_err_code ndr_err;
309 DATA_BLOB blob;
310 struct eventlog_GetNumRecords *r;
312 call = &ndr_table_eventlog.calls[NDR_EVENTLOG_GETNUMRECORDS];
314 r = talloc(talloc_tos(), struct eventlog_GetNumRecords);
315 if (r == NULL) {
316 return false;
319 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
320 talloc_free(r);
321 return false;
324 pull = ndr_pull_init_blob(&blob, r, NULL);
325 if (pull == NULL) {
326 talloc_free(r);
327 return false;
330 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
331 ndr_err = call->ndr_pull(pull, NDR_IN, r);
332 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
333 talloc_free(r);
334 return false;
337 if (DEBUGLEVEL >= 10) {
338 NDR_PRINT_IN_DEBUG(eventlog_GetNumRecords, r);
341 ZERO_STRUCT(r->out);
342 r->out.number = talloc_zero(r, uint32_t);
343 if (r->out.number == NULL) {
344 talloc_free(r);
345 return false;
348 r->out.result = _eventlog_GetNumRecords(p, r);
350 if (p->rng_fault_state) {
351 talloc_free(r);
352 /* Return true here, srv_pipe_hnd.c will take care */
353 return true;
356 if (DEBUGLEVEL >= 10) {
357 NDR_PRINT_OUT_DEBUG(eventlog_GetNumRecords, r);
360 push = ndr_push_init_ctx(r, NULL);
361 if (push == NULL) {
362 talloc_free(r);
363 return false;
366 ndr_err = call->ndr_push(push, NDR_OUT, r);
367 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
368 talloc_free(r);
369 return false;
372 blob = ndr_push_blob(push);
373 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
374 talloc_free(r);
375 return false;
378 talloc_free(r);
380 return true;
383 static bool api_eventlog_GetOldestRecord(pipes_struct *p)
385 const struct ndr_interface_call *call;
386 struct ndr_pull *pull;
387 struct ndr_push *push;
388 enum ndr_err_code ndr_err;
389 DATA_BLOB blob;
390 struct eventlog_GetOldestRecord *r;
392 call = &ndr_table_eventlog.calls[NDR_EVENTLOG_GETOLDESTRECORD];
394 r = talloc(talloc_tos(), struct eventlog_GetOldestRecord);
395 if (r == NULL) {
396 return false;
399 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
400 talloc_free(r);
401 return false;
404 pull = ndr_pull_init_blob(&blob, r, NULL);
405 if (pull == NULL) {
406 talloc_free(r);
407 return false;
410 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
411 ndr_err = call->ndr_pull(pull, NDR_IN, r);
412 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
413 talloc_free(r);
414 return false;
417 if (DEBUGLEVEL >= 10) {
418 NDR_PRINT_IN_DEBUG(eventlog_GetOldestRecord, r);
421 ZERO_STRUCT(r->out);
422 r->out.oldest_entry = talloc_zero(r, uint32_t);
423 if (r->out.oldest_entry == NULL) {
424 talloc_free(r);
425 return false;
428 r->out.result = _eventlog_GetOldestRecord(p, r);
430 if (p->rng_fault_state) {
431 talloc_free(r);
432 /* Return true here, srv_pipe_hnd.c will take care */
433 return true;
436 if (DEBUGLEVEL >= 10) {
437 NDR_PRINT_OUT_DEBUG(eventlog_GetOldestRecord, r);
440 push = ndr_push_init_ctx(r, NULL);
441 if (push == NULL) {
442 talloc_free(r);
443 return false;
446 ndr_err = call->ndr_push(push, NDR_OUT, r);
447 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
448 talloc_free(r);
449 return false;
452 blob = ndr_push_blob(push);
453 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
454 talloc_free(r);
455 return false;
458 talloc_free(r);
460 return true;
463 static bool api_eventlog_ChangeNotify(pipes_struct *p)
465 const struct ndr_interface_call *call;
466 struct ndr_pull *pull;
467 struct ndr_push *push;
468 enum ndr_err_code ndr_err;
469 DATA_BLOB blob;
470 struct eventlog_ChangeNotify *r;
472 call = &ndr_table_eventlog.calls[NDR_EVENTLOG_CHANGENOTIFY];
474 r = talloc(talloc_tos(), struct eventlog_ChangeNotify);
475 if (r == NULL) {
476 return false;
479 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
480 talloc_free(r);
481 return false;
484 pull = ndr_pull_init_blob(&blob, r, NULL);
485 if (pull == NULL) {
486 talloc_free(r);
487 return false;
490 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
491 ndr_err = call->ndr_pull(pull, NDR_IN, r);
492 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
493 talloc_free(r);
494 return false;
497 if (DEBUGLEVEL >= 10) {
498 NDR_PRINT_IN_DEBUG(eventlog_ChangeNotify, r);
501 r->out.result = _eventlog_ChangeNotify(p, r);
503 if (p->rng_fault_state) {
504 talloc_free(r);
505 /* Return true here, srv_pipe_hnd.c will take care */
506 return true;
509 if (DEBUGLEVEL >= 10) {
510 NDR_PRINT_OUT_DEBUG(eventlog_ChangeNotify, r);
513 push = ndr_push_init_ctx(r, NULL);
514 if (push == NULL) {
515 talloc_free(r);
516 return false;
519 ndr_err = call->ndr_push(push, NDR_OUT, r);
520 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
521 talloc_free(r);
522 return false;
525 blob = ndr_push_blob(push);
526 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
527 talloc_free(r);
528 return false;
531 talloc_free(r);
533 return true;
536 static bool api_eventlog_OpenEventLogW(pipes_struct *p)
538 const struct ndr_interface_call *call;
539 struct ndr_pull *pull;
540 struct ndr_push *push;
541 enum ndr_err_code ndr_err;
542 DATA_BLOB blob;
543 struct eventlog_OpenEventLogW *r;
545 call = &ndr_table_eventlog.calls[NDR_EVENTLOG_OPENEVENTLOGW];
547 r = talloc(talloc_tos(), struct eventlog_OpenEventLogW);
548 if (r == NULL) {
549 return false;
552 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
553 talloc_free(r);
554 return false;
557 pull = ndr_pull_init_blob(&blob, r, NULL);
558 if (pull == NULL) {
559 talloc_free(r);
560 return false;
563 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
564 ndr_err = call->ndr_pull(pull, NDR_IN, r);
565 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
566 talloc_free(r);
567 return false;
570 if (DEBUGLEVEL >= 10) {
571 NDR_PRINT_IN_DEBUG(eventlog_OpenEventLogW, r);
574 ZERO_STRUCT(r->out);
575 r->out.handle = talloc_zero(r, struct policy_handle);
576 if (r->out.handle == NULL) {
577 talloc_free(r);
578 return false;
581 r->out.result = _eventlog_OpenEventLogW(p, r);
583 if (p->rng_fault_state) {
584 talloc_free(r);
585 /* Return true here, srv_pipe_hnd.c will take care */
586 return true;
589 if (DEBUGLEVEL >= 10) {
590 NDR_PRINT_OUT_DEBUG(eventlog_OpenEventLogW, r);
593 push = ndr_push_init_ctx(r, NULL);
594 if (push == NULL) {
595 talloc_free(r);
596 return false;
599 ndr_err = call->ndr_push(push, NDR_OUT, r);
600 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
601 talloc_free(r);
602 return false;
605 blob = ndr_push_blob(push);
606 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
607 talloc_free(r);
608 return false;
611 talloc_free(r);
613 return true;
616 static bool api_eventlog_RegisterEventSourceW(pipes_struct *p)
618 const struct ndr_interface_call *call;
619 struct ndr_pull *pull;
620 struct ndr_push *push;
621 enum ndr_err_code ndr_err;
622 DATA_BLOB blob;
623 struct eventlog_RegisterEventSourceW *r;
625 call = &ndr_table_eventlog.calls[NDR_EVENTLOG_REGISTEREVENTSOURCEW];
627 r = talloc(talloc_tos(), struct eventlog_RegisterEventSourceW);
628 if (r == NULL) {
629 return false;
632 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
633 talloc_free(r);
634 return false;
637 pull = ndr_pull_init_blob(&blob, r, NULL);
638 if (pull == NULL) {
639 talloc_free(r);
640 return false;
643 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
644 ndr_err = call->ndr_pull(pull, NDR_IN, r);
645 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
646 talloc_free(r);
647 return false;
650 if (DEBUGLEVEL >= 10) {
651 NDR_PRINT_IN_DEBUG(eventlog_RegisterEventSourceW, r);
654 r->out.result = _eventlog_RegisterEventSourceW(p, r);
656 if (p->rng_fault_state) {
657 talloc_free(r);
658 /* Return true here, srv_pipe_hnd.c will take care */
659 return true;
662 if (DEBUGLEVEL >= 10) {
663 NDR_PRINT_OUT_DEBUG(eventlog_RegisterEventSourceW, r);
666 push = ndr_push_init_ctx(r, NULL);
667 if (push == NULL) {
668 talloc_free(r);
669 return false;
672 ndr_err = call->ndr_push(push, NDR_OUT, r);
673 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
674 talloc_free(r);
675 return false;
678 blob = ndr_push_blob(push);
679 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
680 talloc_free(r);
681 return false;
684 talloc_free(r);
686 return true;
689 static bool api_eventlog_OpenBackupEventLogW(pipes_struct *p)
691 const struct ndr_interface_call *call;
692 struct ndr_pull *pull;
693 struct ndr_push *push;
694 enum ndr_err_code ndr_err;
695 DATA_BLOB blob;
696 struct eventlog_OpenBackupEventLogW *r;
698 call = &ndr_table_eventlog.calls[NDR_EVENTLOG_OPENBACKUPEVENTLOGW];
700 r = talloc(talloc_tos(), struct eventlog_OpenBackupEventLogW);
701 if (r == NULL) {
702 return false;
705 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
706 talloc_free(r);
707 return false;
710 pull = ndr_pull_init_blob(&blob, r, NULL);
711 if (pull == NULL) {
712 talloc_free(r);
713 return false;
716 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
717 ndr_err = call->ndr_pull(pull, NDR_IN, r);
718 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
719 talloc_free(r);
720 return false;
723 if (DEBUGLEVEL >= 10) {
724 NDR_PRINT_IN_DEBUG(eventlog_OpenBackupEventLogW, r);
727 r->out.result = _eventlog_OpenBackupEventLogW(p, r);
729 if (p->rng_fault_state) {
730 talloc_free(r);
731 /* Return true here, srv_pipe_hnd.c will take care */
732 return true;
735 if (DEBUGLEVEL >= 10) {
736 NDR_PRINT_OUT_DEBUG(eventlog_OpenBackupEventLogW, r);
739 push = ndr_push_init_ctx(r, NULL);
740 if (push == NULL) {
741 talloc_free(r);
742 return false;
745 ndr_err = call->ndr_push(push, NDR_OUT, r);
746 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
747 talloc_free(r);
748 return false;
751 blob = ndr_push_blob(push);
752 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
753 talloc_free(r);
754 return false;
757 talloc_free(r);
759 return true;
762 static bool api_eventlog_ReadEventLogW(pipes_struct *p)
764 const struct ndr_interface_call *call;
765 struct ndr_pull *pull;
766 struct ndr_push *push;
767 enum ndr_err_code ndr_err;
768 DATA_BLOB blob;
769 struct eventlog_ReadEventLogW *r;
771 call = &ndr_table_eventlog.calls[NDR_EVENTLOG_READEVENTLOGW];
773 r = talloc(talloc_tos(), struct eventlog_ReadEventLogW);
774 if (r == NULL) {
775 return false;
778 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
779 talloc_free(r);
780 return false;
783 pull = ndr_pull_init_blob(&blob, r, NULL);
784 if (pull == NULL) {
785 talloc_free(r);
786 return false;
789 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
790 ndr_err = call->ndr_pull(pull, NDR_IN, r);
791 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
792 talloc_free(r);
793 return false;
796 if (DEBUGLEVEL >= 10) {
797 NDR_PRINT_IN_DEBUG(eventlog_ReadEventLogW, r);
800 ZERO_STRUCT(r->out);
801 r->out.data = talloc_zero_array(r, uint8_t, r->in.number_of_bytes);
802 if (r->out.data == NULL) {
803 talloc_free(r);
804 return false;
807 r->out.sent_size = talloc_zero(r, uint32_t);
808 if (r->out.sent_size == NULL) {
809 talloc_free(r);
810 return false;
813 r->out.real_size = talloc_zero(r, uint32_t);
814 if (r->out.real_size == NULL) {
815 talloc_free(r);
816 return false;
819 r->out.result = _eventlog_ReadEventLogW(p, r);
821 if (p->rng_fault_state) {
822 talloc_free(r);
823 /* Return true here, srv_pipe_hnd.c will take care */
824 return true;
827 if (DEBUGLEVEL >= 10) {
828 NDR_PRINT_OUT_DEBUG(eventlog_ReadEventLogW, r);
831 push = ndr_push_init_ctx(r, NULL);
832 if (push == NULL) {
833 talloc_free(r);
834 return false;
837 ndr_err = call->ndr_push(push, NDR_OUT, r);
838 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
839 talloc_free(r);
840 return false;
843 blob = ndr_push_blob(push);
844 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
845 talloc_free(r);
846 return false;
849 talloc_free(r);
851 return true;
854 static bool api_eventlog_ReportEventW(pipes_struct *p)
856 const struct ndr_interface_call *call;
857 struct ndr_pull *pull;
858 struct ndr_push *push;
859 enum ndr_err_code ndr_err;
860 DATA_BLOB blob;
861 struct eventlog_ReportEventW *r;
863 call = &ndr_table_eventlog.calls[NDR_EVENTLOG_REPORTEVENTW];
865 r = talloc(talloc_tos(), struct eventlog_ReportEventW);
866 if (r == NULL) {
867 return false;
870 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
871 talloc_free(r);
872 return false;
875 pull = ndr_pull_init_blob(&blob, r, NULL);
876 if (pull == NULL) {
877 talloc_free(r);
878 return false;
881 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
882 ndr_err = call->ndr_pull(pull, NDR_IN, r);
883 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
884 talloc_free(r);
885 return false;
888 if (DEBUGLEVEL >= 10) {
889 NDR_PRINT_IN_DEBUG(eventlog_ReportEventW, r);
892 r->out.result = _eventlog_ReportEventW(p, r);
894 if (p->rng_fault_state) {
895 talloc_free(r);
896 /* Return true here, srv_pipe_hnd.c will take care */
897 return true;
900 if (DEBUGLEVEL >= 10) {
901 NDR_PRINT_OUT_DEBUG(eventlog_ReportEventW, r);
904 push = ndr_push_init_ctx(r, NULL);
905 if (push == NULL) {
906 talloc_free(r);
907 return false;
910 ndr_err = call->ndr_push(push, NDR_OUT, r);
911 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
912 talloc_free(r);
913 return false;
916 blob = ndr_push_blob(push);
917 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
918 talloc_free(r);
919 return false;
922 talloc_free(r);
924 return true;
927 static bool api_eventlog_ClearEventLogA(pipes_struct *p)
929 const struct ndr_interface_call *call;
930 struct ndr_pull *pull;
931 struct ndr_push *push;
932 enum ndr_err_code ndr_err;
933 DATA_BLOB blob;
934 struct eventlog_ClearEventLogA *r;
936 call = &ndr_table_eventlog.calls[NDR_EVENTLOG_CLEAREVENTLOGA];
938 r = talloc(talloc_tos(), struct eventlog_ClearEventLogA);
939 if (r == NULL) {
940 return false;
943 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
944 talloc_free(r);
945 return false;
948 pull = ndr_pull_init_blob(&blob, r, NULL);
949 if (pull == NULL) {
950 talloc_free(r);
951 return false;
954 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
955 ndr_err = call->ndr_pull(pull, NDR_IN, r);
956 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
957 talloc_free(r);
958 return false;
961 if (DEBUGLEVEL >= 10) {
962 NDR_PRINT_IN_DEBUG(eventlog_ClearEventLogA, r);
965 r->out.result = _eventlog_ClearEventLogA(p, r);
967 if (p->rng_fault_state) {
968 talloc_free(r);
969 /* Return true here, srv_pipe_hnd.c will take care */
970 return true;
973 if (DEBUGLEVEL >= 10) {
974 NDR_PRINT_OUT_DEBUG(eventlog_ClearEventLogA, r);
977 push = ndr_push_init_ctx(r, NULL);
978 if (push == NULL) {
979 talloc_free(r);
980 return false;
983 ndr_err = call->ndr_push(push, NDR_OUT, r);
984 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
985 talloc_free(r);
986 return false;
989 blob = ndr_push_blob(push);
990 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
991 talloc_free(r);
992 return false;
995 talloc_free(r);
997 return true;
1000 static bool api_eventlog_BackupEventLogA(pipes_struct *p)
1002 const struct ndr_interface_call *call;
1003 struct ndr_pull *pull;
1004 struct ndr_push *push;
1005 enum ndr_err_code ndr_err;
1006 DATA_BLOB blob;
1007 struct eventlog_BackupEventLogA *r;
1009 call = &ndr_table_eventlog.calls[NDR_EVENTLOG_BACKUPEVENTLOGA];
1011 r = talloc(talloc_tos(), struct eventlog_BackupEventLogA);
1012 if (r == NULL) {
1013 return false;
1016 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1017 talloc_free(r);
1018 return false;
1021 pull = ndr_pull_init_blob(&blob, r, NULL);
1022 if (pull == NULL) {
1023 talloc_free(r);
1024 return false;
1027 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1028 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1029 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1030 talloc_free(r);
1031 return false;
1034 if (DEBUGLEVEL >= 10) {
1035 NDR_PRINT_IN_DEBUG(eventlog_BackupEventLogA, r);
1038 r->out.result = _eventlog_BackupEventLogA(p, r);
1040 if (p->rng_fault_state) {
1041 talloc_free(r);
1042 /* Return true here, srv_pipe_hnd.c will take care */
1043 return true;
1046 if (DEBUGLEVEL >= 10) {
1047 NDR_PRINT_OUT_DEBUG(eventlog_BackupEventLogA, r);
1050 push = ndr_push_init_ctx(r, NULL);
1051 if (push == NULL) {
1052 talloc_free(r);
1053 return false;
1056 ndr_err = call->ndr_push(push, NDR_OUT, r);
1057 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1058 talloc_free(r);
1059 return false;
1062 blob = ndr_push_blob(push);
1063 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1064 talloc_free(r);
1065 return false;
1068 talloc_free(r);
1070 return true;
1073 static bool api_eventlog_OpenEventLogA(pipes_struct *p)
1075 const struct ndr_interface_call *call;
1076 struct ndr_pull *pull;
1077 struct ndr_push *push;
1078 enum ndr_err_code ndr_err;
1079 DATA_BLOB blob;
1080 struct eventlog_OpenEventLogA *r;
1082 call = &ndr_table_eventlog.calls[NDR_EVENTLOG_OPENEVENTLOGA];
1084 r = talloc(talloc_tos(), struct eventlog_OpenEventLogA);
1085 if (r == NULL) {
1086 return false;
1089 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1090 talloc_free(r);
1091 return false;
1094 pull = ndr_pull_init_blob(&blob, r, NULL);
1095 if (pull == NULL) {
1096 talloc_free(r);
1097 return false;
1100 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1101 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1102 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1103 talloc_free(r);
1104 return false;
1107 if (DEBUGLEVEL >= 10) {
1108 NDR_PRINT_IN_DEBUG(eventlog_OpenEventLogA, r);
1111 r->out.result = _eventlog_OpenEventLogA(p, r);
1113 if (p->rng_fault_state) {
1114 talloc_free(r);
1115 /* Return true here, srv_pipe_hnd.c will take care */
1116 return true;
1119 if (DEBUGLEVEL >= 10) {
1120 NDR_PRINT_OUT_DEBUG(eventlog_OpenEventLogA, r);
1123 push = ndr_push_init_ctx(r, NULL);
1124 if (push == NULL) {
1125 talloc_free(r);
1126 return false;
1129 ndr_err = call->ndr_push(push, NDR_OUT, r);
1130 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1131 talloc_free(r);
1132 return false;
1135 blob = ndr_push_blob(push);
1136 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1137 talloc_free(r);
1138 return false;
1141 talloc_free(r);
1143 return true;
1146 static bool api_eventlog_RegisterEventSourceA(pipes_struct *p)
1148 const struct ndr_interface_call *call;
1149 struct ndr_pull *pull;
1150 struct ndr_push *push;
1151 enum ndr_err_code ndr_err;
1152 DATA_BLOB blob;
1153 struct eventlog_RegisterEventSourceA *r;
1155 call = &ndr_table_eventlog.calls[NDR_EVENTLOG_REGISTEREVENTSOURCEA];
1157 r = talloc(talloc_tos(), struct eventlog_RegisterEventSourceA);
1158 if (r == NULL) {
1159 return false;
1162 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1163 talloc_free(r);
1164 return false;
1167 pull = ndr_pull_init_blob(&blob, r, NULL);
1168 if (pull == NULL) {
1169 talloc_free(r);
1170 return false;
1173 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1174 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1175 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1176 talloc_free(r);
1177 return false;
1180 if (DEBUGLEVEL >= 10) {
1181 NDR_PRINT_IN_DEBUG(eventlog_RegisterEventSourceA, r);
1184 r->out.result = _eventlog_RegisterEventSourceA(p, r);
1186 if (p->rng_fault_state) {
1187 talloc_free(r);
1188 /* Return true here, srv_pipe_hnd.c will take care */
1189 return true;
1192 if (DEBUGLEVEL >= 10) {
1193 NDR_PRINT_OUT_DEBUG(eventlog_RegisterEventSourceA, r);
1196 push = ndr_push_init_ctx(r, NULL);
1197 if (push == NULL) {
1198 talloc_free(r);
1199 return false;
1202 ndr_err = call->ndr_push(push, NDR_OUT, r);
1203 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1204 talloc_free(r);
1205 return false;
1208 blob = ndr_push_blob(push);
1209 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1210 talloc_free(r);
1211 return false;
1214 talloc_free(r);
1216 return true;
1219 static bool api_eventlog_OpenBackupEventLogA(pipes_struct *p)
1221 const struct ndr_interface_call *call;
1222 struct ndr_pull *pull;
1223 struct ndr_push *push;
1224 enum ndr_err_code ndr_err;
1225 DATA_BLOB blob;
1226 struct eventlog_OpenBackupEventLogA *r;
1228 call = &ndr_table_eventlog.calls[NDR_EVENTLOG_OPENBACKUPEVENTLOGA];
1230 r = talloc(talloc_tos(), struct eventlog_OpenBackupEventLogA);
1231 if (r == NULL) {
1232 return false;
1235 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1236 talloc_free(r);
1237 return false;
1240 pull = ndr_pull_init_blob(&blob, r, NULL);
1241 if (pull == NULL) {
1242 talloc_free(r);
1243 return false;
1246 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1247 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1248 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1249 talloc_free(r);
1250 return false;
1253 if (DEBUGLEVEL >= 10) {
1254 NDR_PRINT_IN_DEBUG(eventlog_OpenBackupEventLogA, r);
1257 r->out.result = _eventlog_OpenBackupEventLogA(p, r);
1259 if (p->rng_fault_state) {
1260 talloc_free(r);
1261 /* Return true here, srv_pipe_hnd.c will take care */
1262 return true;
1265 if (DEBUGLEVEL >= 10) {
1266 NDR_PRINT_OUT_DEBUG(eventlog_OpenBackupEventLogA, r);
1269 push = ndr_push_init_ctx(r, NULL);
1270 if (push == NULL) {
1271 talloc_free(r);
1272 return false;
1275 ndr_err = call->ndr_push(push, NDR_OUT, r);
1276 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1277 talloc_free(r);
1278 return false;
1281 blob = ndr_push_blob(push);
1282 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1283 talloc_free(r);
1284 return false;
1287 talloc_free(r);
1289 return true;
1292 static bool api_eventlog_ReadEventLogA(pipes_struct *p)
1294 const struct ndr_interface_call *call;
1295 struct ndr_pull *pull;
1296 struct ndr_push *push;
1297 enum ndr_err_code ndr_err;
1298 DATA_BLOB blob;
1299 struct eventlog_ReadEventLogA *r;
1301 call = &ndr_table_eventlog.calls[NDR_EVENTLOG_READEVENTLOGA];
1303 r = talloc(talloc_tos(), struct eventlog_ReadEventLogA);
1304 if (r == NULL) {
1305 return false;
1308 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1309 talloc_free(r);
1310 return false;
1313 pull = ndr_pull_init_blob(&blob, r, NULL);
1314 if (pull == NULL) {
1315 talloc_free(r);
1316 return false;
1319 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1320 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1321 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1322 talloc_free(r);
1323 return false;
1326 if (DEBUGLEVEL >= 10) {
1327 NDR_PRINT_IN_DEBUG(eventlog_ReadEventLogA, r);
1330 r->out.result = _eventlog_ReadEventLogA(p, r);
1332 if (p->rng_fault_state) {
1333 talloc_free(r);
1334 /* Return true here, srv_pipe_hnd.c will take care */
1335 return true;
1338 if (DEBUGLEVEL >= 10) {
1339 NDR_PRINT_OUT_DEBUG(eventlog_ReadEventLogA, r);
1342 push = ndr_push_init_ctx(r, NULL);
1343 if (push == NULL) {
1344 talloc_free(r);
1345 return false;
1348 ndr_err = call->ndr_push(push, NDR_OUT, r);
1349 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1350 talloc_free(r);
1351 return false;
1354 blob = ndr_push_blob(push);
1355 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1356 talloc_free(r);
1357 return false;
1360 talloc_free(r);
1362 return true;
1365 static bool api_eventlog_ReportEventA(pipes_struct *p)
1367 const struct ndr_interface_call *call;
1368 struct ndr_pull *pull;
1369 struct ndr_push *push;
1370 enum ndr_err_code ndr_err;
1371 DATA_BLOB blob;
1372 struct eventlog_ReportEventA *r;
1374 call = &ndr_table_eventlog.calls[NDR_EVENTLOG_REPORTEVENTA];
1376 r = talloc(talloc_tos(), struct eventlog_ReportEventA);
1377 if (r == NULL) {
1378 return false;
1381 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1382 talloc_free(r);
1383 return false;
1386 pull = ndr_pull_init_blob(&blob, r, NULL);
1387 if (pull == NULL) {
1388 talloc_free(r);
1389 return false;
1392 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1393 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1394 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1395 talloc_free(r);
1396 return false;
1399 if (DEBUGLEVEL >= 10) {
1400 NDR_PRINT_IN_DEBUG(eventlog_ReportEventA, r);
1403 r->out.result = _eventlog_ReportEventA(p, r);
1405 if (p->rng_fault_state) {
1406 talloc_free(r);
1407 /* Return true here, srv_pipe_hnd.c will take care */
1408 return true;
1411 if (DEBUGLEVEL >= 10) {
1412 NDR_PRINT_OUT_DEBUG(eventlog_ReportEventA, r);
1415 push = ndr_push_init_ctx(r, NULL);
1416 if (push == NULL) {
1417 talloc_free(r);
1418 return false;
1421 ndr_err = call->ndr_push(push, NDR_OUT, r);
1422 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1423 talloc_free(r);
1424 return false;
1427 blob = ndr_push_blob(push);
1428 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1429 talloc_free(r);
1430 return false;
1433 talloc_free(r);
1435 return true;
1438 static bool api_eventlog_RegisterClusterSvc(pipes_struct *p)
1440 const struct ndr_interface_call *call;
1441 struct ndr_pull *pull;
1442 struct ndr_push *push;
1443 enum ndr_err_code ndr_err;
1444 DATA_BLOB blob;
1445 struct eventlog_RegisterClusterSvc *r;
1447 call = &ndr_table_eventlog.calls[NDR_EVENTLOG_REGISTERCLUSTERSVC];
1449 r = talloc(talloc_tos(), struct eventlog_RegisterClusterSvc);
1450 if (r == NULL) {
1451 return false;
1454 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1455 talloc_free(r);
1456 return false;
1459 pull = ndr_pull_init_blob(&blob, r, NULL);
1460 if (pull == NULL) {
1461 talloc_free(r);
1462 return false;
1465 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1466 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1467 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1468 talloc_free(r);
1469 return false;
1472 if (DEBUGLEVEL >= 10) {
1473 NDR_PRINT_IN_DEBUG(eventlog_RegisterClusterSvc, r);
1476 r->out.result = _eventlog_RegisterClusterSvc(p, r);
1478 if (p->rng_fault_state) {
1479 talloc_free(r);
1480 /* Return true here, srv_pipe_hnd.c will take care */
1481 return true;
1484 if (DEBUGLEVEL >= 10) {
1485 NDR_PRINT_OUT_DEBUG(eventlog_RegisterClusterSvc, r);
1488 push = ndr_push_init_ctx(r, NULL);
1489 if (push == NULL) {
1490 talloc_free(r);
1491 return false;
1494 ndr_err = call->ndr_push(push, NDR_OUT, r);
1495 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1496 talloc_free(r);
1497 return false;
1500 blob = ndr_push_blob(push);
1501 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1502 talloc_free(r);
1503 return false;
1506 talloc_free(r);
1508 return true;
1511 static bool api_eventlog_DeregisterClusterSvc(pipes_struct *p)
1513 const struct ndr_interface_call *call;
1514 struct ndr_pull *pull;
1515 struct ndr_push *push;
1516 enum ndr_err_code ndr_err;
1517 DATA_BLOB blob;
1518 struct eventlog_DeregisterClusterSvc *r;
1520 call = &ndr_table_eventlog.calls[NDR_EVENTLOG_DEREGISTERCLUSTERSVC];
1522 r = talloc(talloc_tos(), struct eventlog_DeregisterClusterSvc);
1523 if (r == NULL) {
1524 return false;
1527 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1528 talloc_free(r);
1529 return false;
1532 pull = ndr_pull_init_blob(&blob, r, NULL);
1533 if (pull == NULL) {
1534 talloc_free(r);
1535 return false;
1538 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1539 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1540 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1541 talloc_free(r);
1542 return false;
1545 if (DEBUGLEVEL >= 10) {
1546 NDR_PRINT_IN_DEBUG(eventlog_DeregisterClusterSvc, r);
1549 r->out.result = _eventlog_DeregisterClusterSvc(p, r);
1551 if (p->rng_fault_state) {
1552 talloc_free(r);
1553 /* Return true here, srv_pipe_hnd.c will take care */
1554 return true;
1557 if (DEBUGLEVEL >= 10) {
1558 NDR_PRINT_OUT_DEBUG(eventlog_DeregisterClusterSvc, r);
1561 push = ndr_push_init_ctx(r, NULL);
1562 if (push == NULL) {
1563 talloc_free(r);
1564 return false;
1567 ndr_err = call->ndr_push(push, NDR_OUT, r);
1568 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1569 talloc_free(r);
1570 return false;
1573 blob = ndr_push_blob(push);
1574 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1575 talloc_free(r);
1576 return false;
1579 talloc_free(r);
1581 return true;
1584 static bool api_eventlog_WriteClusterEvents(pipes_struct *p)
1586 const struct ndr_interface_call *call;
1587 struct ndr_pull *pull;
1588 struct ndr_push *push;
1589 enum ndr_err_code ndr_err;
1590 DATA_BLOB blob;
1591 struct eventlog_WriteClusterEvents *r;
1593 call = &ndr_table_eventlog.calls[NDR_EVENTLOG_WRITECLUSTEREVENTS];
1595 r = talloc(talloc_tos(), struct eventlog_WriteClusterEvents);
1596 if (r == NULL) {
1597 return false;
1600 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1601 talloc_free(r);
1602 return false;
1605 pull = ndr_pull_init_blob(&blob, r, NULL);
1606 if (pull == NULL) {
1607 talloc_free(r);
1608 return false;
1611 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1612 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1613 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1614 talloc_free(r);
1615 return false;
1618 if (DEBUGLEVEL >= 10) {
1619 NDR_PRINT_IN_DEBUG(eventlog_WriteClusterEvents, r);
1622 r->out.result = _eventlog_WriteClusterEvents(p, r);
1624 if (p->rng_fault_state) {
1625 talloc_free(r);
1626 /* Return true here, srv_pipe_hnd.c will take care */
1627 return true;
1630 if (DEBUGLEVEL >= 10) {
1631 NDR_PRINT_OUT_DEBUG(eventlog_WriteClusterEvents, r);
1634 push = ndr_push_init_ctx(r, NULL);
1635 if (push == NULL) {
1636 talloc_free(r);
1637 return false;
1640 ndr_err = call->ndr_push(push, NDR_OUT, r);
1641 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1642 talloc_free(r);
1643 return false;
1646 blob = ndr_push_blob(push);
1647 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1648 talloc_free(r);
1649 return false;
1652 talloc_free(r);
1654 return true;
1657 static bool api_eventlog_GetLogIntormation(pipes_struct *p)
1659 const struct ndr_interface_call *call;
1660 struct ndr_pull *pull;
1661 struct ndr_push *push;
1662 enum ndr_err_code ndr_err;
1663 DATA_BLOB blob;
1664 struct eventlog_GetLogIntormation *r;
1666 call = &ndr_table_eventlog.calls[NDR_EVENTLOG_GETLOGINTORMATION];
1668 r = talloc(talloc_tos(), struct eventlog_GetLogIntormation);
1669 if (r == NULL) {
1670 return false;
1673 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1674 talloc_free(r);
1675 return false;
1678 pull = ndr_pull_init_blob(&blob, r, NULL);
1679 if (pull == NULL) {
1680 talloc_free(r);
1681 return false;
1684 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1685 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1686 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1687 talloc_free(r);
1688 return false;
1691 if (DEBUGLEVEL >= 10) {
1692 NDR_PRINT_IN_DEBUG(eventlog_GetLogIntormation, r);
1695 r->out.result = _eventlog_GetLogIntormation(p, r);
1697 if (p->rng_fault_state) {
1698 talloc_free(r);
1699 /* Return true here, srv_pipe_hnd.c will take care */
1700 return true;
1703 if (DEBUGLEVEL >= 10) {
1704 NDR_PRINT_OUT_DEBUG(eventlog_GetLogIntormation, r);
1707 push = ndr_push_init_ctx(r, NULL);
1708 if (push == NULL) {
1709 talloc_free(r);
1710 return false;
1713 ndr_err = call->ndr_push(push, NDR_OUT, r);
1714 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1715 talloc_free(r);
1716 return false;
1719 blob = ndr_push_blob(push);
1720 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1721 talloc_free(r);
1722 return false;
1725 talloc_free(r);
1727 return true;
1730 static bool api_eventlog_FlushEventLog(pipes_struct *p)
1732 const struct ndr_interface_call *call;
1733 struct ndr_pull *pull;
1734 struct ndr_push *push;
1735 enum ndr_err_code ndr_err;
1736 DATA_BLOB blob;
1737 struct eventlog_FlushEventLog *r;
1739 call = &ndr_table_eventlog.calls[NDR_EVENTLOG_FLUSHEVENTLOG];
1741 r = talloc(talloc_tos(), struct eventlog_FlushEventLog);
1742 if (r == NULL) {
1743 return false;
1746 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1747 talloc_free(r);
1748 return false;
1751 pull = ndr_pull_init_blob(&blob, r, NULL);
1752 if (pull == NULL) {
1753 talloc_free(r);
1754 return false;
1757 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1758 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1759 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1760 talloc_free(r);
1761 return false;
1764 if (DEBUGLEVEL >= 10) {
1765 NDR_PRINT_IN_DEBUG(eventlog_FlushEventLog, r);
1768 r->out.result = _eventlog_FlushEventLog(p, r);
1770 if (p->rng_fault_state) {
1771 talloc_free(r);
1772 /* Return true here, srv_pipe_hnd.c will take care */
1773 return true;
1776 if (DEBUGLEVEL >= 10) {
1777 NDR_PRINT_OUT_DEBUG(eventlog_FlushEventLog, r);
1780 push = ndr_push_init_ctx(r, NULL);
1781 if (push == NULL) {
1782 talloc_free(r);
1783 return false;
1786 ndr_err = call->ndr_push(push, NDR_OUT, r);
1787 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1788 talloc_free(r);
1789 return false;
1792 blob = ndr_push_blob(push);
1793 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1794 talloc_free(r);
1795 return false;
1798 talloc_free(r);
1800 return true;
1804 /* Tables */
1805 static struct api_struct api_eventlog_cmds[] =
1807 {"EVENTLOG_CLEAREVENTLOGW", NDR_EVENTLOG_CLEAREVENTLOGW, api_eventlog_ClearEventLogW},
1808 {"EVENTLOG_BACKUPEVENTLOGW", NDR_EVENTLOG_BACKUPEVENTLOGW, api_eventlog_BackupEventLogW},
1809 {"EVENTLOG_CLOSEEVENTLOG", NDR_EVENTLOG_CLOSEEVENTLOG, api_eventlog_CloseEventLog},
1810 {"EVENTLOG_DEREGISTEREVENTSOURCE", NDR_EVENTLOG_DEREGISTEREVENTSOURCE, api_eventlog_DeregisterEventSource},
1811 {"EVENTLOG_GETNUMRECORDS", NDR_EVENTLOG_GETNUMRECORDS, api_eventlog_GetNumRecords},
1812 {"EVENTLOG_GETOLDESTRECORD", NDR_EVENTLOG_GETOLDESTRECORD, api_eventlog_GetOldestRecord},
1813 {"EVENTLOG_CHANGENOTIFY", NDR_EVENTLOG_CHANGENOTIFY, api_eventlog_ChangeNotify},
1814 {"EVENTLOG_OPENEVENTLOGW", NDR_EVENTLOG_OPENEVENTLOGW, api_eventlog_OpenEventLogW},
1815 {"EVENTLOG_REGISTEREVENTSOURCEW", NDR_EVENTLOG_REGISTEREVENTSOURCEW, api_eventlog_RegisterEventSourceW},
1816 {"EVENTLOG_OPENBACKUPEVENTLOGW", NDR_EVENTLOG_OPENBACKUPEVENTLOGW, api_eventlog_OpenBackupEventLogW},
1817 {"EVENTLOG_READEVENTLOGW", NDR_EVENTLOG_READEVENTLOGW, api_eventlog_ReadEventLogW},
1818 {"EVENTLOG_REPORTEVENTW", NDR_EVENTLOG_REPORTEVENTW, api_eventlog_ReportEventW},
1819 {"EVENTLOG_CLEAREVENTLOGA", NDR_EVENTLOG_CLEAREVENTLOGA, api_eventlog_ClearEventLogA},
1820 {"EVENTLOG_BACKUPEVENTLOGA", NDR_EVENTLOG_BACKUPEVENTLOGA, api_eventlog_BackupEventLogA},
1821 {"EVENTLOG_OPENEVENTLOGA", NDR_EVENTLOG_OPENEVENTLOGA, api_eventlog_OpenEventLogA},
1822 {"EVENTLOG_REGISTEREVENTSOURCEA", NDR_EVENTLOG_REGISTEREVENTSOURCEA, api_eventlog_RegisterEventSourceA},
1823 {"EVENTLOG_OPENBACKUPEVENTLOGA", NDR_EVENTLOG_OPENBACKUPEVENTLOGA, api_eventlog_OpenBackupEventLogA},
1824 {"EVENTLOG_READEVENTLOGA", NDR_EVENTLOG_READEVENTLOGA, api_eventlog_ReadEventLogA},
1825 {"EVENTLOG_REPORTEVENTA", NDR_EVENTLOG_REPORTEVENTA, api_eventlog_ReportEventA},
1826 {"EVENTLOG_REGISTERCLUSTERSVC", NDR_EVENTLOG_REGISTERCLUSTERSVC, api_eventlog_RegisterClusterSvc},
1827 {"EVENTLOG_DEREGISTERCLUSTERSVC", NDR_EVENTLOG_DEREGISTERCLUSTERSVC, api_eventlog_DeregisterClusterSvc},
1828 {"EVENTLOG_WRITECLUSTEREVENTS", NDR_EVENTLOG_WRITECLUSTEREVENTS, api_eventlog_WriteClusterEvents},
1829 {"EVENTLOG_GETLOGINTORMATION", NDR_EVENTLOG_GETLOGINTORMATION, api_eventlog_GetLogIntormation},
1830 {"EVENTLOG_FLUSHEVENTLOG", NDR_EVENTLOG_FLUSHEVENTLOG, api_eventlog_FlushEventLog},
1833 void eventlog_get_pipe_fns(struct api_struct **fns, int *n_fns)
1835 *fns = api_eventlog_cmds;
1836 *n_fns = sizeof(api_eventlog_cmds) / sizeof(struct api_struct);
1839 NTSTATUS rpc_eventlog_init(void)
1841 return rpc_srv_register(SMB_RPC_INTERFACE_VERSION, "eventlog", "eventlog", &ndr_table_eventlog, api_eventlog_cmds, sizeof(api_eventlog_cmds) / sizeof(struct api_struct));