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 const struct ndr_interface_call *call;
12 struct ndr_pull *pull;
13 struct ndr_push *push;
16 struct winreg_OpenHKCR *r;
18 call = &ndr_table_winreg.calls[NDR_WINREG_OPENHKCR];
20 r = talloc(NULL, struct winreg_OpenHKCR);
25 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
30 pull = ndr_pull_init_blob(&blob, r);
36 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
37 status = call->ndr_pull(pull, NDR_IN, r);
38 if (NT_STATUS_IS_ERR(status)) {
44 NDR_PRINT_IN_DEBUG(winreg_OpenHKCR, r);
47 r->out.handle = talloc_zero(r, struct policy_handle);
48 if (r->out.handle == NULL) {
53 r->out.result = _winreg_OpenHKCR(p, r);
55 if (p->rng_fault_state) {
57 /* Return True here, srv_pipe_hnd.c will take care */
62 NDR_PRINT_OUT_DEBUG(winreg_OpenHKCR, r);
64 push = ndr_push_init_ctx(r);
70 status = call->ndr_push(push, NDR_OUT, r);
71 if (NT_STATUS_IS_ERR(status)) {
76 blob = ndr_push_blob(push);
77 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
87 static bool api_winreg_OpenHKCU(pipes_struct *p)
89 const struct ndr_interface_call *call;
90 struct ndr_pull *pull;
91 struct ndr_push *push;
94 struct winreg_OpenHKCU *r;
96 call = &ndr_table_winreg.calls[NDR_WINREG_OPENHKCU];
98 r = talloc(NULL, struct winreg_OpenHKCU);
103 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
108 pull = ndr_pull_init_blob(&blob, r);
114 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
115 status = call->ndr_pull(pull, NDR_IN, r);
116 if (NT_STATUS_IS_ERR(status)) {
121 if (DEBUGLEVEL >= 10)
122 NDR_PRINT_IN_DEBUG(winreg_OpenHKCU, r);
125 r->out.handle = talloc_zero(r, struct policy_handle);
126 if (r->out.handle == NULL) {
131 r->out.result = _winreg_OpenHKCU(p, r);
133 if (p->rng_fault_state) {
135 /* Return True here, srv_pipe_hnd.c will take care */
139 if (DEBUGLEVEL >= 10)
140 NDR_PRINT_OUT_DEBUG(winreg_OpenHKCU, r);
142 push = ndr_push_init_ctx(r);
148 status = call->ndr_push(push, NDR_OUT, r);
149 if (NT_STATUS_IS_ERR(status)) {
154 blob = ndr_push_blob(push);
155 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
165 static bool api_winreg_OpenHKLM(pipes_struct *p)
167 const struct ndr_interface_call *call;
168 struct ndr_pull *pull;
169 struct ndr_push *push;
172 struct winreg_OpenHKLM *r;
174 call = &ndr_table_winreg.calls[NDR_WINREG_OPENHKLM];
176 r = talloc(NULL, struct winreg_OpenHKLM);
181 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
186 pull = ndr_pull_init_blob(&blob, r);
192 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
193 status = call->ndr_pull(pull, NDR_IN, r);
194 if (NT_STATUS_IS_ERR(status)) {
199 if (DEBUGLEVEL >= 10)
200 NDR_PRINT_IN_DEBUG(winreg_OpenHKLM, r);
203 r->out.handle = talloc_zero(r, struct policy_handle);
204 if (r->out.handle == NULL) {
209 r->out.result = _winreg_OpenHKLM(p, r);
211 if (p->rng_fault_state) {
213 /* Return True here, srv_pipe_hnd.c will take care */
217 if (DEBUGLEVEL >= 10)
218 NDR_PRINT_OUT_DEBUG(winreg_OpenHKLM, r);
220 push = ndr_push_init_ctx(r);
226 status = call->ndr_push(push, NDR_OUT, r);
227 if (NT_STATUS_IS_ERR(status)) {
232 blob = ndr_push_blob(push);
233 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
243 static bool api_winreg_OpenHKPD(pipes_struct *p)
245 const struct ndr_interface_call *call;
246 struct ndr_pull *pull;
247 struct ndr_push *push;
250 struct winreg_OpenHKPD *r;
252 call = &ndr_table_winreg.calls[NDR_WINREG_OPENHKPD];
254 r = talloc(NULL, struct winreg_OpenHKPD);
259 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
264 pull = ndr_pull_init_blob(&blob, r);
270 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
271 status = call->ndr_pull(pull, NDR_IN, r);
272 if (NT_STATUS_IS_ERR(status)) {
277 if (DEBUGLEVEL >= 10)
278 NDR_PRINT_IN_DEBUG(winreg_OpenHKPD, r);
281 r->out.handle = talloc_zero(r, struct policy_handle);
282 if (r->out.handle == NULL) {
287 r->out.result = _winreg_OpenHKPD(p, r);
289 if (p->rng_fault_state) {
291 /* Return True here, srv_pipe_hnd.c will take care */
295 if (DEBUGLEVEL >= 10)
296 NDR_PRINT_OUT_DEBUG(winreg_OpenHKPD, r);
298 push = ndr_push_init_ctx(r);
304 status = call->ndr_push(push, NDR_OUT, r);
305 if (NT_STATUS_IS_ERR(status)) {
310 blob = ndr_push_blob(push);
311 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
321 static bool api_winreg_OpenHKU(pipes_struct *p)
323 const struct ndr_interface_call *call;
324 struct ndr_pull *pull;
325 struct ndr_push *push;
328 struct winreg_OpenHKU *r;
330 call = &ndr_table_winreg.calls[NDR_WINREG_OPENHKU];
332 r = talloc(NULL, struct winreg_OpenHKU);
337 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
342 pull = ndr_pull_init_blob(&blob, r);
348 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
349 status = call->ndr_pull(pull, NDR_IN, r);
350 if (NT_STATUS_IS_ERR(status)) {
355 if (DEBUGLEVEL >= 10)
356 NDR_PRINT_IN_DEBUG(winreg_OpenHKU, r);
359 r->out.handle = talloc_zero(r, struct policy_handle);
360 if (r->out.handle == NULL) {
365 r->out.result = _winreg_OpenHKU(p, r);
367 if (p->rng_fault_state) {
369 /* Return True here, srv_pipe_hnd.c will take care */
373 if (DEBUGLEVEL >= 10)
374 NDR_PRINT_OUT_DEBUG(winreg_OpenHKU, r);
376 push = ndr_push_init_ctx(r);
382 status = call->ndr_push(push, NDR_OUT, r);
383 if (NT_STATUS_IS_ERR(status)) {
388 blob = ndr_push_blob(push);
389 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
399 static bool api_winreg_CloseKey(pipes_struct *p)
401 const struct ndr_interface_call *call;
402 struct ndr_pull *pull;
403 struct ndr_push *push;
406 struct winreg_CloseKey *r;
408 call = &ndr_table_winreg.calls[NDR_WINREG_CLOSEKEY];
410 r = talloc(NULL, struct winreg_CloseKey);
415 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
420 pull = ndr_pull_init_blob(&blob, r);
426 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
427 status = call->ndr_pull(pull, NDR_IN, r);
428 if (NT_STATUS_IS_ERR(status)) {
433 if (DEBUGLEVEL >= 10)
434 NDR_PRINT_IN_DEBUG(winreg_CloseKey, r);
437 r->out.handle = r->in.handle;
438 r->out.result = _winreg_CloseKey(p, r);
440 if (p->rng_fault_state) {
442 /* Return True here, srv_pipe_hnd.c will take care */
446 if (DEBUGLEVEL >= 10)
447 NDR_PRINT_OUT_DEBUG(winreg_CloseKey, r);
449 push = ndr_push_init_ctx(r);
455 status = call->ndr_push(push, NDR_OUT, r);
456 if (NT_STATUS_IS_ERR(status)) {
461 blob = ndr_push_blob(push);
462 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
472 static bool api_winreg_CreateKey(pipes_struct *p)
474 const struct ndr_interface_call *call;
475 struct ndr_pull *pull;
476 struct ndr_push *push;
479 struct winreg_CreateKey *r;
481 call = &ndr_table_winreg.calls[NDR_WINREG_CREATEKEY];
483 r = talloc(NULL, struct winreg_CreateKey);
488 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
493 pull = ndr_pull_init_blob(&blob, r);
499 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
500 status = call->ndr_pull(pull, NDR_IN, r);
501 if (NT_STATUS_IS_ERR(status)) {
506 if (DEBUGLEVEL >= 10)
507 NDR_PRINT_IN_DEBUG(winreg_CreateKey, r);
510 r->out.new_handle = talloc_zero(r, struct policy_handle);
511 if (r->out.new_handle == NULL) {
516 r->out.action_taken = r->in.action_taken;
517 r->out.result = _winreg_CreateKey(p, r);
519 if (p->rng_fault_state) {
521 /* Return True here, srv_pipe_hnd.c will take care */
525 if (DEBUGLEVEL >= 10)
526 NDR_PRINT_OUT_DEBUG(winreg_CreateKey, r);
528 push = ndr_push_init_ctx(r);
534 status = call->ndr_push(push, NDR_OUT, r);
535 if (NT_STATUS_IS_ERR(status)) {
540 blob = ndr_push_blob(push);
541 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
551 static bool api_winreg_DeleteKey(pipes_struct *p)
553 const struct ndr_interface_call *call;
554 struct ndr_pull *pull;
555 struct ndr_push *push;
558 struct winreg_DeleteKey *r;
560 call = &ndr_table_winreg.calls[NDR_WINREG_DELETEKEY];
562 r = talloc(NULL, struct winreg_DeleteKey);
567 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
572 pull = ndr_pull_init_blob(&blob, r);
578 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
579 status = call->ndr_pull(pull, NDR_IN, r);
580 if (NT_STATUS_IS_ERR(status)) {
585 if (DEBUGLEVEL >= 10)
586 NDR_PRINT_IN_DEBUG(winreg_DeleteKey, r);
588 r->out.result = _winreg_DeleteKey(p, r);
590 if (p->rng_fault_state) {
592 /* Return True here, srv_pipe_hnd.c will take care */
596 if (DEBUGLEVEL >= 10)
597 NDR_PRINT_OUT_DEBUG(winreg_DeleteKey, r);
599 push = ndr_push_init_ctx(r);
605 status = call->ndr_push(push, NDR_OUT, r);
606 if (NT_STATUS_IS_ERR(status)) {
611 blob = ndr_push_blob(push);
612 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
622 static bool api_winreg_DeleteValue(pipes_struct *p)
624 const struct ndr_interface_call *call;
625 struct ndr_pull *pull;
626 struct ndr_push *push;
629 struct winreg_DeleteValue *r;
631 call = &ndr_table_winreg.calls[NDR_WINREG_DELETEVALUE];
633 r = talloc(NULL, struct winreg_DeleteValue);
638 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
643 pull = ndr_pull_init_blob(&blob, r);
649 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
650 status = call->ndr_pull(pull, NDR_IN, r);
651 if (NT_STATUS_IS_ERR(status)) {
656 if (DEBUGLEVEL >= 10)
657 NDR_PRINT_IN_DEBUG(winreg_DeleteValue, r);
659 r->out.result = _winreg_DeleteValue(p, r);
661 if (p->rng_fault_state) {
663 /* Return True here, srv_pipe_hnd.c will take care */
667 if (DEBUGLEVEL >= 10)
668 NDR_PRINT_OUT_DEBUG(winreg_DeleteValue, r);
670 push = ndr_push_init_ctx(r);
676 status = call->ndr_push(push, NDR_OUT, r);
677 if (NT_STATUS_IS_ERR(status)) {
682 blob = ndr_push_blob(push);
683 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
693 static bool api_winreg_EnumKey(pipes_struct *p)
695 const struct ndr_interface_call *call;
696 struct ndr_pull *pull;
697 struct ndr_push *push;
700 struct winreg_EnumKey *r;
702 call = &ndr_table_winreg.calls[NDR_WINREG_ENUMKEY];
704 r = talloc(NULL, struct winreg_EnumKey);
709 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
714 pull = ndr_pull_init_blob(&blob, r);
720 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
721 status = call->ndr_pull(pull, NDR_IN, r);
722 if (NT_STATUS_IS_ERR(status)) {
727 if (DEBUGLEVEL >= 10)
728 NDR_PRINT_IN_DEBUG(winreg_EnumKey, r);
731 r->out.name = r->in.name;
732 r->out.keyclass = r->in.keyclass;
733 r->out.last_changed_time = r->in.last_changed_time;
734 r->out.result = _winreg_EnumKey(p, r);
736 if (p->rng_fault_state) {
738 /* Return True here, srv_pipe_hnd.c will take care */
742 if (DEBUGLEVEL >= 10)
743 NDR_PRINT_OUT_DEBUG(winreg_EnumKey, r);
745 push = ndr_push_init_ctx(r);
751 status = call->ndr_push(push, NDR_OUT, r);
752 if (NT_STATUS_IS_ERR(status)) {
757 blob = ndr_push_blob(push);
758 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
768 static bool api_winreg_EnumValue(pipes_struct *p)
770 const struct ndr_interface_call *call;
771 struct ndr_pull *pull;
772 struct ndr_push *push;
775 struct winreg_EnumValue *r;
777 call = &ndr_table_winreg.calls[NDR_WINREG_ENUMVALUE];
779 r = talloc(NULL, struct winreg_EnumValue);
784 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
789 pull = ndr_pull_init_blob(&blob, r);
795 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
796 status = call->ndr_pull(pull, NDR_IN, r);
797 if (NT_STATUS_IS_ERR(status)) {
802 if (DEBUGLEVEL >= 10)
803 NDR_PRINT_IN_DEBUG(winreg_EnumValue, r);
806 r->out.name = r->in.name;
807 r->out.type = r->in.type;
808 r->out.value = r->in.value;
809 r->out.size = r->in.size;
810 r->out.length = r->in.length;
811 r->out.result = _winreg_EnumValue(p, r);
813 if (p->rng_fault_state) {
815 /* Return True here, srv_pipe_hnd.c will take care */
819 if (DEBUGLEVEL >= 10)
820 NDR_PRINT_OUT_DEBUG(winreg_EnumValue, r);
822 push = ndr_push_init_ctx(r);
828 status = call->ndr_push(push, NDR_OUT, r);
829 if (NT_STATUS_IS_ERR(status)) {
834 blob = ndr_push_blob(push);
835 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
845 static bool api_winreg_FlushKey(pipes_struct *p)
847 const struct ndr_interface_call *call;
848 struct ndr_pull *pull;
849 struct ndr_push *push;
852 struct winreg_FlushKey *r;
854 call = &ndr_table_winreg.calls[NDR_WINREG_FLUSHKEY];
856 r = talloc(NULL, struct winreg_FlushKey);
861 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
866 pull = ndr_pull_init_blob(&blob, r);
872 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
873 status = call->ndr_pull(pull, NDR_IN, r);
874 if (NT_STATUS_IS_ERR(status)) {
879 if (DEBUGLEVEL >= 10)
880 NDR_PRINT_IN_DEBUG(winreg_FlushKey, r);
882 r->out.result = _winreg_FlushKey(p, r);
884 if (p->rng_fault_state) {
886 /* Return True here, srv_pipe_hnd.c will take care */
890 if (DEBUGLEVEL >= 10)
891 NDR_PRINT_OUT_DEBUG(winreg_FlushKey, r);
893 push = ndr_push_init_ctx(r);
899 status = call->ndr_push(push, NDR_OUT, r);
900 if (NT_STATUS_IS_ERR(status)) {
905 blob = ndr_push_blob(push);
906 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
916 static bool api_winreg_GetKeySecurity(pipes_struct *p)
918 const struct ndr_interface_call *call;
919 struct ndr_pull *pull;
920 struct ndr_push *push;
923 struct winreg_GetKeySecurity *r;
925 call = &ndr_table_winreg.calls[NDR_WINREG_GETKEYSECURITY];
927 r = talloc(NULL, struct winreg_GetKeySecurity);
932 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
937 pull = ndr_pull_init_blob(&blob, r);
943 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
944 status = call->ndr_pull(pull, NDR_IN, r);
945 if (NT_STATUS_IS_ERR(status)) {
950 if (DEBUGLEVEL >= 10)
951 NDR_PRINT_IN_DEBUG(winreg_GetKeySecurity, r);
954 r->out.sd = r->in.sd;
955 r->out.result = _winreg_GetKeySecurity(p, r);
957 if (p->rng_fault_state) {
959 /* Return True here, srv_pipe_hnd.c will take care */
963 if (DEBUGLEVEL >= 10)
964 NDR_PRINT_OUT_DEBUG(winreg_GetKeySecurity, r);
966 push = ndr_push_init_ctx(r);
972 status = call->ndr_push(push, NDR_OUT, r);
973 if (NT_STATUS_IS_ERR(status)) {
978 blob = ndr_push_blob(push);
979 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
989 static bool api_winreg_LoadKey(pipes_struct *p)
991 const struct ndr_interface_call *call;
992 struct ndr_pull *pull;
993 struct ndr_push *push;
996 struct winreg_LoadKey *r;
998 call = &ndr_table_winreg.calls[NDR_WINREG_LOADKEY];
1000 r = talloc(NULL, struct winreg_LoadKey);
1005 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1010 pull = ndr_pull_init_blob(&blob, r);
1016 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1017 status = call->ndr_pull(pull, NDR_IN, r);
1018 if (NT_STATUS_IS_ERR(status)) {
1023 if (DEBUGLEVEL >= 10)
1024 NDR_PRINT_IN_DEBUG(winreg_LoadKey, r);
1026 r->out.result = _winreg_LoadKey(p, r);
1028 if (p->rng_fault_state) {
1030 /* Return True here, srv_pipe_hnd.c will take care */
1034 if (DEBUGLEVEL >= 10)
1035 NDR_PRINT_OUT_DEBUG(winreg_LoadKey, r);
1037 push = ndr_push_init_ctx(r);
1043 status = call->ndr_push(push, NDR_OUT, r);
1044 if (NT_STATUS_IS_ERR(status)) {
1049 blob = ndr_push_blob(push);
1050 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
1060 static bool api_winreg_NotifyChangeKeyValue(pipes_struct *p)
1062 const struct ndr_interface_call *call;
1063 struct ndr_pull *pull;
1064 struct ndr_push *push;
1067 struct winreg_NotifyChangeKeyValue *r;
1069 call = &ndr_table_winreg.calls[NDR_WINREG_NOTIFYCHANGEKEYVALUE];
1071 r = talloc(NULL, struct winreg_NotifyChangeKeyValue);
1076 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1081 pull = ndr_pull_init_blob(&blob, r);
1087 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1088 status = call->ndr_pull(pull, NDR_IN, r);
1089 if (NT_STATUS_IS_ERR(status)) {
1094 if (DEBUGLEVEL >= 10)
1095 NDR_PRINT_IN_DEBUG(winreg_NotifyChangeKeyValue, r);
1097 r->out.result = _winreg_NotifyChangeKeyValue(p, r);
1099 if (p->rng_fault_state) {
1101 /* Return True here, srv_pipe_hnd.c will take care */
1105 if (DEBUGLEVEL >= 10)
1106 NDR_PRINT_OUT_DEBUG(winreg_NotifyChangeKeyValue, r);
1108 push = ndr_push_init_ctx(r);
1114 status = call->ndr_push(push, NDR_OUT, r);
1115 if (NT_STATUS_IS_ERR(status)) {
1120 blob = ndr_push_blob(push);
1121 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
1131 static bool api_winreg_OpenKey(pipes_struct *p)
1133 const struct ndr_interface_call *call;
1134 struct ndr_pull *pull;
1135 struct ndr_push *push;
1138 struct winreg_OpenKey *r;
1140 call = &ndr_table_winreg.calls[NDR_WINREG_OPENKEY];
1142 r = talloc(NULL, struct winreg_OpenKey);
1147 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1152 pull = ndr_pull_init_blob(&blob, r);
1158 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1159 status = call->ndr_pull(pull, NDR_IN, r);
1160 if (NT_STATUS_IS_ERR(status)) {
1165 if (DEBUGLEVEL >= 10)
1166 NDR_PRINT_IN_DEBUG(winreg_OpenKey, r);
1168 ZERO_STRUCT(r->out);
1169 r->out.handle = talloc_zero(r, struct policy_handle);
1170 if (r->out.handle == NULL) {
1175 r->out.result = _winreg_OpenKey(p, r);
1177 if (p->rng_fault_state) {
1179 /* Return True here, srv_pipe_hnd.c will take care */
1183 if (DEBUGLEVEL >= 10)
1184 NDR_PRINT_OUT_DEBUG(winreg_OpenKey, r);
1186 push = ndr_push_init_ctx(r);
1192 status = call->ndr_push(push, NDR_OUT, r);
1193 if (NT_STATUS_IS_ERR(status)) {
1198 blob = ndr_push_blob(push);
1199 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
1209 static bool api_winreg_QueryInfoKey(pipes_struct *p)
1211 const struct ndr_interface_call *call;
1212 struct ndr_pull *pull;
1213 struct ndr_push *push;
1216 struct winreg_QueryInfoKey *r;
1218 call = &ndr_table_winreg.calls[NDR_WINREG_QUERYINFOKEY];
1220 r = talloc(NULL, struct winreg_QueryInfoKey);
1225 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1230 pull = ndr_pull_init_blob(&blob, r);
1236 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1237 status = call->ndr_pull(pull, NDR_IN, r);
1238 if (NT_STATUS_IS_ERR(status)) {
1243 if (DEBUGLEVEL >= 10)
1244 NDR_PRINT_IN_DEBUG(winreg_QueryInfoKey, r);
1246 ZERO_STRUCT(r->out);
1247 r->out.classname = r->in.classname;
1248 r->out.num_subkeys = talloc_zero(r, uint32_t);
1249 if (r->out.num_subkeys == NULL) {
1254 r->out.max_subkeylen = talloc_zero(r, uint32_t);
1255 if (r->out.max_subkeylen == NULL) {
1260 r->out.max_classlen = talloc_zero(r, uint32_t);
1261 if (r->out.max_classlen == NULL) {
1266 r->out.num_values = talloc_zero(r, uint32_t);
1267 if (r->out.num_values == NULL) {
1272 r->out.max_valnamelen = talloc_zero(r, uint32_t);
1273 if (r->out.max_valnamelen == NULL) {
1278 r->out.max_valbufsize = talloc_zero(r, uint32_t);
1279 if (r->out.max_valbufsize == NULL) {
1284 r->out.secdescsize = talloc_zero(r, uint32_t);
1285 if (r->out.secdescsize == NULL) {
1290 r->out.last_changed_time = talloc_zero(r, NTTIME);
1291 if (r->out.last_changed_time == NULL) {
1296 r->out.result = _winreg_QueryInfoKey(p, r);
1298 if (p->rng_fault_state) {
1300 /* Return True here, srv_pipe_hnd.c will take care */
1304 if (DEBUGLEVEL >= 10)
1305 NDR_PRINT_OUT_DEBUG(winreg_QueryInfoKey, r);
1307 push = ndr_push_init_ctx(r);
1313 status = call->ndr_push(push, NDR_OUT, r);
1314 if (NT_STATUS_IS_ERR(status)) {
1319 blob = ndr_push_blob(push);
1320 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
1330 static bool api_winreg_QueryValue(pipes_struct *p)
1332 const struct ndr_interface_call *call;
1333 struct ndr_pull *pull;
1334 struct ndr_push *push;
1337 struct winreg_QueryValue *r;
1339 call = &ndr_table_winreg.calls[NDR_WINREG_QUERYVALUE];
1341 r = talloc(NULL, struct winreg_QueryValue);
1346 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1351 pull = ndr_pull_init_blob(&blob, r);
1357 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1358 status = call->ndr_pull(pull, NDR_IN, r);
1359 if (NT_STATUS_IS_ERR(status)) {
1364 if (DEBUGLEVEL >= 10)
1365 NDR_PRINT_IN_DEBUG(winreg_QueryValue, r);
1367 ZERO_STRUCT(r->out);
1368 r->out.type = r->in.type;
1369 r->out.data = r->in.data;
1370 r->out.data_size = r->in.data_size;
1371 r->out.value_length = r->in.value_length;
1372 r->out.result = _winreg_QueryValue(p, r);
1374 if (p->rng_fault_state) {
1376 /* Return True here, srv_pipe_hnd.c will take care */
1380 if (DEBUGLEVEL >= 10)
1381 NDR_PRINT_OUT_DEBUG(winreg_QueryValue, r);
1383 push = ndr_push_init_ctx(r);
1389 status = call->ndr_push(push, NDR_OUT, r);
1390 if (NT_STATUS_IS_ERR(status)) {
1395 blob = ndr_push_blob(push);
1396 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
1406 static bool api_winreg_ReplaceKey(pipes_struct *p)
1408 const struct ndr_interface_call *call;
1409 struct ndr_pull *pull;
1410 struct ndr_push *push;
1413 struct winreg_ReplaceKey *r;
1415 call = &ndr_table_winreg.calls[NDR_WINREG_REPLACEKEY];
1417 r = talloc(NULL, struct winreg_ReplaceKey);
1422 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1427 pull = ndr_pull_init_blob(&blob, r);
1433 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1434 status = call->ndr_pull(pull, NDR_IN, r);
1435 if (NT_STATUS_IS_ERR(status)) {
1440 if (DEBUGLEVEL >= 10)
1441 NDR_PRINT_IN_DEBUG(winreg_ReplaceKey, r);
1443 r->out.result = _winreg_ReplaceKey(p, r);
1445 if (p->rng_fault_state) {
1447 /* Return True here, srv_pipe_hnd.c will take care */
1451 if (DEBUGLEVEL >= 10)
1452 NDR_PRINT_OUT_DEBUG(winreg_ReplaceKey, r);
1454 push = ndr_push_init_ctx(r);
1460 status = call->ndr_push(push, NDR_OUT, r);
1461 if (NT_STATUS_IS_ERR(status)) {
1466 blob = ndr_push_blob(push);
1467 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
1477 static bool api_winreg_RestoreKey(pipes_struct *p)
1479 const struct ndr_interface_call *call;
1480 struct ndr_pull *pull;
1481 struct ndr_push *push;
1484 struct winreg_RestoreKey *r;
1486 call = &ndr_table_winreg.calls[NDR_WINREG_RESTOREKEY];
1488 r = talloc(NULL, struct winreg_RestoreKey);
1493 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1498 pull = ndr_pull_init_blob(&blob, r);
1504 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1505 status = call->ndr_pull(pull, NDR_IN, r);
1506 if (NT_STATUS_IS_ERR(status)) {
1511 if (DEBUGLEVEL >= 10)
1512 NDR_PRINT_IN_DEBUG(winreg_RestoreKey, r);
1514 r->out.result = _winreg_RestoreKey(p, r);
1516 if (p->rng_fault_state) {
1518 /* Return True here, srv_pipe_hnd.c will take care */
1522 if (DEBUGLEVEL >= 10)
1523 NDR_PRINT_OUT_DEBUG(winreg_RestoreKey, r);
1525 push = ndr_push_init_ctx(r);
1531 status = call->ndr_push(push, NDR_OUT, r);
1532 if (NT_STATUS_IS_ERR(status)) {
1537 blob = ndr_push_blob(push);
1538 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
1548 static bool api_winreg_SaveKey(pipes_struct *p)
1550 const struct ndr_interface_call *call;
1551 struct ndr_pull *pull;
1552 struct ndr_push *push;
1555 struct winreg_SaveKey *r;
1557 call = &ndr_table_winreg.calls[NDR_WINREG_SAVEKEY];
1559 r = talloc(NULL, struct winreg_SaveKey);
1564 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1569 pull = ndr_pull_init_blob(&blob, r);
1575 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1576 status = call->ndr_pull(pull, NDR_IN, r);
1577 if (NT_STATUS_IS_ERR(status)) {
1582 if (DEBUGLEVEL >= 10)
1583 NDR_PRINT_IN_DEBUG(winreg_SaveKey, r);
1585 r->out.result = _winreg_SaveKey(p, r);
1587 if (p->rng_fault_state) {
1589 /* Return True here, srv_pipe_hnd.c will take care */
1593 if (DEBUGLEVEL >= 10)
1594 NDR_PRINT_OUT_DEBUG(winreg_SaveKey, r);
1596 push = ndr_push_init_ctx(r);
1602 status = call->ndr_push(push, NDR_OUT, r);
1603 if (NT_STATUS_IS_ERR(status)) {
1608 blob = ndr_push_blob(push);
1609 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
1619 static bool api_winreg_SetKeySecurity(pipes_struct *p)
1621 const struct ndr_interface_call *call;
1622 struct ndr_pull *pull;
1623 struct ndr_push *push;
1626 struct winreg_SetKeySecurity *r;
1628 call = &ndr_table_winreg.calls[NDR_WINREG_SETKEYSECURITY];
1630 r = talloc(NULL, struct winreg_SetKeySecurity);
1635 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1640 pull = ndr_pull_init_blob(&blob, r);
1646 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1647 status = call->ndr_pull(pull, NDR_IN, r);
1648 if (NT_STATUS_IS_ERR(status)) {
1653 if (DEBUGLEVEL >= 10)
1654 NDR_PRINT_IN_DEBUG(winreg_SetKeySecurity, r);
1656 r->out.result = _winreg_SetKeySecurity(p, r);
1658 if (p->rng_fault_state) {
1660 /* Return True here, srv_pipe_hnd.c will take care */
1664 if (DEBUGLEVEL >= 10)
1665 NDR_PRINT_OUT_DEBUG(winreg_SetKeySecurity, r);
1667 push = ndr_push_init_ctx(r);
1673 status = call->ndr_push(push, NDR_OUT, r);
1674 if (NT_STATUS_IS_ERR(status)) {
1679 blob = ndr_push_blob(push);
1680 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
1690 static bool api_winreg_SetValue(pipes_struct *p)
1692 const struct ndr_interface_call *call;
1693 struct ndr_pull *pull;
1694 struct ndr_push *push;
1697 struct winreg_SetValue *r;
1699 call = &ndr_table_winreg.calls[NDR_WINREG_SETVALUE];
1701 r = talloc(NULL, struct winreg_SetValue);
1706 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1711 pull = ndr_pull_init_blob(&blob, r);
1717 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1718 status = call->ndr_pull(pull, NDR_IN, r);
1719 if (NT_STATUS_IS_ERR(status)) {
1724 if (DEBUGLEVEL >= 10)
1725 NDR_PRINT_IN_DEBUG(winreg_SetValue, r);
1727 r->out.result = _winreg_SetValue(p, r);
1729 if (p->rng_fault_state) {
1731 /* Return True here, srv_pipe_hnd.c will take care */
1735 if (DEBUGLEVEL >= 10)
1736 NDR_PRINT_OUT_DEBUG(winreg_SetValue, r);
1738 push = ndr_push_init_ctx(r);
1744 status = call->ndr_push(push, NDR_OUT, r);
1745 if (NT_STATUS_IS_ERR(status)) {
1750 blob = ndr_push_blob(push);
1751 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
1761 static bool api_winreg_UnLoadKey(pipes_struct *p)
1763 const struct ndr_interface_call *call;
1764 struct ndr_pull *pull;
1765 struct ndr_push *push;
1768 struct winreg_UnLoadKey *r;
1770 call = &ndr_table_winreg.calls[NDR_WINREG_UNLOADKEY];
1772 r = talloc(NULL, struct winreg_UnLoadKey);
1777 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1782 pull = ndr_pull_init_blob(&blob, r);
1788 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1789 status = call->ndr_pull(pull, NDR_IN, r);
1790 if (NT_STATUS_IS_ERR(status)) {
1795 if (DEBUGLEVEL >= 10)
1796 NDR_PRINT_IN_DEBUG(winreg_UnLoadKey, r);
1798 r->out.result = _winreg_UnLoadKey(p, r);
1800 if (p->rng_fault_state) {
1802 /* Return True here, srv_pipe_hnd.c will take care */
1806 if (DEBUGLEVEL >= 10)
1807 NDR_PRINT_OUT_DEBUG(winreg_UnLoadKey, r);
1809 push = ndr_push_init_ctx(r);
1815 status = call->ndr_push(push, NDR_OUT, r);
1816 if (NT_STATUS_IS_ERR(status)) {
1821 blob = ndr_push_blob(push);
1822 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
1832 static bool api_winreg_InitiateSystemShutdown(pipes_struct *p)
1834 const struct ndr_interface_call *call;
1835 struct ndr_pull *pull;
1836 struct ndr_push *push;
1839 struct winreg_InitiateSystemShutdown *r;
1841 call = &ndr_table_winreg.calls[NDR_WINREG_INITIATESYSTEMSHUTDOWN];
1843 r = talloc(NULL, struct winreg_InitiateSystemShutdown);
1848 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1853 pull = ndr_pull_init_blob(&blob, r);
1859 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1860 status = call->ndr_pull(pull, NDR_IN, r);
1861 if (NT_STATUS_IS_ERR(status)) {
1866 if (DEBUGLEVEL >= 10)
1867 NDR_PRINT_IN_DEBUG(winreg_InitiateSystemShutdown, r);
1869 r->out.result = _winreg_InitiateSystemShutdown(p, r);
1871 if (p->rng_fault_state) {
1873 /* Return True here, srv_pipe_hnd.c will take care */
1877 if (DEBUGLEVEL >= 10)
1878 NDR_PRINT_OUT_DEBUG(winreg_InitiateSystemShutdown, r);
1880 push = ndr_push_init_ctx(r);
1886 status = call->ndr_push(push, NDR_OUT, r);
1887 if (NT_STATUS_IS_ERR(status)) {
1892 blob = ndr_push_blob(push);
1893 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
1903 static bool api_winreg_AbortSystemShutdown(pipes_struct *p)
1905 const struct ndr_interface_call *call;
1906 struct ndr_pull *pull;
1907 struct ndr_push *push;
1910 struct winreg_AbortSystemShutdown *r;
1912 call = &ndr_table_winreg.calls[NDR_WINREG_ABORTSYSTEMSHUTDOWN];
1914 r = talloc(NULL, struct winreg_AbortSystemShutdown);
1919 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1924 pull = ndr_pull_init_blob(&blob, r);
1930 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1931 status = call->ndr_pull(pull, NDR_IN, r);
1932 if (NT_STATUS_IS_ERR(status)) {
1937 if (DEBUGLEVEL >= 10)
1938 NDR_PRINT_IN_DEBUG(winreg_AbortSystemShutdown, r);
1940 r->out.result = _winreg_AbortSystemShutdown(p, r);
1942 if (p->rng_fault_state) {
1944 /* Return True here, srv_pipe_hnd.c will take care */
1948 if (DEBUGLEVEL >= 10)
1949 NDR_PRINT_OUT_DEBUG(winreg_AbortSystemShutdown, r);
1951 push = ndr_push_init_ctx(r);
1957 status = call->ndr_push(push, NDR_OUT, r);
1958 if (NT_STATUS_IS_ERR(status)) {
1963 blob = ndr_push_blob(push);
1964 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
1974 static bool api_winreg_GetVersion(pipes_struct *p)
1976 const struct ndr_interface_call *call;
1977 struct ndr_pull *pull;
1978 struct ndr_push *push;
1981 struct winreg_GetVersion *r;
1983 call = &ndr_table_winreg.calls[NDR_WINREG_GETVERSION];
1985 r = talloc(NULL, struct winreg_GetVersion);
1990 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1995 pull = ndr_pull_init_blob(&blob, r);
2001 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2002 status = call->ndr_pull(pull, NDR_IN, r);
2003 if (NT_STATUS_IS_ERR(status)) {
2008 if (DEBUGLEVEL >= 10)
2009 NDR_PRINT_IN_DEBUG(winreg_GetVersion, r);
2011 ZERO_STRUCT(r->out);
2012 r->out.version = talloc_zero(r, uint32_t);
2013 if (r->out.version == NULL) {
2018 r->out.result = _winreg_GetVersion(p, r);
2020 if (p->rng_fault_state) {
2022 /* Return True here, srv_pipe_hnd.c will take care */
2026 if (DEBUGLEVEL >= 10)
2027 NDR_PRINT_OUT_DEBUG(winreg_GetVersion, r);
2029 push = ndr_push_init_ctx(r);
2035 status = call->ndr_push(push, NDR_OUT, r);
2036 if (NT_STATUS_IS_ERR(status)) {
2041 blob = ndr_push_blob(push);
2042 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
2052 static bool api_winreg_OpenHKCC(pipes_struct *p)
2054 const struct ndr_interface_call *call;
2055 struct ndr_pull *pull;
2056 struct ndr_push *push;
2059 struct winreg_OpenHKCC *r;
2061 call = &ndr_table_winreg.calls[NDR_WINREG_OPENHKCC];
2063 r = talloc(NULL, struct winreg_OpenHKCC);
2068 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2073 pull = ndr_pull_init_blob(&blob, r);
2079 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2080 status = call->ndr_pull(pull, NDR_IN, r);
2081 if (NT_STATUS_IS_ERR(status)) {
2086 if (DEBUGLEVEL >= 10)
2087 NDR_PRINT_IN_DEBUG(winreg_OpenHKCC, r);
2089 ZERO_STRUCT(r->out);
2090 r->out.handle = talloc_zero(r, struct policy_handle);
2091 if (r->out.handle == NULL) {
2096 r->out.result = _winreg_OpenHKCC(p, r);
2098 if (p->rng_fault_state) {
2100 /* Return True here, srv_pipe_hnd.c will take care */
2104 if (DEBUGLEVEL >= 10)
2105 NDR_PRINT_OUT_DEBUG(winreg_OpenHKCC, r);
2107 push = ndr_push_init_ctx(r);
2113 status = call->ndr_push(push, NDR_OUT, r);
2114 if (NT_STATUS_IS_ERR(status)) {
2119 blob = ndr_push_blob(push);
2120 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
2130 static bool api_winreg_OpenHKDD(pipes_struct *p)
2132 const struct ndr_interface_call *call;
2133 struct ndr_pull *pull;
2134 struct ndr_push *push;
2137 struct winreg_OpenHKDD *r;
2139 call = &ndr_table_winreg.calls[NDR_WINREG_OPENHKDD];
2141 r = talloc(NULL, struct winreg_OpenHKDD);
2146 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2151 pull = ndr_pull_init_blob(&blob, r);
2157 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2158 status = call->ndr_pull(pull, NDR_IN, r);
2159 if (NT_STATUS_IS_ERR(status)) {
2164 if (DEBUGLEVEL >= 10)
2165 NDR_PRINT_IN_DEBUG(winreg_OpenHKDD, r);
2167 ZERO_STRUCT(r->out);
2168 r->out.handle = talloc_zero(r, struct policy_handle);
2169 if (r->out.handle == NULL) {
2174 r->out.result = _winreg_OpenHKDD(p, r);
2176 if (p->rng_fault_state) {
2178 /* Return True here, srv_pipe_hnd.c will take care */
2182 if (DEBUGLEVEL >= 10)
2183 NDR_PRINT_OUT_DEBUG(winreg_OpenHKDD, r);
2185 push = ndr_push_init_ctx(r);
2191 status = call->ndr_push(push, NDR_OUT, r);
2192 if (NT_STATUS_IS_ERR(status)) {
2197 blob = ndr_push_blob(push);
2198 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
2208 static bool api_winreg_QueryMultipleValues(pipes_struct *p)
2210 const struct ndr_interface_call *call;
2211 struct ndr_pull *pull;
2212 struct ndr_push *push;
2215 struct winreg_QueryMultipleValues *r;
2217 call = &ndr_table_winreg.calls[NDR_WINREG_QUERYMULTIPLEVALUES];
2219 r = talloc(NULL, struct winreg_QueryMultipleValues);
2224 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2229 pull = ndr_pull_init_blob(&blob, r);
2235 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2236 status = call->ndr_pull(pull, NDR_IN, r);
2237 if (NT_STATUS_IS_ERR(status)) {
2242 if (DEBUGLEVEL >= 10)
2243 NDR_PRINT_IN_DEBUG(winreg_QueryMultipleValues, r);
2245 ZERO_STRUCT(r->out);
2246 r->out.values = r->in.values;
2247 r->out.buffer = r->in.buffer;
2248 r->out.buffer_size = r->in.buffer_size;
2249 r->out.result = _winreg_QueryMultipleValues(p, r);
2251 if (p->rng_fault_state) {
2253 /* Return True here, srv_pipe_hnd.c will take care */
2257 if (DEBUGLEVEL >= 10)
2258 NDR_PRINT_OUT_DEBUG(winreg_QueryMultipleValues, r);
2260 push = ndr_push_init_ctx(r);
2266 status = call->ndr_push(push, NDR_OUT, r);
2267 if (NT_STATUS_IS_ERR(status)) {
2272 blob = ndr_push_blob(push);
2273 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
2283 static bool api_winreg_InitiateSystemShutdownEx(pipes_struct *p)
2285 const struct ndr_interface_call *call;
2286 struct ndr_pull *pull;
2287 struct ndr_push *push;
2290 struct winreg_InitiateSystemShutdownEx *r;
2292 call = &ndr_table_winreg.calls[NDR_WINREG_INITIATESYSTEMSHUTDOWNEX];
2294 r = talloc(NULL, struct winreg_InitiateSystemShutdownEx);
2299 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2304 pull = ndr_pull_init_blob(&blob, r);
2310 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2311 status = call->ndr_pull(pull, NDR_IN, r);
2312 if (NT_STATUS_IS_ERR(status)) {
2317 if (DEBUGLEVEL >= 10)
2318 NDR_PRINT_IN_DEBUG(winreg_InitiateSystemShutdownEx, r);
2320 r->out.result = _winreg_InitiateSystemShutdownEx(p, r);
2322 if (p->rng_fault_state) {
2324 /* Return True here, srv_pipe_hnd.c will take care */
2328 if (DEBUGLEVEL >= 10)
2329 NDR_PRINT_OUT_DEBUG(winreg_InitiateSystemShutdownEx, r);
2331 push = ndr_push_init_ctx(r);
2337 status = call->ndr_push(push, NDR_OUT, r);
2338 if (NT_STATUS_IS_ERR(status)) {
2343 blob = ndr_push_blob(push);
2344 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
2354 static bool api_winreg_SaveKeyEx(pipes_struct *p)
2356 const struct ndr_interface_call *call;
2357 struct ndr_pull *pull;
2358 struct ndr_push *push;
2361 struct winreg_SaveKeyEx *r;
2363 call = &ndr_table_winreg.calls[NDR_WINREG_SAVEKEYEX];
2365 r = talloc(NULL, struct winreg_SaveKeyEx);
2370 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2375 pull = ndr_pull_init_blob(&blob, r);
2381 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2382 status = call->ndr_pull(pull, NDR_IN, r);
2383 if (NT_STATUS_IS_ERR(status)) {
2388 if (DEBUGLEVEL >= 10)
2389 NDR_PRINT_IN_DEBUG(winreg_SaveKeyEx, r);
2391 r->out.result = _winreg_SaveKeyEx(p, r);
2393 if (p->rng_fault_state) {
2395 /* Return True here, srv_pipe_hnd.c will take care */
2399 if (DEBUGLEVEL >= 10)
2400 NDR_PRINT_OUT_DEBUG(winreg_SaveKeyEx, r);
2402 push = ndr_push_init_ctx(r);
2408 status = call->ndr_push(push, NDR_OUT, r);
2409 if (NT_STATUS_IS_ERR(status)) {
2414 blob = ndr_push_blob(push);
2415 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
2425 static bool api_winreg_OpenHKPT(pipes_struct *p)
2427 const struct ndr_interface_call *call;
2428 struct ndr_pull *pull;
2429 struct ndr_push *push;
2432 struct winreg_OpenHKPT *r;
2434 call = &ndr_table_winreg.calls[NDR_WINREG_OPENHKPT];
2436 r = talloc(NULL, struct winreg_OpenHKPT);
2441 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2446 pull = ndr_pull_init_blob(&blob, r);
2452 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2453 status = call->ndr_pull(pull, NDR_IN, r);
2454 if (NT_STATUS_IS_ERR(status)) {
2459 if (DEBUGLEVEL >= 10)
2460 NDR_PRINT_IN_DEBUG(winreg_OpenHKPT, r);
2462 ZERO_STRUCT(r->out);
2463 r->out.handle = talloc_zero(r, struct policy_handle);
2464 if (r->out.handle == NULL) {
2469 r->out.result = _winreg_OpenHKPT(p, r);
2471 if (p->rng_fault_state) {
2473 /* Return True here, srv_pipe_hnd.c will take care */
2477 if (DEBUGLEVEL >= 10)
2478 NDR_PRINT_OUT_DEBUG(winreg_OpenHKPT, r);
2480 push = ndr_push_init_ctx(r);
2486 status = call->ndr_push(push, NDR_OUT, r);
2487 if (NT_STATUS_IS_ERR(status)) {
2492 blob = ndr_push_blob(push);
2493 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
2503 static bool api_winreg_OpenHKPN(pipes_struct *p)
2505 const struct ndr_interface_call *call;
2506 struct ndr_pull *pull;
2507 struct ndr_push *push;
2510 struct winreg_OpenHKPN *r;
2512 call = &ndr_table_winreg.calls[NDR_WINREG_OPENHKPN];
2514 r = talloc(NULL, struct winreg_OpenHKPN);
2519 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2524 pull = ndr_pull_init_blob(&blob, r);
2530 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2531 status = call->ndr_pull(pull, NDR_IN, r);
2532 if (NT_STATUS_IS_ERR(status)) {
2537 if (DEBUGLEVEL >= 10)
2538 NDR_PRINT_IN_DEBUG(winreg_OpenHKPN, r);
2540 ZERO_STRUCT(r->out);
2541 r->out.handle = talloc_zero(r, struct policy_handle);
2542 if (r->out.handle == NULL) {
2547 r->out.result = _winreg_OpenHKPN(p, r);
2549 if (p->rng_fault_state) {
2551 /* Return True here, srv_pipe_hnd.c will take care */
2555 if (DEBUGLEVEL >= 10)
2556 NDR_PRINT_OUT_DEBUG(winreg_OpenHKPN, r);
2558 push = ndr_push_init_ctx(r);
2564 status = call->ndr_push(push, NDR_OUT, r);
2565 if (NT_STATUS_IS_ERR(status)) {
2570 blob = ndr_push_blob(push);
2571 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
2581 static bool api_winreg_QueryMultipleValues2(pipes_struct *p)
2583 const struct ndr_interface_call *call;
2584 struct ndr_pull *pull;
2585 struct ndr_push *push;
2588 struct winreg_QueryMultipleValues2 *r;
2590 call = &ndr_table_winreg.calls[NDR_WINREG_QUERYMULTIPLEVALUES2];
2592 r = talloc(NULL, struct winreg_QueryMultipleValues2);
2597 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2602 pull = ndr_pull_init_blob(&blob, r);
2608 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2609 status = call->ndr_pull(pull, NDR_IN, r);
2610 if (NT_STATUS_IS_ERR(status)) {
2615 if (DEBUGLEVEL >= 10)
2616 NDR_PRINT_IN_DEBUG(winreg_QueryMultipleValues2, r);
2618 r->out.result = _winreg_QueryMultipleValues2(p, r);
2620 if (p->rng_fault_state) {
2622 /* Return True here, srv_pipe_hnd.c will take care */
2626 if (DEBUGLEVEL >= 10)
2627 NDR_PRINT_OUT_DEBUG(winreg_QueryMultipleValues2, r);
2629 push = ndr_push_init_ctx(r);
2635 status = call->ndr_push(push, NDR_OUT, r);
2636 if (NT_STATUS_IS_ERR(status)) {
2641 blob = ndr_push_blob(push);
2642 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
2654 static struct api_struct api_winreg_cmds[] =
2656 {"WINREG_OPENHKCR", NDR_WINREG_OPENHKCR, api_winreg_OpenHKCR},
2657 {"WINREG_OPENHKCU", NDR_WINREG_OPENHKCU, api_winreg_OpenHKCU},
2658 {"WINREG_OPENHKLM", NDR_WINREG_OPENHKLM, api_winreg_OpenHKLM},
2659 {"WINREG_OPENHKPD", NDR_WINREG_OPENHKPD, api_winreg_OpenHKPD},
2660 {"WINREG_OPENHKU", NDR_WINREG_OPENHKU, api_winreg_OpenHKU},
2661 {"WINREG_CLOSEKEY", NDR_WINREG_CLOSEKEY, api_winreg_CloseKey},
2662 {"WINREG_CREATEKEY", NDR_WINREG_CREATEKEY, api_winreg_CreateKey},
2663 {"WINREG_DELETEKEY", NDR_WINREG_DELETEKEY, api_winreg_DeleteKey},
2664 {"WINREG_DELETEVALUE", NDR_WINREG_DELETEVALUE, api_winreg_DeleteValue},
2665 {"WINREG_ENUMKEY", NDR_WINREG_ENUMKEY, api_winreg_EnumKey},
2666 {"WINREG_ENUMVALUE", NDR_WINREG_ENUMVALUE, api_winreg_EnumValue},
2667 {"WINREG_FLUSHKEY", NDR_WINREG_FLUSHKEY, api_winreg_FlushKey},
2668 {"WINREG_GETKEYSECURITY", NDR_WINREG_GETKEYSECURITY, api_winreg_GetKeySecurity},
2669 {"WINREG_LOADKEY", NDR_WINREG_LOADKEY, api_winreg_LoadKey},
2670 {"WINREG_NOTIFYCHANGEKEYVALUE", NDR_WINREG_NOTIFYCHANGEKEYVALUE, api_winreg_NotifyChangeKeyValue},
2671 {"WINREG_OPENKEY", NDR_WINREG_OPENKEY, api_winreg_OpenKey},
2672 {"WINREG_QUERYINFOKEY", NDR_WINREG_QUERYINFOKEY, api_winreg_QueryInfoKey},
2673 {"WINREG_QUERYVALUE", NDR_WINREG_QUERYVALUE, api_winreg_QueryValue},
2674 {"WINREG_REPLACEKEY", NDR_WINREG_REPLACEKEY, api_winreg_ReplaceKey},
2675 {"WINREG_RESTOREKEY", NDR_WINREG_RESTOREKEY, api_winreg_RestoreKey},
2676 {"WINREG_SAVEKEY", NDR_WINREG_SAVEKEY, api_winreg_SaveKey},
2677 {"WINREG_SETKEYSECURITY", NDR_WINREG_SETKEYSECURITY, api_winreg_SetKeySecurity},
2678 {"WINREG_SETVALUE", NDR_WINREG_SETVALUE, api_winreg_SetValue},
2679 {"WINREG_UNLOADKEY", NDR_WINREG_UNLOADKEY, api_winreg_UnLoadKey},
2680 {"WINREG_INITIATESYSTEMSHUTDOWN", NDR_WINREG_INITIATESYSTEMSHUTDOWN, api_winreg_InitiateSystemShutdown},
2681 {"WINREG_ABORTSYSTEMSHUTDOWN", NDR_WINREG_ABORTSYSTEMSHUTDOWN, api_winreg_AbortSystemShutdown},
2682 {"WINREG_GETVERSION", NDR_WINREG_GETVERSION, api_winreg_GetVersion},
2683 {"WINREG_OPENHKCC", NDR_WINREG_OPENHKCC, api_winreg_OpenHKCC},
2684 {"WINREG_OPENHKDD", NDR_WINREG_OPENHKDD, api_winreg_OpenHKDD},
2685 {"WINREG_QUERYMULTIPLEVALUES", NDR_WINREG_QUERYMULTIPLEVALUES, api_winreg_QueryMultipleValues},
2686 {"WINREG_INITIATESYSTEMSHUTDOWNEX", NDR_WINREG_INITIATESYSTEMSHUTDOWNEX, api_winreg_InitiateSystemShutdownEx},
2687 {"WINREG_SAVEKEYEX", NDR_WINREG_SAVEKEYEX, api_winreg_SaveKeyEx},
2688 {"WINREG_OPENHKPT", NDR_WINREG_OPENHKPT, api_winreg_OpenHKPT},
2689 {"WINREG_OPENHKPN", NDR_WINREG_OPENHKPN, api_winreg_OpenHKPN},
2690 {"WINREG_QUERYMULTIPLEVALUES2", NDR_WINREG_QUERYMULTIPLEVALUES2, api_winreg_QueryMultipleValues2},
2693 void winreg_get_pipe_fns(struct api_struct **fns, int *n_fns)
2695 *fns = api_winreg_cmds;
2696 *n_fns = sizeof(api_winreg_cmds) / sizeof(struct api_struct);
2699 NTSTATUS rpc_winreg_init(void)
2701 return rpc_pipe_register_commands(SMB_RPC_INTERFACE_VERSION, "winreg", "winreg", api_winreg_cmds, sizeof(api_winreg_cmds) / sizeof(struct api_struct));