2 * Unix SMB/CIFS implementation.
3 * server auto-generated by pidl. DO NOT MODIFY!
7 #include "librpc/gen_ndr/srv_winreg.h"
9 static BOOL api_winreg_OpenHKCR(pipes_struct *p)
11 struct ndr_pull *pull;
12 struct ndr_push *push;
15 struct winreg_OpenHKCR r;
16 TALLOC_CTX *mem_ctx = talloc_init("api_winreg_OpenHKCR");
18 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
23 pull = ndr_pull_init_blob(&blob, mem_ctx);
29 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
30 status = ndr_pull_winreg_OpenHKCR(pull, NDR_IN, &r);
31 if (NT_STATUS_IS_ERR(status)) {
37 NDR_PRINT_IN_DEBUG(winreg_OpenHKCR, &r);
40 r.out.handle = talloc_zero(mem_ctx, struct policy_handle);
41 if (r.out.handle == NULL) {
46 r.out.result = _winreg_OpenHKCR(p, r.in.system_name, r.in.access_mask, r.out.handle);
48 if (p->rng_fault_state) {
50 /* Return True here, srv_pipe_hnd.c will take care */
55 NDR_PRINT_OUT_DEBUG(winreg_OpenHKCR, &r);
57 push = ndr_push_init_ctx(mem_ctx);
63 status = ndr_push_winreg_OpenHKCR(push, NDR_OUT, &r);
64 if (NT_STATUS_IS_ERR(status)) {
69 blob = ndr_push_blob(push);
70 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
80 static BOOL api_winreg_OpenHKCU(pipes_struct *p)
82 struct ndr_pull *pull;
83 struct ndr_push *push;
86 struct winreg_OpenHKCU r;
87 TALLOC_CTX *mem_ctx = talloc_init("api_winreg_OpenHKCU");
89 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
94 pull = ndr_pull_init_blob(&blob, mem_ctx);
100 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
101 status = ndr_pull_winreg_OpenHKCU(pull, NDR_IN, &r);
102 if (NT_STATUS_IS_ERR(status)) {
103 talloc_free(mem_ctx);
107 if (DEBUGLEVEL >= 10)
108 NDR_PRINT_IN_DEBUG(winreg_OpenHKCU, &r);
111 r.out.handle = talloc_zero(mem_ctx, struct policy_handle);
112 if (r.out.handle == NULL) {
113 talloc_free(mem_ctx);
117 r.out.result = _winreg_OpenHKCU(p, r.in.system_name, r.in.access_mask, r.out.handle);
119 if (p->rng_fault_state) {
120 talloc_free(mem_ctx);
121 /* Return True here, srv_pipe_hnd.c will take care */
125 if (DEBUGLEVEL >= 10)
126 NDR_PRINT_OUT_DEBUG(winreg_OpenHKCU, &r);
128 push = ndr_push_init_ctx(mem_ctx);
130 talloc_free(mem_ctx);
134 status = ndr_push_winreg_OpenHKCU(push, NDR_OUT, &r);
135 if (NT_STATUS_IS_ERR(status)) {
136 talloc_free(mem_ctx);
140 blob = ndr_push_blob(push);
141 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
142 talloc_free(mem_ctx);
146 talloc_free(mem_ctx);
151 static BOOL api_winreg_OpenHKLM(pipes_struct *p)
153 struct ndr_pull *pull;
154 struct ndr_push *push;
157 struct winreg_OpenHKLM r;
158 TALLOC_CTX *mem_ctx = talloc_init("api_winreg_OpenHKLM");
160 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
161 talloc_free(mem_ctx);
165 pull = ndr_pull_init_blob(&blob, mem_ctx);
167 talloc_free(mem_ctx);
171 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
172 status = ndr_pull_winreg_OpenHKLM(pull, NDR_IN, &r);
173 if (NT_STATUS_IS_ERR(status)) {
174 talloc_free(mem_ctx);
178 if (DEBUGLEVEL >= 10)
179 NDR_PRINT_IN_DEBUG(winreg_OpenHKLM, &r);
182 r.out.handle = talloc_zero(mem_ctx, struct policy_handle);
183 if (r.out.handle == NULL) {
184 talloc_free(mem_ctx);
188 r.out.result = _winreg_OpenHKLM(p, r.in.system_name, r.in.access_mask, r.out.handle);
190 if (p->rng_fault_state) {
191 talloc_free(mem_ctx);
192 /* Return True here, srv_pipe_hnd.c will take care */
196 if (DEBUGLEVEL >= 10)
197 NDR_PRINT_OUT_DEBUG(winreg_OpenHKLM, &r);
199 push = ndr_push_init_ctx(mem_ctx);
201 talloc_free(mem_ctx);
205 status = ndr_push_winreg_OpenHKLM(push, NDR_OUT, &r);
206 if (NT_STATUS_IS_ERR(status)) {
207 talloc_free(mem_ctx);
211 blob = ndr_push_blob(push);
212 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
213 talloc_free(mem_ctx);
217 talloc_free(mem_ctx);
222 static BOOL api_winreg_OpenHKPD(pipes_struct *p)
224 struct ndr_pull *pull;
225 struct ndr_push *push;
228 struct winreg_OpenHKPD r;
229 TALLOC_CTX *mem_ctx = talloc_init("api_winreg_OpenHKPD");
231 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
232 talloc_free(mem_ctx);
236 pull = ndr_pull_init_blob(&blob, mem_ctx);
238 talloc_free(mem_ctx);
242 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
243 status = ndr_pull_winreg_OpenHKPD(pull, NDR_IN, &r);
244 if (NT_STATUS_IS_ERR(status)) {
245 talloc_free(mem_ctx);
249 if (DEBUGLEVEL >= 10)
250 NDR_PRINT_IN_DEBUG(winreg_OpenHKPD, &r);
253 r.out.handle = talloc_zero(mem_ctx, struct policy_handle);
254 if (r.out.handle == NULL) {
255 talloc_free(mem_ctx);
259 r.out.result = _winreg_OpenHKPD(p, r.in.system_name, r.in.access_mask, r.out.handle);
261 if (p->rng_fault_state) {
262 talloc_free(mem_ctx);
263 /* Return True here, srv_pipe_hnd.c will take care */
267 if (DEBUGLEVEL >= 10)
268 NDR_PRINT_OUT_DEBUG(winreg_OpenHKPD, &r);
270 push = ndr_push_init_ctx(mem_ctx);
272 talloc_free(mem_ctx);
276 status = ndr_push_winreg_OpenHKPD(push, NDR_OUT, &r);
277 if (NT_STATUS_IS_ERR(status)) {
278 talloc_free(mem_ctx);
282 blob = ndr_push_blob(push);
283 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
284 talloc_free(mem_ctx);
288 talloc_free(mem_ctx);
293 static BOOL api_winreg_OpenHKU(pipes_struct *p)
295 struct ndr_pull *pull;
296 struct ndr_push *push;
299 struct winreg_OpenHKU r;
300 TALLOC_CTX *mem_ctx = talloc_init("api_winreg_OpenHKU");
302 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
303 talloc_free(mem_ctx);
307 pull = ndr_pull_init_blob(&blob, mem_ctx);
309 talloc_free(mem_ctx);
313 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
314 status = ndr_pull_winreg_OpenHKU(pull, NDR_IN, &r);
315 if (NT_STATUS_IS_ERR(status)) {
316 talloc_free(mem_ctx);
320 if (DEBUGLEVEL >= 10)
321 NDR_PRINT_IN_DEBUG(winreg_OpenHKU, &r);
324 r.out.handle = talloc_zero(mem_ctx, struct policy_handle);
325 if (r.out.handle == NULL) {
326 talloc_free(mem_ctx);
330 r.out.result = _winreg_OpenHKU(p, r.in.system_name, r.in.access_mask, r.out.handle);
332 if (p->rng_fault_state) {
333 talloc_free(mem_ctx);
334 /* Return True here, srv_pipe_hnd.c will take care */
338 if (DEBUGLEVEL >= 10)
339 NDR_PRINT_OUT_DEBUG(winreg_OpenHKU, &r);
341 push = ndr_push_init_ctx(mem_ctx);
343 talloc_free(mem_ctx);
347 status = ndr_push_winreg_OpenHKU(push, NDR_OUT, &r);
348 if (NT_STATUS_IS_ERR(status)) {
349 talloc_free(mem_ctx);
353 blob = ndr_push_blob(push);
354 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
355 talloc_free(mem_ctx);
359 talloc_free(mem_ctx);
364 static BOOL api_winreg_CloseKey(pipes_struct *p)
366 struct ndr_pull *pull;
367 struct ndr_push *push;
370 struct winreg_CloseKey r;
371 TALLOC_CTX *mem_ctx = talloc_init("api_winreg_CloseKey");
373 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
374 talloc_free(mem_ctx);
378 pull = ndr_pull_init_blob(&blob, mem_ctx);
380 talloc_free(mem_ctx);
384 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
385 status = ndr_pull_winreg_CloseKey(pull, NDR_IN, &r);
386 if (NT_STATUS_IS_ERR(status)) {
387 talloc_free(mem_ctx);
391 if (DEBUGLEVEL >= 10)
392 NDR_PRINT_IN_DEBUG(winreg_CloseKey, &r);
395 r.out.handle = r.in.handle;
396 r.out.result = _winreg_CloseKey(p, r.in.handle);
398 if (p->rng_fault_state) {
399 talloc_free(mem_ctx);
400 /* Return True here, srv_pipe_hnd.c will take care */
404 if (DEBUGLEVEL >= 10)
405 NDR_PRINT_OUT_DEBUG(winreg_CloseKey, &r);
407 push = ndr_push_init_ctx(mem_ctx);
409 talloc_free(mem_ctx);
413 status = ndr_push_winreg_CloseKey(push, NDR_OUT, &r);
414 if (NT_STATUS_IS_ERR(status)) {
415 talloc_free(mem_ctx);
419 blob = ndr_push_blob(push);
420 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
421 talloc_free(mem_ctx);
425 talloc_free(mem_ctx);
430 static BOOL api_winreg_CreateKey(pipes_struct *p)
432 struct ndr_pull *pull;
433 struct ndr_push *push;
436 struct winreg_CreateKey r;
437 TALLOC_CTX *mem_ctx = talloc_init("api_winreg_CreateKey");
439 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
440 talloc_free(mem_ctx);
444 pull = ndr_pull_init_blob(&blob, mem_ctx);
446 talloc_free(mem_ctx);
450 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
451 status = ndr_pull_winreg_CreateKey(pull, NDR_IN, &r);
452 if (NT_STATUS_IS_ERR(status)) {
453 talloc_free(mem_ctx);
457 if (DEBUGLEVEL >= 10)
458 NDR_PRINT_IN_DEBUG(winreg_CreateKey, &r);
461 r.out.new_handle = talloc_zero(mem_ctx, struct policy_handle);
462 if (r.out.new_handle == NULL) {
463 talloc_free(mem_ctx);
467 r.out.action_taken = r.in.action_taken;
468 r.out.result = _winreg_CreateKey(p, r.in.handle, r.in.name, r.in.keyclass, r.in.options, r.in.access_mask, r.in.secdesc, r.out.new_handle, r.in.action_taken);
470 if (p->rng_fault_state) {
471 talloc_free(mem_ctx);
472 /* Return True here, srv_pipe_hnd.c will take care */
476 if (DEBUGLEVEL >= 10)
477 NDR_PRINT_OUT_DEBUG(winreg_CreateKey, &r);
479 push = ndr_push_init_ctx(mem_ctx);
481 talloc_free(mem_ctx);
485 status = ndr_push_winreg_CreateKey(push, NDR_OUT, &r);
486 if (NT_STATUS_IS_ERR(status)) {
487 talloc_free(mem_ctx);
491 blob = ndr_push_blob(push);
492 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
493 talloc_free(mem_ctx);
497 talloc_free(mem_ctx);
502 static BOOL api_winreg_DeleteKey(pipes_struct *p)
504 struct ndr_pull *pull;
505 struct ndr_push *push;
508 struct winreg_DeleteKey r;
509 TALLOC_CTX *mem_ctx = talloc_init("api_winreg_DeleteKey");
511 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
512 talloc_free(mem_ctx);
516 pull = ndr_pull_init_blob(&blob, mem_ctx);
518 talloc_free(mem_ctx);
522 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
523 status = ndr_pull_winreg_DeleteKey(pull, NDR_IN, &r);
524 if (NT_STATUS_IS_ERR(status)) {
525 talloc_free(mem_ctx);
529 if (DEBUGLEVEL >= 10)
530 NDR_PRINT_IN_DEBUG(winreg_DeleteKey, &r);
532 r.out.result = _winreg_DeleteKey(p, r.in.handle, r.in.key);
534 if (p->rng_fault_state) {
535 talloc_free(mem_ctx);
536 /* Return True here, srv_pipe_hnd.c will take care */
540 if (DEBUGLEVEL >= 10)
541 NDR_PRINT_OUT_DEBUG(winreg_DeleteKey, &r);
543 push = ndr_push_init_ctx(mem_ctx);
545 talloc_free(mem_ctx);
549 status = ndr_push_winreg_DeleteKey(push, NDR_OUT, &r);
550 if (NT_STATUS_IS_ERR(status)) {
551 talloc_free(mem_ctx);
555 blob = ndr_push_blob(push);
556 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
557 talloc_free(mem_ctx);
561 talloc_free(mem_ctx);
566 static BOOL api_winreg_DeleteValue(pipes_struct *p)
568 struct ndr_pull *pull;
569 struct ndr_push *push;
572 struct winreg_DeleteValue r;
573 TALLOC_CTX *mem_ctx = talloc_init("api_winreg_DeleteValue");
575 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
576 talloc_free(mem_ctx);
580 pull = ndr_pull_init_blob(&blob, mem_ctx);
582 talloc_free(mem_ctx);
586 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
587 status = ndr_pull_winreg_DeleteValue(pull, NDR_IN, &r);
588 if (NT_STATUS_IS_ERR(status)) {
589 talloc_free(mem_ctx);
593 if (DEBUGLEVEL >= 10)
594 NDR_PRINT_IN_DEBUG(winreg_DeleteValue, &r);
596 r.out.result = _winreg_DeleteValue(p, r.in.handle, r.in.value);
598 if (p->rng_fault_state) {
599 talloc_free(mem_ctx);
600 /* Return True here, srv_pipe_hnd.c will take care */
604 if (DEBUGLEVEL >= 10)
605 NDR_PRINT_OUT_DEBUG(winreg_DeleteValue, &r);
607 push = ndr_push_init_ctx(mem_ctx);
609 talloc_free(mem_ctx);
613 status = ndr_push_winreg_DeleteValue(push, NDR_OUT, &r);
614 if (NT_STATUS_IS_ERR(status)) {
615 talloc_free(mem_ctx);
619 blob = ndr_push_blob(push);
620 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
621 talloc_free(mem_ctx);
625 talloc_free(mem_ctx);
630 static BOOL api_winreg_EnumKey(pipes_struct *p)
632 struct ndr_pull *pull;
633 struct ndr_push *push;
636 struct winreg_EnumKey r;
637 TALLOC_CTX *mem_ctx = talloc_init("api_winreg_EnumKey");
639 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
640 talloc_free(mem_ctx);
644 pull = ndr_pull_init_blob(&blob, mem_ctx);
646 talloc_free(mem_ctx);
650 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
651 status = ndr_pull_winreg_EnumKey(pull, NDR_IN, &r);
652 if (NT_STATUS_IS_ERR(status)) {
653 talloc_free(mem_ctx);
657 if (DEBUGLEVEL >= 10)
658 NDR_PRINT_IN_DEBUG(winreg_EnumKey, &r);
661 r.out.name = r.in.name;
662 r.out.keyclass = r.in.keyclass;
663 r.out.last_changed_time = r.in.last_changed_time;
664 r.out.result = _winreg_EnumKey(p, r.in.handle, r.in.enum_index, r.in.name, r.in.keyclass, r.in.last_changed_time);
666 if (p->rng_fault_state) {
667 talloc_free(mem_ctx);
668 /* Return True here, srv_pipe_hnd.c will take care */
672 if (DEBUGLEVEL >= 10)
673 NDR_PRINT_OUT_DEBUG(winreg_EnumKey, &r);
675 push = ndr_push_init_ctx(mem_ctx);
677 talloc_free(mem_ctx);
681 status = ndr_push_winreg_EnumKey(push, NDR_OUT, &r);
682 if (NT_STATUS_IS_ERR(status)) {
683 talloc_free(mem_ctx);
687 blob = ndr_push_blob(push);
688 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
689 talloc_free(mem_ctx);
693 talloc_free(mem_ctx);
698 static BOOL api_winreg_EnumValue(pipes_struct *p)
700 struct ndr_pull *pull;
701 struct ndr_push *push;
704 struct winreg_EnumValue r;
705 TALLOC_CTX *mem_ctx = talloc_init("api_winreg_EnumValue");
707 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
708 talloc_free(mem_ctx);
712 pull = ndr_pull_init_blob(&blob, mem_ctx);
714 talloc_free(mem_ctx);
718 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
719 status = ndr_pull_winreg_EnumValue(pull, NDR_IN, &r);
720 if (NT_STATUS_IS_ERR(status)) {
721 talloc_free(mem_ctx);
725 if (DEBUGLEVEL >= 10)
726 NDR_PRINT_IN_DEBUG(winreg_EnumValue, &r);
729 r.out.name = r.in.name;
730 r.out.type = r.in.type;
731 r.out.data = r.in.data;
732 r.out.data_size = r.in.data_size;
733 r.out.value_length = r.in.value_length;
734 r.out.result = _winreg_EnumValue(p, r.in.handle, r.in.enum_index, r.in.name, r.in.type, r.in.data, r.in.data_size, r.in.value_length);
736 if (p->rng_fault_state) {
737 talloc_free(mem_ctx);
738 /* Return True here, srv_pipe_hnd.c will take care */
742 if (DEBUGLEVEL >= 10)
743 NDR_PRINT_OUT_DEBUG(winreg_EnumValue, &r);
745 push = ndr_push_init_ctx(mem_ctx);
747 talloc_free(mem_ctx);
751 status = ndr_push_winreg_EnumValue(push, NDR_OUT, &r);
752 if (NT_STATUS_IS_ERR(status)) {
753 talloc_free(mem_ctx);
757 blob = ndr_push_blob(push);
758 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
759 talloc_free(mem_ctx);
763 talloc_free(mem_ctx);
768 static BOOL api_winreg_FlushKey(pipes_struct *p)
770 struct ndr_pull *pull;
771 struct ndr_push *push;
774 struct winreg_FlushKey r;
775 TALLOC_CTX *mem_ctx = talloc_init("api_winreg_FlushKey");
777 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
778 talloc_free(mem_ctx);
782 pull = ndr_pull_init_blob(&blob, mem_ctx);
784 talloc_free(mem_ctx);
788 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
789 status = ndr_pull_winreg_FlushKey(pull, NDR_IN, &r);
790 if (NT_STATUS_IS_ERR(status)) {
791 talloc_free(mem_ctx);
795 if (DEBUGLEVEL >= 10)
796 NDR_PRINT_IN_DEBUG(winreg_FlushKey, &r);
798 r.out.result = _winreg_FlushKey(p, r.in.handle);
800 if (p->rng_fault_state) {
801 talloc_free(mem_ctx);
802 /* Return True here, srv_pipe_hnd.c will take care */
806 if (DEBUGLEVEL >= 10)
807 NDR_PRINT_OUT_DEBUG(winreg_FlushKey, &r);
809 push = ndr_push_init_ctx(mem_ctx);
811 talloc_free(mem_ctx);
815 status = ndr_push_winreg_FlushKey(push, NDR_OUT, &r);
816 if (NT_STATUS_IS_ERR(status)) {
817 talloc_free(mem_ctx);
821 blob = ndr_push_blob(push);
822 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
823 talloc_free(mem_ctx);
827 talloc_free(mem_ctx);
832 static BOOL api_winreg_GetKeySecurity(pipes_struct *p)
834 struct ndr_pull *pull;
835 struct ndr_push *push;
838 struct winreg_GetKeySecurity r;
839 TALLOC_CTX *mem_ctx = talloc_init("api_winreg_GetKeySecurity");
841 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
842 talloc_free(mem_ctx);
846 pull = ndr_pull_init_blob(&blob, mem_ctx);
848 talloc_free(mem_ctx);
852 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
853 status = ndr_pull_winreg_GetKeySecurity(pull, NDR_IN, &r);
854 if (NT_STATUS_IS_ERR(status)) {
855 talloc_free(mem_ctx);
859 if (DEBUGLEVEL >= 10)
860 NDR_PRINT_IN_DEBUG(winreg_GetKeySecurity, &r);
864 r.out.result = _winreg_GetKeySecurity(p, r.in.handle, r.in.sec_info, r.in.sd);
866 if (p->rng_fault_state) {
867 talloc_free(mem_ctx);
868 /* Return True here, srv_pipe_hnd.c will take care */
872 if (DEBUGLEVEL >= 10)
873 NDR_PRINT_OUT_DEBUG(winreg_GetKeySecurity, &r);
875 push = ndr_push_init_ctx(mem_ctx);
877 talloc_free(mem_ctx);
881 status = ndr_push_winreg_GetKeySecurity(push, NDR_OUT, &r);
882 if (NT_STATUS_IS_ERR(status)) {
883 talloc_free(mem_ctx);
887 blob = ndr_push_blob(push);
888 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
889 talloc_free(mem_ctx);
893 talloc_free(mem_ctx);
898 static BOOL api_winreg_LoadKey(pipes_struct *p)
900 struct ndr_pull *pull;
901 struct ndr_push *push;
904 struct winreg_LoadKey r;
905 TALLOC_CTX *mem_ctx = talloc_init("api_winreg_LoadKey");
907 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
908 talloc_free(mem_ctx);
912 pull = ndr_pull_init_blob(&blob, mem_ctx);
914 talloc_free(mem_ctx);
918 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
919 status = ndr_pull_winreg_LoadKey(pull, NDR_IN, &r);
920 if (NT_STATUS_IS_ERR(status)) {
921 talloc_free(mem_ctx);
925 if (DEBUGLEVEL >= 10)
926 NDR_PRINT_IN_DEBUG(winreg_LoadKey, &r);
928 r.out.result = _winreg_LoadKey(p, r.in.handle, r.in.keyname, r.in.filename);
930 if (p->rng_fault_state) {
931 talloc_free(mem_ctx);
932 /* Return True here, srv_pipe_hnd.c will take care */
936 if (DEBUGLEVEL >= 10)
937 NDR_PRINT_OUT_DEBUG(winreg_LoadKey, &r);
939 push = ndr_push_init_ctx(mem_ctx);
941 talloc_free(mem_ctx);
945 status = ndr_push_winreg_LoadKey(push, NDR_OUT, &r);
946 if (NT_STATUS_IS_ERR(status)) {
947 talloc_free(mem_ctx);
951 blob = ndr_push_blob(push);
952 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
953 talloc_free(mem_ctx);
957 talloc_free(mem_ctx);
962 static BOOL api_winreg_NotifyChangeKeyValue(pipes_struct *p)
964 struct ndr_pull *pull;
965 struct ndr_push *push;
968 struct winreg_NotifyChangeKeyValue r;
969 TALLOC_CTX *mem_ctx = talloc_init("api_winreg_NotifyChangeKeyValue");
971 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
972 talloc_free(mem_ctx);
976 pull = ndr_pull_init_blob(&blob, mem_ctx);
978 talloc_free(mem_ctx);
982 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
983 status = ndr_pull_winreg_NotifyChangeKeyValue(pull, NDR_IN, &r);
984 if (NT_STATUS_IS_ERR(status)) {
985 talloc_free(mem_ctx);
989 if (DEBUGLEVEL >= 10)
990 NDR_PRINT_IN_DEBUG(winreg_NotifyChangeKeyValue, &r);
992 r.out.result = _winreg_NotifyChangeKeyValue(p, r.in.handle, r.in.watch_subtree, r.in.notify_filter, r.in.unknown, r.in.string1, r.in.string2, r.in.unknown2);
994 if (p->rng_fault_state) {
995 talloc_free(mem_ctx);
996 /* Return True here, srv_pipe_hnd.c will take care */
1000 if (DEBUGLEVEL >= 10)
1001 NDR_PRINT_OUT_DEBUG(winreg_NotifyChangeKeyValue, &r);
1003 push = ndr_push_init_ctx(mem_ctx);
1005 talloc_free(mem_ctx);
1009 status = ndr_push_winreg_NotifyChangeKeyValue(push, NDR_OUT, &r);
1010 if (NT_STATUS_IS_ERR(status)) {
1011 talloc_free(mem_ctx);
1015 blob = ndr_push_blob(push);
1016 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
1017 talloc_free(mem_ctx);
1021 talloc_free(mem_ctx);
1026 static BOOL api_winreg_OpenKey(pipes_struct *p)
1028 struct ndr_pull *pull;
1029 struct ndr_push *push;
1032 struct winreg_OpenKey r;
1033 TALLOC_CTX *mem_ctx = talloc_init("api_winreg_OpenKey");
1035 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
1036 talloc_free(mem_ctx);
1040 pull = ndr_pull_init_blob(&blob, mem_ctx);
1042 talloc_free(mem_ctx);
1046 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1047 status = ndr_pull_winreg_OpenKey(pull, NDR_IN, &r);
1048 if (NT_STATUS_IS_ERR(status)) {
1049 talloc_free(mem_ctx);
1053 if (DEBUGLEVEL >= 10)
1054 NDR_PRINT_IN_DEBUG(winreg_OpenKey, &r);
1057 r.out.handle = talloc_zero(mem_ctx, struct policy_handle);
1058 if (r.out.handle == NULL) {
1059 talloc_free(mem_ctx);
1063 r.out.result = _winreg_OpenKey(p, r.in.parent_handle, r.in.keyname, r.in.unknown, r.in.access_mask, r.out.handle);
1065 if (p->rng_fault_state) {
1066 talloc_free(mem_ctx);
1067 /* Return True here, srv_pipe_hnd.c will take care */
1071 if (DEBUGLEVEL >= 10)
1072 NDR_PRINT_OUT_DEBUG(winreg_OpenKey, &r);
1074 push = ndr_push_init_ctx(mem_ctx);
1076 talloc_free(mem_ctx);
1080 status = ndr_push_winreg_OpenKey(push, NDR_OUT, &r);
1081 if (NT_STATUS_IS_ERR(status)) {
1082 talloc_free(mem_ctx);
1086 blob = ndr_push_blob(push);
1087 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
1088 talloc_free(mem_ctx);
1092 talloc_free(mem_ctx);
1097 static BOOL api_winreg_QueryInfoKey(pipes_struct *p)
1099 struct ndr_pull *pull;
1100 struct ndr_push *push;
1103 struct winreg_QueryInfoKey r;
1104 TALLOC_CTX *mem_ctx = talloc_init("api_winreg_QueryInfoKey");
1106 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
1107 talloc_free(mem_ctx);
1111 pull = ndr_pull_init_blob(&blob, mem_ctx);
1113 talloc_free(mem_ctx);
1117 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1118 status = ndr_pull_winreg_QueryInfoKey(pull, NDR_IN, &r);
1119 if (NT_STATUS_IS_ERR(status)) {
1120 talloc_free(mem_ctx);
1124 if (DEBUGLEVEL >= 10)
1125 NDR_PRINT_IN_DEBUG(winreg_QueryInfoKey, &r);
1128 r.out.classname = r.in.classname;
1129 r.out.num_subkeys = talloc_zero(mem_ctx, uint32_t);
1130 if (r.out.num_subkeys == NULL) {
1131 talloc_free(mem_ctx);
1135 r.out.max_subkeylen = talloc_zero(mem_ctx, uint32_t);
1136 if (r.out.max_subkeylen == NULL) {
1137 talloc_free(mem_ctx);
1141 r.out.max_classlen = talloc_zero(mem_ctx, uint32_t);
1142 if (r.out.max_classlen == NULL) {
1143 talloc_free(mem_ctx);
1147 r.out.num_values = talloc_zero(mem_ctx, uint32_t);
1148 if (r.out.num_values == NULL) {
1149 talloc_free(mem_ctx);
1153 r.out.max_valnamelen = talloc_zero(mem_ctx, uint32_t);
1154 if (r.out.max_valnamelen == NULL) {
1155 talloc_free(mem_ctx);
1159 r.out.max_valbufsize = talloc_zero(mem_ctx, uint32_t);
1160 if (r.out.max_valbufsize == NULL) {
1161 talloc_free(mem_ctx);
1165 r.out.secdescsize = talloc_zero(mem_ctx, uint32_t);
1166 if (r.out.secdescsize == NULL) {
1167 talloc_free(mem_ctx);
1171 r.out.last_changed_time = talloc_zero(mem_ctx, NTTIME);
1172 if (r.out.last_changed_time == NULL) {
1173 talloc_free(mem_ctx);
1177 r.out.result = _winreg_QueryInfoKey(p, r.in.handle, r.in.classname, r.out.num_subkeys, r.out.max_subkeylen, r.out.max_classlen, r.out.num_values, r.out.max_valnamelen, r.out.max_valbufsize, r.out.secdescsize, r.out.last_changed_time);
1179 if (p->rng_fault_state) {
1180 talloc_free(mem_ctx);
1181 /* Return True here, srv_pipe_hnd.c will take care */
1185 if (DEBUGLEVEL >= 10)
1186 NDR_PRINT_OUT_DEBUG(winreg_QueryInfoKey, &r);
1188 push = ndr_push_init_ctx(mem_ctx);
1190 talloc_free(mem_ctx);
1194 status = ndr_push_winreg_QueryInfoKey(push, NDR_OUT, &r);
1195 if (NT_STATUS_IS_ERR(status)) {
1196 talloc_free(mem_ctx);
1200 blob = ndr_push_blob(push);
1201 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
1202 talloc_free(mem_ctx);
1206 talloc_free(mem_ctx);
1211 static BOOL api_winreg_QueryValue(pipes_struct *p)
1213 struct ndr_pull *pull;
1214 struct ndr_push *push;
1217 struct winreg_QueryValue r;
1218 TALLOC_CTX *mem_ctx = talloc_init("api_winreg_QueryValue");
1220 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
1221 talloc_free(mem_ctx);
1225 pull = ndr_pull_init_blob(&blob, mem_ctx);
1227 talloc_free(mem_ctx);
1231 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1232 status = ndr_pull_winreg_QueryValue(pull, NDR_IN, &r);
1233 if (NT_STATUS_IS_ERR(status)) {
1234 talloc_free(mem_ctx);
1238 if (DEBUGLEVEL >= 10)
1239 NDR_PRINT_IN_DEBUG(winreg_QueryValue, &r);
1242 r.out.type = r.in.type;
1243 r.out.data = r.in.data;
1244 r.out.data_size = r.in.data_size;
1245 r.out.value_length = r.in.value_length;
1246 r.out.result = _winreg_QueryValue(p, r.in.handle, r.in.value_name, r.in.type, r.in.data, r.in.data_size, r.in.value_length);
1248 if (p->rng_fault_state) {
1249 talloc_free(mem_ctx);
1250 /* Return True here, srv_pipe_hnd.c will take care */
1254 if (DEBUGLEVEL >= 10)
1255 NDR_PRINT_OUT_DEBUG(winreg_QueryValue, &r);
1257 push = ndr_push_init_ctx(mem_ctx);
1259 talloc_free(mem_ctx);
1263 status = ndr_push_winreg_QueryValue(push, NDR_OUT, &r);
1264 if (NT_STATUS_IS_ERR(status)) {
1265 talloc_free(mem_ctx);
1269 blob = ndr_push_blob(push);
1270 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
1271 talloc_free(mem_ctx);
1275 talloc_free(mem_ctx);
1280 static BOOL api_winreg_ReplaceKey(pipes_struct *p)
1282 struct ndr_pull *pull;
1283 struct ndr_push *push;
1286 struct winreg_ReplaceKey r;
1287 TALLOC_CTX *mem_ctx = talloc_init("api_winreg_ReplaceKey");
1289 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
1290 talloc_free(mem_ctx);
1294 pull = ndr_pull_init_blob(&blob, mem_ctx);
1296 talloc_free(mem_ctx);
1300 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1301 status = ndr_pull_winreg_ReplaceKey(pull, NDR_IN, &r);
1302 if (NT_STATUS_IS_ERR(status)) {
1303 talloc_free(mem_ctx);
1307 if (DEBUGLEVEL >= 10)
1308 NDR_PRINT_IN_DEBUG(winreg_ReplaceKey, &r);
1310 r.out.result = _winreg_ReplaceKey(p);
1312 if (p->rng_fault_state) {
1313 talloc_free(mem_ctx);
1314 /* Return True here, srv_pipe_hnd.c will take care */
1318 if (DEBUGLEVEL >= 10)
1319 NDR_PRINT_OUT_DEBUG(winreg_ReplaceKey, &r);
1321 push = ndr_push_init_ctx(mem_ctx);
1323 talloc_free(mem_ctx);
1327 status = ndr_push_winreg_ReplaceKey(push, NDR_OUT, &r);
1328 if (NT_STATUS_IS_ERR(status)) {
1329 talloc_free(mem_ctx);
1333 blob = ndr_push_blob(push);
1334 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
1335 talloc_free(mem_ctx);
1339 talloc_free(mem_ctx);
1344 static BOOL api_winreg_RestoreKey(pipes_struct *p)
1346 struct ndr_pull *pull;
1347 struct ndr_push *push;
1350 struct winreg_RestoreKey r;
1351 TALLOC_CTX *mem_ctx = talloc_init("api_winreg_RestoreKey");
1353 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
1354 talloc_free(mem_ctx);
1358 pull = ndr_pull_init_blob(&blob, mem_ctx);
1360 talloc_free(mem_ctx);
1364 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1365 status = ndr_pull_winreg_RestoreKey(pull, NDR_IN, &r);
1366 if (NT_STATUS_IS_ERR(status)) {
1367 talloc_free(mem_ctx);
1371 if (DEBUGLEVEL >= 10)
1372 NDR_PRINT_IN_DEBUG(winreg_RestoreKey, &r);
1374 r.out.result = _winreg_RestoreKey(p, r.in.handle, r.in.filename, r.in.flags);
1376 if (p->rng_fault_state) {
1377 talloc_free(mem_ctx);
1378 /* Return True here, srv_pipe_hnd.c will take care */
1382 if (DEBUGLEVEL >= 10)
1383 NDR_PRINT_OUT_DEBUG(winreg_RestoreKey, &r);
1385 push = ndr_push_init_ctx(mem_ctx);
1387 talloc_free(mem_ctx);
1391 status = ndr_push_winreg_RestoreKey(push, NDR_OUT, &r);
1392 if (NT_STATUS_IS_ERR(status)) {
1393 talloc_free(mem_ctx);
1397 blob = ndr_push_blob(push);
1398 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
1399 talloc_free(mem_ctx);
1403 talloc_free(mem_ctx);
1408 static BOOL api_winreg_SaveKey(pipes_struct *p)
1410 struct ndr_pull *pull;
1411 struct ndr_push *push;
1414 struct winreg_SaveKey r;
1415 TALLOC_CTX *mem_ctx = talloc_init("api_winreg_SaveKey");
1417 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
1418 talloc_free(mem_ctx);
1422 pull = ndr_pull_init_blob(&blob, mem_ctx);
1424 talloc_free(mem_ctx);
1428 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1429 status = ndr_pull_winreg_SaveKey(pull, NDR_IN, &r);
1430 if (NT_STATUS_IS_ERR(status)) {
1431 talloc_free(mem_ctx);
1435 if (DEBUGLEVEL >= 10)
1436 NDR_PRINT_IN_DEBUG(winreg_SaveKey, &r);
1438 r.out.result = _winreg_SaveKey(p, r.in.handle, r.in.filename, r.in.sec_attrib);
1440 if (p->rng_fault_state) {
1441 talloc_free(mem_ctx);
1442 /* Return True here, srv_pipe_hnd.c will take care */
1446 if (DEBUGLEVEL >= 10)
1447 NDR_PRINT_OUT_DEBUG(winreg_SaveKey, &r);
1449 push = ndr_push_init_ctx(mem_ctx);
1451 talloc_free(mem_ctx);
1455 status = ndr_push_winreg_SaveKey(push, NDR_OUT, &r);
1456 if (NT_STATUS_IS_ERR(status)) {
1457 talloc_free(mem_ctx);
1461 blob = ndr_push_blob(push);
1462 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
1463 talloc_free(mem_ctx);
1467 talloc_free(mem_ctx);
1472 static BOOL api_winreg_SetKeySecurity(pipes_struct *p)
1474 struct ndr_pull *pull;
1475 struct ndr_push *push;
1478 struct winreg_SetKeySecurity r;
1479 TALLOC_CTX *mem_ctx = talloc_init("api_winreg_SetKeySecurity");
1481 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
1482 talloc_free(mem_ctx);
1486 pull = ndr_pull_init_blob(&blob, mem_ctx);
1488 talloc_free(mem_ctx);
1492 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1493 status = ndr_pull_winreg_SetKeySecurity(pull, NDR_IN, &r);
1494 if (NT_STATUS_IS_ERR(status)) {
1495 talloc_free(mem_ctx);
1499 if (DEBUGLEVEL >= 10)
1500 NDR_PRINT_IN_DEBUG(winreg_SetKeySecurity, &r);
1502 r.out.result = _winreg_SetKeySecurity(p, r.in.handle, r.in.access_mask, r.in.sd);
1504 if (p->rng_fault_state) {
1505 talloc_free(mem_ctx);
1506 /* Return True here, srv_pipe_hnd.c will take care */
1510 if (DEBUGLEVEL >= 10)
1511 NDR_PRINT_OUT_DEBUG(winreg_SetKeySecurity, &r);
1513 push = ndr_push_init_ctx(mem_ctx);
1515 talloc_free(mem_ctx);
1519 status = ndr_push_winreg_SetKeySecurity(push, NDR_OUT, &r);
1520 if (NT_STATUS_IS_ERR(status)) {
1521 talloc_free(mem_ctx);
1525 blob = ndr_push_blob(push);
1526 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
1527 talloc_free(mem_ctx);
1531 talloc_free(mem_ctx);
1536 static BOOL api_winreg_SetValue(pipes_struct *p)
1538 struct ndr_pull *pull;
1539 struct ndr_push *push;
1542 struct winreg_SetValue r;
1543 TALLOC_CTX *mem_ctx = talloc_init("api_winreg_SetValue");
1545 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
1546 talloc_free(mem_ctx);
1550 pull = ndr_pull_init_blob(&blob, mem_ctx);
1552 talloc_free(mem_ctx);
1556 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1557 status = ndr_pull_winreg_SetValue(pull, NDR_IN, &r);
1558 if (NT_STATUS_IS_ERR(status)) {
1559 talloc_free(mem_ctx);
1563 if (DEBUGLEVEL >= 10)
1564 NDR_PRINT_IN_DEBUG(winreg_SetValue, &r);
1566 r.out.result = _winreg_SetValue(p, r.in.handle, r.in.name, r.in.type, r.in.data, r.in.size);
1568 if (p->rng_fault_state) {
1569 talloc_free(mem_ctx);
1570 /* Return True here, srv_pipe_hnd.c will take care */
1574 if (DEBUGLEVEL >= 10)
1575 NDR_PRINT_OUT_DEBUG(winreg_SetValue, &r);
1577 push = ndr_push_init_ctx(mem_ctx);
1579 talloc_free(mem_ctx);
1583 status = ndr_push_winreg_SetValue(push, NDR_OUT, &r);
1584 if (NT_STATUS_IS_ERR(status)) {
1585 talloc_free(mem_ctx);
1589 blob = ndr_push_blob(push);
1590 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
1591 talloc_free(mem_ctx);
1595 talloc_free(mem_ctx);
1600 static BOOL api_winreg_UnLoadKey(pipes_struct *p)
1602 struct ndr_pull *pull;
1603 struct ndr_push *push;
1606 struct winreg_UnLoadKey r;
1607 TALLOC_CTX *mem_ctx = talloc_init("api_winreg_UnLoadKey");
1609 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
1610 talloc_free(mem_ctx);
1614 pull = ndr_pull_init_blob(&blob, mem_ctx);
1616 talloc_free(mem_ctx);
1620 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1621 status = ndr_pull_winreg_UnLoadKey(pull, NDR_IN, &r);
1622 if (NT_STATUS_IS_ERR(status)) {
1623 talloc_free(mem_ctx);
1627 if (DEBUGLEVEL >= 10)
1628 NDR_PRINT_IN_DEBUG(winreg_UnLoadKey, &r);
1630 r.out.result = _winreg_UnLoadKey(p);
1632 if (p->rng_fault_state) {
1633 talloc_free(mem_ctx);
1634 /* Return True here, srv_pipe_hnd.c will take care */
1638 if (DEBUGLEVEL >= 10)
1639 NDR_PRINT_OUT_DEBUG(winreg_UnLoadKey, &r);
1641 push = ndr_push_init_ctx(mem_ctx);
1643 talloc_free(mem_ctx);
1647 status = ndr_push_winreg_UnLoadKey(push, NDR_OUT, &r);
1648 if (NT_STATUS_IS_ERR(status)) {
1649 talloc_free(mem_ctx);
1653 blob = ndr_push_blob(push);
1654 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
1655 talloc_free(mem_ctx);
1659 talloc_free(mem_ctx);
1664 static BOOL api_winreg_InitiateSystemShutdown(pipes_struct *p)
1666 struct ndr_pull *pull;
1667 struct ndr_push *push;
1670 struct winreg_InitiateSystemShutdown r;
1671 TALLOC_CTX *mem_ctx = talloc_init("api_winreg_InitiateSystemShutdown");
1673 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
1674 talloc_free(mem_ctx);
1678 pull = ndr_pull_init_blob(&blob, mem_ctx);
1680 talloc_free(mem_ctx);
1684 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1685 status = ndr_pull_winreg_InitiateSystemShutdown(pull, NDR_IN, &r);
1686 if (NT_STATUS_IS_ERR(status)) {
1687 talloc_free(mem_ctx);
1691 if (DEBUGLEVEL >= 10)
1692 NDR_PRINT_IN_DEBUG(winreg_InitiateSystemShutdown, &r);
1694 r.out.result = _winreg_InitiateSystemShutdown(p, r.in.hostname, r.in.message, r.in.timeout, r.in.force_apps, r.in.reboot);
1696 if (p->rng_fault_state) {
1697 talloc_free(mem_ctx);
1698 /* Return True here, srv_pipe_hnd.c will take care */
1702 if (DEBUGLEVEL >= 10)
1703 NDR_PRINT_OUT_DEBUG(winreg_InitiateSystemShutdown, &r);
1705 push = ndr_push_init_ctx(mem_ctx);
1707 talloc_free(mem_ctx);
1711 status = ndr_push_winreg_InitiateSystemShutdown(push, NDR_OUT, &r);
1712 if (NT_STATUS_IS_ERR(status)) {
1713 talloc_free(mem_ctx);
1717 blob = ndr_push_blob(push);
1718 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
1719 talloc_free(mem_ctx);
1723 talloc_free(mem_ctx);
1728 static BOOL api_winreg_AbortSystemShutdown(pipes_struct *p)
1730 struct ndr_pull *pull;
1731 struct ndr_push *push;
1734 struct winreg_AbortSystemShutdown r;
1735 TALLOC_CTX *mem_ctx = talloc_init("api_winreg_AbortSystemShutdown");
1737 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
1738 talloc_free(mem_ctx);
1742 pull = ndr_pull_init_blob(&blob, mem_ctx);
1744 talloc_free(mem_ctx);
1748 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1749 status = ndr_pull_winreg_AbortSystemShutdown(pull, NDR_IN, &r);
1750 if (NT_STATUS_IS_ERR(status)) {
1751 talloc_free(mem_ctx);
1755 if (DEBUGLEVEL >= 10)
1756 NDR_PRINT_IN_DEBUG(winreg_AbortSystemShutdown, &r);
1758 r.out.result = _winreg_AbortSystemShutdown(p, r.in.server);
1760 if (p->rng_fault_state) {
1761 talloc_free(mem_ctx);
1762 /* Return True here, srv_pipe_hnd.c will take care */
1766 if (DEBUGLEVEL >= 10)
1767 NDR_PRINT_OUT_DEBUG(winreg_AbortSystemShutdown, &r);
1769 push = ndr_push_init_ctx(mem_ctx);
1771 talloc_free(mem_ctx);
1775 status = ndr_push_winreg_AbortSystemShutdown(push, NDR_OUT, &r);
1776 if (NT_STATUS_IS_ERR(status)) {
1777 talloc_free(mem_ctx);
1781 blob = ndr_push_blob(push);
1782 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
1783 talloc_free(mem_ctx);
1787 talloc_free(mem_ctx);
1792 static BOOL api_winreg_GetVersion(pipes_struct *p)
1794 struct ndr_pull *pull;
1795 struct ndr_push *push;
1798 struct winreg_GetVersion r;
1799 TALLOC_CTX *mem_ctx = talloc_init("api_winreg_GetVersion");
1801 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
1802 talloc_free(mem_ctx);
1806 pull = ndr_pull_init_blob(&blob, mem_ctx);
1808 talloc_free(mem_ctx);
1812 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1813 status = ndr_pull_winreg_GetVersion(pull, NDR_IN, &r);
1814 if (NT_STATUS_IS_ERR(status)) {
1815 talloc_free(mem_ctx);
1819 if (DEBUGLEVEL >= 10)
1820 NDR_PRINT_IN_DEBUG(winreg_GetVersion, &r);
1823 r.out.version = talloc_zero(mem_ctx, uint32_t);
1824 if (r.out.version == NULL) {
1825 talloc_free(mem_ctx);
1829 r.out.result = _winreg_GetVersion(p, r.in.handle, r.out.version);
1831 if (p->rng_fault_state) {
1832 talloc_free(mem_ctx);
1833 /* Return True here, srv_pipe_hnd.c will take care */
1837 if (DEBUGLEVEL >= 10)
1838 NDR_PRINT_OUT_DEBUG(winreg_GetVersion, &r);
1840 push = ndr_push_init_ctx(mem_ctx);
1842 talloc_free(mem_ctx);
1846 status = ndr_push_winreg_GetVersion(push, NDR_OUT, &r);
1847 if (NT_STATUS_IS_ERR(status)) {
1848 talloc_free(mem_ctx);
1852 blob = ndr_push_blob(push);
1853 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
1854 talloc_free(mem_ctx);
1858 talloc_free(mem_ctx);
1863 static BOOL api_winreg_OpenHKCC(pipes_struct *p)
1865 struct ndr_pull *pull;
1866 struct ndr_push *push;
1869 struct winreg_OpenHKCC r;
1870 TALLOC_CTX *mem_ctx = talloc_init("api_winreg_OpenHKCC");
1872 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
1873 talloc_free(mem_ctx);
1877 pull = ndr_pull_init_blob(&blob, mem_ctx);
1879 talloc_free(mem_ctx);
1883 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1884 status = ndr_pull_winreg_OpenHKCC(pull, NDR_IN, &r);
1885 if (NT_STATUS_IS_ERR(status)) {
1886 talloc_free(mem_ctx);
1890 if (DEBUGLEVEL >= 10)
1891 NDR_PRINT_IN_DEBUG(winreg_OpenHKCC, &r);
1894 r.out.handle = talloc_zero(mem_ctx, struct policy_handle);
1895 if (r.out.handle == NULL) {
1896 talloc_free(mem_ctx);
1900 r.out.result = _winreg_OpenHKCC(p, r.in.system_name, r.in.access_mask, r.out.handle);
1902 if (p->rng_fault_state) {
1903 talloc_free(mem_ctx);
1904 /* Return True here, srv_pipe_hnd.c will take care */
1908 if (DEBUGLEVEL >= 10)
1909 NDR_PRINT_OUT_DEBUG(winreg_OpenHKCC, &r);
1911 push = ndr_push_init_ctx(mem_ctx);
1913 talloc_free(mem_ctx);
1917 status = ndr_push_winreg_OpenHKCC(push, NDR_OUT, &r);
1918 if (NT_STATUS_IS_ERR(status)) {
1919 talloc_free(mem_ctx);
1923 blob = ndr_push_blob(push);
1924 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
1925 talloc_free(mem_ctx);
1929 talloc_free(mem_ctx);
1934 static BOOL api_winreg_OpenHKDD(pipes_struct *p)
1936 struct ndr_pull *pull;
1937 struct ndr_push *push;
1940 struct winreg_OpenHKDD r;
1941 TALLOC_CTX *mem_ctx = talloc_init("api_winreg_OpenHKDD");
1943 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
1944 talloc_free(mem_ctx);
1948 pull = ndr_pull_init_blob(&blob, mem_ctx);
1950 talloc_free(mem_ctx);
1954 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1955 status = ndr_pull_winreg_OpenHKDD(pull, NDR_IN, &r);
1956 if (NT_STATUS_IS_ERR(status)) {
1957 talloc_free(mem_ctx);
1961 if (DEBUGLEVEL >= 10)
1962 NDR_PRINT_IN_DEBUG(winreg_OpenHKDD, &r);
1965 r.out.handle = talloc_zero(mem_ctx, struct policy_handle);
1966 if (r.out.handle == NULL) {
1967 talloc_free(mem_ctx);
1971 r.out.result = _winreg_OpenHKDD(p, r.in.system_name, r.in.access_mask, r.out.handle);
1973 if (p->rng_fault_state) {
1974 talloc_free(mem_ctx);
1975 /* Return True here, srv_pipe_hnd.c will take care */
1979 if (DEBUGLEVEL >= 10)
1980 NDR_PRINT_OUT_DEBUG(winreg_OpenHKDD, &r);
1982 push = ndr_push_init_ctx(mem_ctx);
1984 talloc_free(mem_ctx);
1988 status = ndr_push_winreg_OpenHKDD(push, NDR_OUT, &r);
1989 if (NT_STATUS_IS_ERR(status)) {
1990 talloc_free(mem_ctx);
1994 blob = ndr_push_blob(push);
1995 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
1996 talloc_free(mem_ctx);
2000 talloc_free(mem_ctx);
2005 static BOOL api_winreg_QueryMultipleValues(pipes_struct *p)
2007 struct ndr_pull *pull;
2008 struct ndr_push *push;
2011 struct winreg_QueryMultipleValues r;
2012 TALLOC_CTX *mem_ctx = talloc_init("api_winreg_QueryMultipleValues");
2014 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
2015 talloc_free(mem_ctx);
2019 pull = ndr_pull_init_blob(&blob, mem_ctx);
2021 talloc_free(mem_ctx);
2025 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2026 status = ndr_pull_winreg_QueryMultipleValues(pull, NDR_IN, &r);
2027 if (NT_STATUS_IS_ERR(status)) {
2028 talloc_free(mem_ctx);
2032 if (DEBUGLEVEL >= 10)
2033 NDR_PRINT_IN_DEBUG(winreg_QueryMultipleValues, &r);
2036 r.out.values = r.in.values;
2037 r.out.buffer = r.in.buffer;
2038 r.out.buffer_size = r.in.buffer_size;
2039 r.out.result = _winreg_QueryMultipleValues(p, r.in.key_handle, r.in.values, r.in.num_values, r.in.buffer, r.in.buffer_size);
2041 if (p->rng_fault_state) {
2042 talloc_free(mem_ctx);
2043 /* Return True here, srv_pipe_hnd.c will take care */
2047 if (DEBUGLEVEL >= 10)
2048 NDR_PRINT_OUT_DEBUG(winreg_QueryMultipleValues, &r);
2050 push = ndr_push_init_ctx(mem_ctx);
2052 talloc_free(mem_ctx);
2056 status = ndr_push_winreg_QueryMultipleValues(push, NDR_OUT, &r);
2057 if (NT_STATUS_IS_ERR(status)) {
2058 talloc_free(mem_ctx);
2062 blob = ndr_push_blob(push);
2063 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
2064 talloc_free(mem_ctx);
2068 talloc_free(mem_ctx);
2073 static BOOL api_winreg_InitiateSystemShutdownEx(pipes_struct *p)
2075 struct ndr_pull *pull;
2076 struct ndr_push *push;
2079 struct winreg_InitiateSystemShutdownEx r;
2080 TALLOC_CTX *mem_ctx = talloc_init("api_winreg_InitiateSystemShutdownEx");
2082 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
2083 talloc_free(mem_ctx);
2087 pull = ndr_pull_init_blob(&blob, mem_ctx);
2089 talloc_free(mem_ctx);
2093 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2094 status = ndr_pull_winreg_InitiateSystemShutdownEx(pull, NDR_IN, &r);
2095 if (NT_STATUS_IS_ERR(status)) {
2096 talloc_free(mem_ctx);
2100 if (DEBUGLEVEL >= 10)
2101 NDR_PRINT_IN_DEBUG(winreg_InitiateSystemShutdownEx, &r);
2103 r.out.result = _winreg_InitiateSystemShutdownEx(p, r.in.hostname, r.in.message, r.in.timeout, r.in.force_apps, r.in.reboot, r.in.reason);
2105 if (p->rng_fault_state) {
2106 talloc_free(mem_ctx);
2107 /* Return True here, srv_pipe_hnd.c will take care */
2111 if (DEBUGLEVEL >= 10)
2112 NDR_PRINT_OUT_DEBUG(winreg_InitiateSystemShutdownEx, &r);
2114 push = ndr_push_init_ctx(mem_ctx);
2116 talloc_free(mem_ctx);
2120 status = ndr_push_winreg_InitiateSystemShutdownEx(push, NDR_OUT, &r);
2121 if (NT_STATUS_IS_ERR(status)) {
2122 talloc_free(mem_ctx);
2126 blob = ndr_push_blob(push);
2127 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
2128 talloc_free(mem_ctx);
2132 talloc_free(mem_ctx);
2137 static BOOL api_winreg_SaveKeyEx(pipes_struct *p)
2139 struct ndr_pull *pull;
2140 struct ndr_push *push;
2143 struct winreg_SaveKeyEx r;
2144 TALLOC_CTX *mem_ctx = talloc_init("api_winreg_SaveKeyEx");
2146 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
2147 talloc_free(mem_ctx);
2151 pull = ndr_pull_init_blob(&blob, mem_ctx);
2153 talloc_free(mem_ctx);
2157 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2158 status = ndr_pull_winreg_SaveKeyEx(pull, NDR_IN, &r);
2159 if (NT_STATUS_IS_ERR(status)) {
2160 talloc_free(mem_ctx);
2164 if (DEBUGLEVEL >= 10)
2165 NDR_PRINT_IN_DEBUG(winreg_SaveKeyEx, &r);
2167 r.out.result = _winreg_SaveKeyEx(p);
2169 if (p->rng_fault_state) {
2170 talloc_free(mem_ctx);
2171 /* Return True here, srv_pipe_hnd.c will take care */
2175 if (DEBUGLEVEL >= 10)
2176 NDR_PRINT_OUT_DEBUG(winreg_SaveKeyEx, &r);
2178 push = ndr_push_init_ctx(mem_ctx);
2180 talloc_free(mem_ctx);
2184 status = ndr_push_winreg_SaveKeyEx(push, NDR_OUT, &r);
2185 if (NT_STATUS_IS_ERR(status)) {
2186 talloc_free(mem_ctx);
2190 blob = ndr_push_blob(push);
2191 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
2192 talloc_free(mem_ctx);
2196 talloc_free(mem_ctx);
2201 static BOOL api_winreg_OpenHKPT(pipes_struct *p)
2203 struct ndr_pull *pull;
2204 struct ndr_push *push;
2207 struct winreg_OpenHKPT r;
2208 TALLOC_CTX *mem_ctx = talloc_init("api_winreg_OpenHKPT");
2210 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
2211 talloc_free(mem_ctx);
2215 pull = ndr_pull_init_blob(&blob, mem_ctx);
2217 talloc_free(mem_ctx);
2221 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2222 status = ndr_pull_winreg_OpenHKPT(pull, NDR_IN, &r);
2223 if (NT_STATUS_IS_ERR(status)) {
2224 talloc_free(mem_ctx);
2228 if (DEBUGLEVEL >= 10)
2229 NDR_PRINT_IN_DEBUG(winreg_OpenHKPT, &r);
2232 r.out.handle = talloc_zero(mem_ctx, struct policy_handle);
2233 if (r.out.handle == NULL) {
2234 talloc_free(mem_ctx);
2238 r.out.result = _winreg_OpenHKPT(p, r.in.system_name, r.in.access_mask, r.out.handle);
2240 if (p->rng_fault_state) {
2241 talloc_free(mem_ctx);
2242 /* Return True here, srv_pipe_hnd.c will take care */
2246 if (DEBUGLEVEL >= 10)
2247 NDR_PRINT_OUT_DEBUG(winreg_OpenHKPT, &r);
2249 push = ndr_push_init_ctx(mem_ctx);
2251 talloc_free(mem_ctx);
2255 status = ndr_push_winreg_OpenHKPT(push, NDR_OUT, &r);
2256 if (NT_STATUS_IS_ERR(status)) {
2257 talloc_free(mem_ctx);
2261 blob = ndr_push_blob(push);
2262 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
2263 talloc_free(mem_ctx);
2267 talloc_free(mem_ctx);
2272 static BOOL api_winreg_OpenHKPN(pipes_struct *p)
2274 struct ndr_pull *pull;
2275 struct ndr_push *push;
2278 struct winreg_OpenHKPN r;
2279 TALLOC_CTX *mem_ctx = talloc_init("api_winreg_OpenHKPN");
2281 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
2282 talloc_free(mem_ctx);
2286 pull = ndr_pull_init_blob(&blob, mem_ctx);
2288 talloc_free(mem_ctx);
2292 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2293 status = ndr_pull_winreg_OpenHKPN(pull, NDR_IN, &r);
2294 if (NT_STATUS_IS_ERR(status)) {
2295 talloc_free(mem_ctx);
2299 if (DEBUGLEVEL >= 10)
2300 NDR_PRINT_IN_DEBUG(winreg_OpenHKPN, &r);
2303 r.out.handle = talloc_zero(mem_ctx, struct policy_handle);
2304 if (r.out.handle == NULL) {
2305 talloc_free(mem_ctx);
2309 r.out.result = _winreg_OpenHKPN(p, r.in.system_name, r.in.access_mask, r.out.handle);
2311 if (p->rng_fault_state) {
2312 talloc_free(mem_ctx);
2313 /* Return True here, srv_pipe_hnd.c will take care */
2317 if (DEBUGLEVEL >= 10)
2318 NDR_PRINT_OUT_DEBUG(winreg_OpenHKPN, &r);
2320 push = ndr_push_init_ctx(mem_ctx);
2322 talloc_free(mem_ctx);
2326 status = ndr_push_winreg_OpenHKPN(push, NDR_OUT, &r);
2327 if (NT_STATUS_IS_ERR(status)) {
2328 talloc_free(mem_ctx);
2332 blob = ndr_push_blob(push);
2333 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
2334 talloc_free(mem_ctx);
2338 talloc_free(mem_ctx);
2343 static BOOL api_winreg_QueryMultipleValues2(pipes_struct *p)
2345 struct ndr_pull *pull;
2346 struct ndr_push *push;
2349 struct winreg_QueryMultipleValues2 r;
2350 TALLOC_CTX *mem_ctx = talloc_init("api_winreg_QueryMultipleValues2");
2352 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
2353 talloc_free(mem_ctx);
2357 pull = ndr_pull_init_blob(&blob, mem_ctx);
2359 talloc_free(mem_ctx);
2363 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2364 status = ndr_pull_winreg_QueryMultipleValues2(pull, NDR_IN, &r);
2365 if (NT_STATUS_IS_ERR(status)) {
2366 talloc_free(mem_ctx);
2370 if (DEBUGLEVEL >= 10)
2371 NDR_PRINT_IN_DEBUG(winreg_QueryMultipleValues2, &r);
2373 r.out.result = _winreg_QueryMultipleValues2(p);
2375 if (p->rng_fault_state) {
2376 talloc_free(mem_ctx);
2377 /* Return True here, srv_pipe_hnd.c will take care */
2381 if (DEBUGLEVEL >= 10)
2382 NDR_PRINT_OUT_DEBUG(winreg_QueryMultipleValues2, &r);
2384 push = ndr_push_init_ctx(mem_ctx);
2386 talloc_free(mem_ctx);
2390 status = ndr_push_winreg_QueryMultipleValues2(push, NDR_OUT, &r);
2391 if (NT_STATUS_IS_ERR(status)) {
2392 talloc_free(mem_ctx);
2396 blob = ndr_push_blob(push);
2397 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
2398 talloc_free(mem_ctx);
2402 talloc_free(mem_ctx);
2409 static struct api_struct api_winreg_cmds[] =
2411 {"WINREG_OPENHKCR", DCERPC_WINREG_OPENHKCR, api_winreg_OpenHKCR},
2412 {"WINREG_OPENHKCU", DCERPC_WINREG_OPENHKCU, api_winreg_OpenHKCU},
2413 {"WINREG_OPENHKLM", DCERPC_WINREG_OPENHKLM, api_winreg_OpenHKLM},
2414 {"WINREG_OPENHKPD", DCERPC_WINREG_OPENHKPD, api_winreg_OpenHKPD},
2415 {"WINREG_OPENHKU", DCERPC_WINREG_OPENHKU, api_winreg_OpenHKU},
2416 {"WINREG_CLOSEKEY", DCERPC_WINREG_CLOSEKEY, api_winreg_CloseKey},
2417 {"WINREG_CREATEKEY", DCERPC_WINREG_CREATEKEY, api_winreg_CreateKey},
2418 {"WINREG_DELETEKEY", DCERPC_WINREG_DELETEKEY, api_winreg_DeleteKey},
2419 {"WINREG_DELETEVALUE", DCERPC_WINREG_DELETEVALUE, api_winreg_DeleteValue},
2420 {"WINREG_ENUMKEY", DCERPC_WINREG_ENUMKEY, api_winreg_EnumKey},
2421 {"WINREG_ENUMVALUE", DCERPC_WINREG_ENUMVALUE, api_winreg_EnumValue},
2422 {"WINREG_FLUSHKEY", DCERPC_WINREG_FLUSHKEY, api_winreg_FlushKey},
2423 {"WINREG_GETKEYSECURITY", DCERPC_WINREG_GETKEYSECURITY, api_winreg_GetKeySecurity},
2424 {"WINREG_LOADKEY", DCERPC_WINREG_LOADKEY, api_winreg_LoadKey},
2425 {"WINREG_NOTIFYCHANGEKEYVALUE", DCERPC_WINREG_NOTIFYCHANGEKEYVALUE, api_winreg_NotifyChangeKeyValue},
2426 {"WINREG_OPENKEY", DCERPC_WINREG_OPENKEY, api_winreg_OpenKey},
2427 {"WINREG_QUERYINFOKEY", DCERPC_WINREG_QUERYINFOKEY, api_winreg_QueryInfoKey},
2428 {"WINREG_QUERYVALUE", DCERPC_WINREG_QUERYVALUE, api_winreg_QueryValue},
2429 {"WINREG_REPLACEKEY", DCERPC_WINREG_REPLACEKEY, api_winreg_ReplaceKey},
2430 {"WINREG_RESTOREKEY", DCERPC_WINREG_RESTOREKEY, api_winreg_RestoreKey},
2431 {"WINREG_SAVEKEY", DCERPC_WINREG_SAVEKEY, api_winreg_SaveKey},
2432 {"WINREG_SETKEYSECURITY", DCERPC_WINREG_SETKEYSECURITY, api_winreg_SetKeySecurity},
2433 {"WINREG_SETVALUE", DCERPC_WINREG_SETVALUE, api_winreg_SetValue},
2434 {"WINREG_UNLOADKEY", DCERPC_WINREG_UNLOADKEY, api_winreg_UnLoadKey},
2435 {"WINREG_INITIATESYSTEMSHUTDOWN", DCERPC_WINREG_INITIATESYSTEMSHUTDOWN, api_winreg_InitiateSystemShutdown},
2436 {"WINREG_ABORTSYSTEMSHUTDOWN", DCERPC_WINREG_ABORTSYSTEMSHUTDOWN, api_winreg_AbortSystemShutdown},
2437 {"WINREG_GETVERSION", DCERPC_WINREG_GETVERSION, api_winreg_GetVersion},
2438 {"WINREG_OPENHKCC", DCERPC_WINREG_OPENHKCC, api_winreg_OpenHKCC},
2439 {"WINREG_OPENHKDD", DCERPC_WINREG_OPENHKDD, api_winreg_OpenHKDD},
2440 {"WINREG_QUERYMULTIPLEVALUES", DCERPC_WINREG_QUERYMULTIPLEVALUES, api_winreg_QueryMultipleValues},
2441 {"WINREG_INITIATESYSTEMSHUTDOWNEX", DCERPC_WINREG_INITIATESYSTEMSHUTDOWNEX, api_winreg_InitiateSystemShutdownEx},
2442 {"WINREG_SAVEKEYEX", DCERPC_WINREG_SAVEKEYEX, api_winreg_SaveKeyEx},
2443 {"WINREG_OPENHKPT", DCERPC_WINREG_OPENHKPT, api_winreg_OpenHKPT},
2444 {"WINREG_OPENHKPN", DCERPC_WINREG_OPENHKPN, api_winreg_OpenHKPN},
2445 {"WINREG_QUERYMULTIPLEVALUES2", DCERPC_WINREG_QUERYMULTIPLEVALUES2, api_winreg_QueryMultipleValues2},
2448 void winreg_get_pipe_fns(struct api_struct **fns, int *n_fns)
2450 *fns = api_winreg_cmds;
2451 *n_fns = sizeof(api_winreg_cmds) / sizeof(struct api_struct);
2454 NTSTATUS rpc_winreg_init(void)
2456 return rpc_pipe_register_commands(SMB_RPC_INTERFACE_VERSION, "winreg", "winreg", api_winreg_cmds, sizeof(api_winreg_cmds) / sizeof(struct api_struct));