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
;
14 enum ndr_err_code ndr_err
;
16 struct winreg_OpenHKCR
*r
;
18 call
= &ndr_table_winreg
.calls
[NDR_WINREG_OPENHKCR
];
20 r
= talloc(talloc_tos(), struct winreg_OpenHKCR
);
25 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
30 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
36 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
37 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
38 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
43 if (DEBUGLEVEL
>= 10) {
44 NDR_PRINT_IN_DEBUG(winreg_OpenHKCR
, r
);
48 r
->out
.handle
= talloc_zero(r
, struct policy_handle
);
49 if (r
->out
.handle
== NULL
) {
54 r
->out
.result
= _winreg_OpenHKCR(p
, r
);
56 if (p
->rng_fault_state
) {
58 /* Return true here, srv_pipe_hnd.c will take care */
62 if (DEBUGLEVEL
>= 10) {
63 NDR_PRINT_OUT_DEBUG(winreg_OpenHKCR
, r
);
66 push
= ndr_push_init_ctx(r
, NULL
);
72 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
73 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
78 blob
= ndr_push_blob(push
);
79 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
89 static bool api_winreg_OpenHKCU(pipes_struct
*p
)
91 const struct ndr_interface_call
*call
;
92 struct ndr_pull
*pull
;
93 struct ndr_push
*push
;
94 enum ndr_err_code ndr_err
;
96 struct winreg_OpenHKCU
*r
;
98 call
= &ndr_table_winreg
.calls
[NDR_WINREG_OPENHKCU
];
100 r
= talloc(talloc_tos(), struct winreg_OpenHKCU
);
105 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
110 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
116 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
117 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
118 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
123 if (DEBUGLEVEL
>= 10) {
124 NDR_PRINT_IN_DEBUG(winreg_OpenHKCU
, r
);
128 r
->out
.handle
= talloc_zero(r
, struct policy_handle
);
129 if (r
->out
.handle
== NULL
) {
134 r
->out
.result
= _winreg_OpenHKCU(p
, r
);
136 if (p
->rng_fault_state
) {
138 /* Return true here, srv_pipe_hnd.c will take care */
142 if (DEBUGLEVEL
>= 10) {
143 NDR_PRINT_OUT_DEBUG(winreg_OpenHKCU
, r
);
146 push
= ndr_push_init_ctx(r
, NULL
);
152 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
153 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
158 blob
= ndr_push_blob(push
);
159 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
169 static bool api_winreg_OpenHKLM(pipes_struct
*p
)
171 const struct ndr_interface_call
*call
;
172 struct ndr_pull
*pull
;
173 struct ndr_push
*push
;
174 enum ndr_err_code ndr_err
;
176 struct winreg_OpenHKLM
*r
;
178 call
= &ndr_table_winreg
.calls
[NDR_WINREG_OPENHKLM
];
180 r
= talloc(talloc_tos(), struct winreg_OpenHKLM
);
185 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
190 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
196 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
197 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
198 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
203 if (DEBUGLEVEL
>= 10) {
204 NDR_PRINT_IN_DEBUG(winreg_OpenHKLM
, r
);
208 r
->out
.handle
= talloc_zero(r
, struct policy_handle
);
209 if (r
->out
.handle
== NULL
) {
214 r
->out
.result
= _winreg_OpenHKLM(p
, r
);
216 if (p
->rng_fault_state
) {
218 /* Return true here, srv_pipe_hnd.c will take care */
222 if (DEBUGLEVEL
>= 10) {
223 NDR_PRINT_OUT_DEBUG(winreg_OpenHKLM
, r
);
226 push
= ndr_push_init_ctx(r
, NULL
);
232 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
233 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
238 blob
= ndr_push_blob(push
);
239 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
249 static bool api_winreg_OpenHKPD(pipes_struct
*p
)
251 const struct ndr_interface_call
*call
;
252 struct ndr_pull
*pull
;
253 struct ndr_push
*push
;
254 enum ndr_err_code ndr_err
;
256 struct winreg_OpenHKPD
*r
;
258 call
= &ndr_table_winreg
.calls
[NDR_WINREG_OPENHKPD
];
260 r
= talloc(talloc_tos(), struct winreg_OpenHKPD
);
265 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
270 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
276 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
277 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
278 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
283 if (DEBUGLEVEL
>= 10) {
284 NDR_PRINT_IN_DEBUG(winreg_OpenHKPD
, r
);
288 r
->out
.handle
= talloc_zero(r
, struct policy_handle
);
289 if (r
->out
.handle
== NULL
) {
294 r
->out
.result
= _winreg_OpenHKPD(p
, r
);
296 if (p
->rng_fault_state
) {
298 /* Return true here, srv_pipe_hnd.c will take care */
302 if (DEBUGLEVEL
>= 10) {
303 NDR_PRINT_OUT_DEBUG(winreg_OpenHKPD
, r
);
306 push
= ndr_push_init_ctx(r
, NULL
);
312 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
313 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
318 blob
= ndr_push_blob(push
);
319 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
329 static bool api_winreg_OpenHKU(pipes_struct
*p
)
331 const struct ndr_interface_call
*call
;
332 struct ndr_pull
*pull
;
333 struct ndr_push
*push
;
334 enum ndr_err_code ndr_err
;
336 struct winreg_OpenHKU
*r
;
338 call
= &ndr_table_winreg
.calls
[NDR_WINREG_OPENHKU
];
340 r
= talloc(talloc_tos(), struct winreg_OpenHKU
);
345 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
350 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
356 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
357 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
358 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
363 if (DEBUGLEVEL
>= 10) {
364 NDR_PRINT_IN_DEBUG(winreg_OpenHKU
, r
);
368 r
->out
.handle
= talloc_zero(r
, struct policy_handle
);
369 if (r
->out
.handle
== NULL
) {
374 r
->out
.result
= _winreg_OpenHKU(p
, r
);
376 if (p
->rng_fault_state
) {
378 /* Return true here, srv_pipe_hnd.c will take care */
382 if (DEBUGLEVEL
>= 10) {
383 NDR_PRINT_OUT_DEBUG(winreg_OpenHKU
, r
);
386 push
= ndr_push_init_ctx(r
, NULL
);
392 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
393 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
398 blob
= ndr_push_blob(push
);
399 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
409 static bool api_winreg_CloseKey(pipes_struct
*p
)
411 const struct ndr_interface_call
*call
;
412 struct ndr_pull
*pull
;
413 struct ndr_push
*push
;
414 enum ndr_err_code ndr_err
;
416 struct winreg_CloseKey
*r
;
418 call
= &ndr_table_winreg
.calls
[NDR_WINREG_CLOSEKEY
];
420 r
= talloc(talloc_tos(), struct winreg_CloseKey
);
425 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
430 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
436 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
437 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
438 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
443 if (DEBUGLEVEL
>= 10) {
444 NDR_PRINT_IN_DEBUG(winreg_CloseKey
, r
);
448 r
->out
.handle
= r
->in
.handle
;
449 r
->out
.result
= _winreg_CloseKey(p
, r
);
451 if (p
->rng_fault_state
) {
453 /* Return true here, srv_pipe_hnd.c will take care */
457 if (DEBUGLEVEL
>= 10) {
458 NDR_PRINT_OUT_DEBUG(winreg_CloseKey
, r
);
461 push
= ndr_push_init_ctx(r
, NULL
);
467 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
468 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
473 blob
= ndr_push_blob(push
);
474 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
484 static bool api_winreg_CreateKey(pipes_struct
*p
)
486 const struct ndr_interface_call
*call
;
487 struct ndr_pull
*pull
;
488 struct ndr_push
*push
;
489 enum ndr_err_code ndr_err
;
491 struct winreg_CreateKey
*r
;
493 call
= &ndr_table_winreg
.calls
[NDR_WINREG_CREATEKEY
];
495 r
= talloc(talloc_tos(), struct winreg_CreateKey
);
500 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
505 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
511 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
512 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
513 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
518 if (DEBUGLEVEL
>= 10) {
519 NDR_PRINT_IN_DEBUG(winreg_CreateKey
, r
);
523 r
->out
.action_taken
= r
->in
.action_taken
;
524 r
->out
.new_handle
= talloc_zero(r
, struct policy_handle
);
525 if (r
->out
.new_handle
== NULL
) {
530 r
->out
.result
= _winreg_CreateKey(p
, r
);
532 if (p
->rng_fault_state
) {
534 /* Return true here, srv_pipe_hnd.c will take care */
538 if (DEBUGLEVEL
>= 10) {
539 NDR_PRINT_OUT_DEBUG(winreg_CreateKey
, r
);
542 push
= ndr_push_init_ctx(r
, NULL
);
548 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
549 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
554 blob
= ndr_push_blob(push
);
555 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
565 static bool api_winreg_DeleteKey(pipes_struct
*p
)
567 const struct ndr_interface_call
*call
;
568 struct ndr_pull
*pull
;
569 struct ndr_push
*push
;
570 enum ndr_err_code ndr_err
;
572 struct winreg_DeleteKey
*r
;
574 call
= &ndr_table_winreg
.calls
[NDR_WINREG_DELETEKEY
];
576 r
= talloc(talloc_tos(), struct winreg_DeleteKey
);
581 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
586 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
592 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
593 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
594 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
599 if (DEBUGLEVEL
>= 10) {
600 NDR_PRINT_IN_DEBUG(winreg_DeleteKey
, r
);
603 r
->out
.result
= _winreg_DeleteKey(p
, r
);
605 if (p
->rng_fault_state
) {
607 /* Return true here, srv_pipe_hnd.c will take care */
611 if (DEBUGLEVEL
>= 10) {
612 NDR_PRINT_OUT_DEBUG(winreg_DeleteKey
, r
);
615 push
= ndr_push_init_ctx(r
, NULL
);
621 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
622 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
627 blob
= ndr_push_blob(push
);
628 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
638 static bool api_winreg_DeleteValue(pipes_struct
*p
)
640 const struct ndr_interface_call
*call
;
641 struct ndr_pull
*pull
;
642 struct ndr_push
*push
;
643 enum ndr_err_code ndr_err
;
645 struct winreg_DeleteValue
*r
;
647 call
= &ndr_table_winreg
.calls
[NDR_WINREG_DELETEVALUE
];
649 r
= talloc(talloc_tos(), struct winreg_DeleteValue
);
654 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
659 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
665 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
666 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
667 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
672 if (DEBUGLEVEL
>= 10) {
673 NDR_PRINT_IN_DEBUG(winreg_DeleteValue
, r
);
676 r
->out
.result
= _winreg_DeleteValue(p
, r
);
678 if (p
->rng_fault_state
) {
680 /* Return true here, srv_pipe_hnd.c will take care */
684 if (DEBUGLEVEL
>= 10) {
685 NDR_PRINT_OUT_DEBUG(winreg_DeleteValue
, r
);
688 push
= ndr_push_init_ctx(r
, NULL
);
694 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
695 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
700 blob
= ndr_push_blob(push
);
701 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
711 static bool api_winreg_EnumKey(pipes_struct
*p
)
713 const struct ndr_interface_call
*call
;
714 struct ndr_pull
*pull
;
715 struct ndr_push
*push
;
716 enum ndr_err_code ndr_err
;
718 struct winreg_EnumKey
*r
;
720 call
= &ndr_table_winreg
.calls
[NDR_WINREG_ENUMKEY
];
722 r
= talloc(talloc_tos(), struct winreg_EnumKey
);
727 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
732 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
738 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
739 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
740 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
745 if (DEBUGLEVEL
>= 10) {
746 NDR_PRINT_IN_DEBUG(winreg_EnumKey
, r
);
750 r
->out
.name
= r
->in
.name
;
751 r
->out
.keyclass
= r
->in
.keyclass
;
752 r
->out
.last_changed_time
= r
->in
.last_changed_time
;
753 r
->out
.result
= _winreg_EnumKey(p
, r
);
755 if (p
->rng_fault_state
) {
757 /* Return true here, srv_pipe_hnd.c will take care */
761 if (DEBUGLEVEL
>= 10) {
762 NDR_PRINT_OUT_DEBUG(winreg_EnumKey
, r
);
765 push
= ndr_push_init_ctx(r
, NULL
);
771 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
772 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
777 blob
= ndr_push_blob(push
);
778 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
788 static bool api_winreg_EnumValue(pipes_struct
*p
)
790 const struct ndr_interface_call
*call
;
791 struct ndr_pull
*pull
;
792 struct ndr_push
*push
;
793 enum ndr_err_code ndr_err
;
795 struct winreg_EnumValue
*r
;
797 call
= &ndr_table_winreg
.calls
[NDR_WINREG_ENUMVALUE
];
799 r
= talloc(talloc_tos(), struct winreg_EnumValue
);
804 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
809 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
815 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
816 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
817 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
822 if (DEBUGLEVEL
>= 10) {
823 NDR_PRINT_IN_DEBUG(winreg_EnumValue
, r
);
827 r
->out
.name
= r
->in
.name
;
828 r
->out
.type
= r
->in
.type
;
829 r
->out
.value
= r
->in
.value
;
830 r
->out
.size
= r
->in
.size
;
831 r
->out
.length
= r
->in
.length
;
832 r
->out
.result
= _winreg_EnumValue(p
, r
);
834 if (p
->rng_fault_state
) {
836 /* Return true here, srv_pipe_hnd.c will take care */
840 if (DEBUGLEVEL
>= 10) {
841 NDR_PRINT_OUT_DEBUG(winreg_EnumValue
, r
);
844 push
= ndr_push_init_ctx(r
, NULL
);
850 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
851 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
856 blob
= ndr_push_blob(push
);
857 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
867 static bool api_winreg_FlushKey(pipes_struct
*p
)
869 const struct ndr_interface_call
*call
;
870 struct ndr_pull
*pull
;
871 struct ndr_push
*push
;
872 enum ndr_err_code ndr_err
;
874 struct winreg_FlushKey
*r
;
876 call
= &ndr_table_winreg
.calls
[NDR_WINREG_FLUSHKEY
];
878 r
= talloc(talloc_tos(), struct winreg_FlushKey
);
883 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
888 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
894 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
895 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
896 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
901 if (DEBUGLEVEL
>= 10) {
902 NDR_PRINT_IN_DEBUG(winreg_FlushKey
, r
);
905 r
->out
.result
= _winreg_FlushKey(p
, r
);
907 if (p
->rng_fault_state
) {
909 /* Return true here, srv_pipe_hnd.c will take care */
913 if (DEBUGLEVEL
>= 10) {
914 NDR_PRINT_OUT_DEBUG(winreg_FlushKey
, r
);
917 push
= ndr_push_init_ctx(r
, NULL
);
923 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
924 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
929 blob
= ndr_push_blob(push
);
930 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
940 static bool api_winreg_GetKeySecurity(pipes_struct
*p
)
942 const struct ndr_interface_call
*call
;
943 struct ndr_pull
*pull
;
944 struct ndr_push
*push
;
945 enum ndr_err_code ndr_err
;
947 struct winreg_GetKeySecurity
*r
;
949 call
= &ndr_table_winreg
.calls
[NDR_WINREG_GETKEYSECURITY
];
951 r
= talloc(talloc_tos(), struct winreg_GetKeySecurity
);
956 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
961 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
967 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
968 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
969 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
974 if (DEBUGLEVEL
>= 10) {
975 NDR_PRINT_IN_DEBUG(winreg_GetKeySecurity
, r
);
979 r
->out
.sd
= r
->in
.sd
;
980 r
->out
.result
= _winreg_GetKeySecurity(p
, r
);
982 if (p
->rng_fault_state
) {
984 /* Return true here, srv_pipe_hnd.c will take care */
988 if (DEBUGLEVEL
>= 10) {
989 NDR_PRINT_OUT_DEBUG(winreg_GetKeySecurity
, r
);
992 push
= ndr_push_init_ctx(r
, NULL
);
998 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
999 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1004 blob
= ndr_push_blob(push
);
1005 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
1015 static bool api_winreg_LoadKey(pipes_struct
*p
)
1017 const struct ndr_interface_call
*call
;
1018 struct ndr_pull
*pull
;
1019 struct ndr_push
*push
;
1020 enum ndr_err_code ndr_err
;
1022 struct winreg_LoadKey
*r
;
1024 call
= &ndr_table_winreg
.calls
[NDR_WINREG_LOADKEY
];
1026 r
= talloc(talloc_tos(), struct winreg_LoadKey
);
1031 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
1036 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
1042 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1043 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
1044 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1049 if (DEBUGLEVEL
>= 10) {
1050 NDR_PRINT_IN_DEBUG(winreg_LoadKey
, r
);
1053 r
->out
.result
= _winreg_LoadKey(p
, r
);
1055 if (p
->rng_fault_state
) {
1057 /* Return true here, srv_pipe_hnd.c will take care */
1061 if (DEBUGLEVEL
>= 10) {
1062 NDR_PRINT_OUT_DEBUG(winreg_LoadKey
, r
);
1065 push
= ndr_push_init_ctx(r
, NULL
);
1071 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
1072 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1077 blob
= ndr_push_blob(push
);
1078 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
1088 static bool api_winreg_NotifyChangeKeyValue(pipes_struct
*p
)
1090 const struct ndr_interface_call
*call
;
1091 struct ndr_pull
*pull
;
1092 struct ndr_push
*push
;
1093 enum ndr_err_code ndr_err
;
1095 struct winreg_NotifyChangeKeyValue
*r
;
1097 call
= &ndr_table_winreg
.calls
[NDR_WINREG_NOTIFYCHANGEKEYVALUE
];
1099 r
= talloc(talloc_tos(), struct winreg_NotifyChangeKeyValue
);
1104 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
1109 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
1115 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1116 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
1117 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1122 if (DEBUGLEVEL
>= 10) {
1123 NDR_PRINT_IN_DEBUG(winreg_NotifyChangeKeyValue
, r
);
1126 r
->out
.result
= _winreg_NotifyChangeKeyValue(p
, r
);
1128 if (p
->rng_fault_state
) {
1130 /* Return true here, srv_pipe_hnd.c will take care */
1134 if (DEBUGLEVEL
>= 10) {
1135 NDR_PRINT_OUT_DEBUG(winreg_NotifyChangeKeyValue
, r
);
1138 push
= ndr_push_init_ctx(r
, NULL
);
1144 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
1145 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1150 blob
= ndr_push_blob(push
);
1151 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
1161 static bool api_winreg_OpenKey(pipes_struct
*p
)
1163 const struct ndr_interface_call
*call
;
1164 struct ndr_pull
*pull
;
1165 struct ndr_push
*push
;
1166 enum ndr_err_code ndr_err
;
1168 struct winreg_OpenKey
*r
;
1170 call
= &ndr_table_winreg
.calls
[NDR_WINREG_OPENKEY
];
1172 r
= talloc(talloc_tos(), struct winreg_OpenKey
);
1177 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
1182 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
1188 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1189 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
1190 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1195 if (DEBUGLEVEL
>= 10) {
1196 NDR_PRINT_IN_DEBUG(winreg_OpenKey
, r
);
1199 ZERO_STRUCT(r
->out
);
1200 r
->out
.handle
= talloc_zero(r
, struct policy_handle
);
1201 if (r
->out
.handle
== NULL
) {
1206 r
->out
.result
= _winreg_OpenKey(p
, r
);
1208 if (p
->rng_fault_state
) {
1210 /* Return true here, srv_pipe_hnd.c will take care */
1214 if (DEBUGLEVEL
>= 10) {
1215 NDR_PRINT_OUT_DEBUG(winreg_OpenKey
, r
);
1218 push
= ndr_push_init_ctx(r
, NULL
);
1224 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
1225 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1230 blob
= ndr_push_blob(push
);
1231 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
1241 static bool api_winreg_QueryInfoKey(pipes_struct
*p
)
1243 const struct ndr_interface_call
*call
;
1244 struct ndr_pull
*pull
;
1245 struct ndr_push
*push
;
1246 enum ndr_err_code ndr_err
;
1248 struct winreg_QueryInfoKey
*r
;
1250 call
= &ndr_table_winreg
.calls
[NDR_WINREG_QUERYINFOKEY
];
1252 r
= talloc(talloc_tos(), struct winreg_QueryInfoKey
);
1257 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
1262 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
1268 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1269 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
1270 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1275 if (DEBUGLEVEL
>= 10) {
1276 NDR_PRINT_IN_DEBUG(winreg_QueryInfoKey
, r
);
1279 ZERO_STRUCT(r
->out
);
1280 r
->out
.classname
= r
->in
.classname
;
1281 r
->out
.num_subkeys
= talloc_zero(r
, uint32_t);
1282 if (r
->out
.num_subkeys
== NULL
) {
1287 r
->out
.max_subkeylen
= talloc_zero(r
, uint32_t);
1288 if (r
->out
.max_subkeylen
== NULL
) {
1293 r
->out
.max_classlen
= talloc_zero(r
, uint32_t);
1294 if (r
->out
.max_classlen
== NULL
) {
1299 r
->out
.num_values
= talloc_zero(r
, uint32_t);
1300 if (r
->out
.num_values
== NULL
) {
1305 r
->out
.max_valnamelen
= talloc_zero(r
, uint32_t);
1306 if (r
->out
.max_valnamelen
== NULL
) {
1311 r
->out
.max_valbufsize
= talloc_zero(r
, uint32_t);
1312 if (r
->out
.max_valbufsize
== NULL
) {
1317 r
->out
.secdescsize
= talloc_zero(r
, uint32_t);
1318 if (r
->out
.secdescsize
== NULL
) {
1323 r
->out
.last_changed_time
= talloc_zero(r
, NTTIME
);
1324 if (r
->out
.last_changed_time
== NULL
) {
1329 r
->out
.result
= _winreg_QueryInfoKey(p
, r
);
1331 if (p
->rng_fault_state
) {
1333 /* Return true here, srv_pipe_hnd.c will take care */
1337 if (DEBUGLEVEL
>= 10) {
1338 NDR_PRINT_OUT_DEBUG(winreg_QueryInfoKey
, r
);
1341 push
= ndr_push_init_ctx(r
, NULL
);
1347 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
1348 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1353 blob
= ndr_push_blob(push
);
1354 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
1364 static bool api_winreg_QueryValue(pipes_struct
*p
)
1366 const struct ndr_interface_call
*call
;
1367 struct ndr_pull
*pull
;
1368 struct ndr_push
*push
;
1369 enum ndr_err_code ndr_err
;
1371 struct winreg_QueryValue
*r
;
1373 call
= &ndr_table_winreg
.calls
[NDR_WINREG_QUERYVALUE
];
1375 r
= talloc(talloc_tos(), struct winreg_QueryValue
);
1380 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
1385 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
1391 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1392 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
1393 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1398 if (DEBUGLEVEL
>= 10) {
1399 NDR_PRINT_IN_DEBUG(winreg_QueryValue
, r
);
1402 ZERO_STRUCT(r
->out
);
1403 r
->out
.type
= r
->in
.type
;
1404 r
->out
.data
= r
->in
.data
;
1405 r
->out
.data_size
= r
->in
.data_size
;
1406 r
->out
.data_length
= r
->in
.data_length
;
1407 r
->out
.result
= _winreg_QueryValue(p
, r
);
1409 if (p
->rng_fault_state
) {
1411 /* Return true here, srv_pipe_hnd.c will take care */
1415 if (DEBUGLEVEL
>= 10) {
1416 NDR_PRINT_OUT_DEBUG(winreg_QueryValue
, r
);
1419 push
= ndr_push_init_ctx(r
, NULL
);
1425 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
1426 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1431 blob
= ndr_push_blob(push
);
1432 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
1442 static bool api_winreg_ReplaceKey(pipes_struct
*p
)
1444 const struct ndr_interface_call
*call
;
1445 struct ndr_pull
*pull
;
1446 struct ndr_push
*push
;
1447 enum ndr_err_code ndr_err
;
1449 struct winreg_ReplaceKey
*r
;
1451 call
= &ndr_table_winreg
.calls
[NDR_WINREG_REPLACEKEY
];
1453 r
= talloc(talloc_tos(), struct winreg_ReplaceKey
);
1458 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
1463 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
1469 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1470 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
1471 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1476 if (DEBUGLEVEL
>= 10) {
1477 NDR_PRINT_IN_DEBUG(winreg_ReplaceKey
, r
);
1480 r
->out
.result
= _winreg_ReplaceKey(p
, r
);
1482 if (p
->rng_fault_state
) {
1484 /* Return true here, srv_pipe_hnd.c will take care */
1488 if (DEBUGLEVEL
>= 10) {
1489 NDR_PRINT_OUT_DEBUG(winreg_ReplaceKey
, r
);
1492 push
= ndr_push_init_ctx(r
, NULL
);
1498 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
1499 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1504 blob
= ndr_push_blob(push
);
1505 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
1515 static bool api_winreg_RestoreKey(pipes_struct
*p
)
1517 const struct ndr_interface_call
*call
;
1518 struct ndr_pull
*pull
;
1519 struct ndr_push
*push
;
1520 enum ndr_err_code ndr_err
;
1522 struct winreg_RestoreKey
*r
;
1524 call
= &ndr_table_winreg
.calls
[NDR_WINREG_RESTOREKEY
];
1526 r
= talloc(talloc_tos(), struct winreg_RestoreKey
);
1531 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
1536 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
1542 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1543 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
1544 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1549 if (DEBUGLEVEL
>= 10) {
1550 NDR_PRINT_IN_DEBUG(winreg_RestoreKey
, r
);
1553 r
->out
.result
= _winreg_RestoreKey(p
, r
);
1555 if (p
->rng_fault_state
) {
1557 /* Return true here, srv_pipe_hnd.c will take care */
1561 if (DEBUGLEVEL
>= 10) {
1562 NDR_PRINT_OUT_DEBUG(winreg_RestoreKey
, r
);
1565 push
= ndr_push_init_ctx(r
, NULL
);
1571 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
1572 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1577 blob
= ndr_push_blob(push
);
1578 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
1588 static bool api_winreg_SaveKey(pipes_struct
*p
)
1590 const struct ndr_interface_call
*call
;
1591 struct ndr_pull
*pull
;
1592 struct ndr_push
*push
;
1593 enum ndr_err_code ndr_err
;
1595 struct winreg_SaveKey
*r
;
1597 call
= &ndr_table_winreg
.calls
[NDR_WINREG_SAVEKEY
];
1599 r
= talloc(talloc_tos(), struct winreg_SaveKey
);
1604 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
1609 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
1615 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1616 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
1617 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1622 if (DEBUGLEVEL
>= 10) {
1623 NDR_PRINT_IN_DEBUG(winreg_SaveKey
, r
);
1626 r
->out
.result
= _winreg_SaveKey(p
, r
);
1628 if (p
->rng_fault_state
) {
1630 /* Return true here, srv_pipe_hnd.c will take care */
1634 if (DEBUGLEVEL
>= 10) {
1635 NDR_PRINT_OUT_DEBUG(winreg_SaveKey
, r
);
1638 push
= ndr_push_init_ctx(r
, NULL
);
1644 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
1645 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1650 blob
= ndr_push_blob(push
);
1651 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
1661 static bool api_winreg_SetKeySecurity(pipes_struct
*p
)
1663 const struct ndr_interface_call
*call
;
1664 struct ndr_pull
*pull
;
1665 struct ndr_push
*push
;
1666 enum ndr_err_code ndr_err
;
1668 struct winreg_SetKeySecurity
*r
;
1670 call
= &ndr_table_winreg
.calls
[NDR_WINREG_SETKEYSECURITY
];
1672 r
= talloc(talloc_tos(), struct winreg_SetKeySecurity
);
1677 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
1682 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
1688 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1689 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
1690 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1695 if (DEBUGLEVEL
>= 10) {
1696 NDR_PRINT_IN_DEBUG(winreg_SetKeySecurity
, r
);
1699 r
->out
.result
= _winreg_SetKeySecurity(p
, r
);
1701 if (p
->rng_fault_state
) {
1703 /* Return true here, srv_pipe_hnd.c will take care */
1707 if (DEBUGLEVEL
>= 10) {
1708 NDR_PRINT_OUT_DEBUG(winreg_SetKeySecurity
, r
);
1711 push
= ndr_push_init_ctx(r
, NULL
);
1717 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
1718 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1723 blob
= ndr_push_blob(push
);
1724 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
1734 static bool api_winreg_SetValue(pipes_struct
*p
)
1736 const struct ndr_interface_call
*call
;
1737 struct ndr_pull
*pull
;
1738 struct ndr_push
*push
;
1739 enum ndr_err_code ndr_err
;
1741 struct winreg_SetValue
*r
;
1743 call
= &ndr_table_winreg
.calls
[NDR_WINREG_SETVALUE
];
1745 r
= talloc(talloc_tos(), struct winreg_SetValue
);
1750 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
1755 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
1761 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1762 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
1763 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1768 if (DEBUGLEVEL
>= 10) {
1769 NDR_PRINT_IN_DEBUG(winreg_SetValue
, r
);
1772 r
->out
.result
= _winreg_SetValue(p
, r
);
1774 if (p
->rng_fault_state
) {
1776 /* Return true here, srv_pipe_hnd.c will take care */
1780 if (DEBUGLEVEL
>= 10) {
1781 NDR_PRINT_OUT_DEBUG(winreg_SetValue
, r
);
1784 push
= ndr_push_init_ctx(r
, NULL
);
1790 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
1791 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1796 blob
= ndr_push_blob(push
);
1797 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
1807 static bool api_winreg_UnLoadKey(pipes_struct
*p
)
1809 const struct ndr_interface_call
*call
;
1810 struct ndr_pull
*pull
;
1811 struct ndr_push
*push
;
1812 enum ndr_err_code ndr_err
;
1814 struct winreg_UnLoadKey
*r
;
1816 call
= &ndr_table_winreg
.calls
[NDR_WINREG_UNLOADKEY
];
1818 r
= talloc(talloc_tos(), struct winreg_UnLoadKey
);
1823 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
1828 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
1834 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1835 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
1836 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1841 if (DEBUGLEVEL
>= 10) {
1842 NDR_PRINT_IN_DEBUG(winreg_UnLoadKey
, r
);
1845 r
->out
.result
= _winreg_UnLoadKey(p
, r
);
1847 if (p
->rng_fault_state
) {
1849 /* Return true here, srv_pipe_hnd.c will take care */
1853 if (DEBUGLEVEL
>= 10) {
1854 NDR_PRINT_OUT_DEBUG(winreg_UnLoadKey
, r
);
1857 push
= ndr_push_init_ctx(r
, NULL
);
1863 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
1864 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1869 blob
= ndr_push_blob(push
);
1870 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
1880 static bool api_winreg_InitiateSystemShutdown(pipes_struct
*p
)
1882 const struct ndr_interface_call
*call
;
1883 struct ndr_pull
*pull
;
1884 struct ndr_push
*push
;
1885 enum ndr_err_code ndr_err
;
1887 struct winreg_InitiateSystemShutdown
*r
;
1889 call
= &ndr_table_winreg
.calls
[NDR_WINREG_INITIATESYSTEMSHUTDOWN
];
1891 r
= talloc(talloc_tos(), struct winreg_InitiateSystemShutdown
);
1896 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
1901 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
1907 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1908 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
1909 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1914 if (DEBUGLEVEL
>= 10) {
1915 NDR_PRINT_IN_DEBUG(winreg_InitiateSystemShutdown
, r
);
1918 r
->out
.result
= _winreg_InitiateSystemShutdown(p
, r
);
1920 if (p
->rng_fault_state
) {
1922 /* Return true here, srv_pipe_hnd.c will take care */
1926 if (DEBUGLEVEL
>= 10) {
1927 NDR_PRINT_OUT_DEBUG(winreg_InitiateSystemShutdown
, r
);
1930 push
= ndr_push_init_ctx(r
, NULL
);
1936 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
1937 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1942 blob
= ndr_push_blob(push
);
1943 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
1953 static bool api_winreg_AbortSystemShutdown(pipes_struct
*p
)
1955 const struct ndr_interface_call
*call
;
1956 struct ndr_pull
*pull
;
1957 struct ndr_push
*push
;
1958 enum ndr_err_code ndr_err
;
1960 struct winreg_AbortSystemShutdown
*r
;
1962 call
= &ndr_table_winreg
.calls
[NDR_WINREG_ABORTSYSTEMSHUTDOWN
];
1964 r
= talloc(talloc_tos(), struct winreg_AbortSystemShutdown
);
1969 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
1974 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
1980 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1981 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
1982 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1987 if (DEBUGLEVEL
>= 10) {
1988 NDR_PRINT_IN_DEBUG(winreg_AbortSystemShutdown
, r
);
1991 r
->out
.result
= _winreg_AbortSystemShutdown(p
, r
);
1993 if (p
->rng_fault_state
) {
1995 /* Return true here, srv_pipe_hnd.c will take care */
1999 if (DEBUGLEVEL
>= 10) {
2000 NDR_PRINT_OUT_DEBUG(winreg_AbortSystemShutdown
, r
);
2003 push
= ndr_push_init_ctx(r
, NULL
);
2009 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
2010 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2015 blob
= ndr_push_blob(push
);
2016 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
2026 static bool api_winreg_GetVersion(pipes_struct
*p
)
2028 const struct ndr_interface_call
*call
;
2029 struct ndr_pull
*pull
;
2030 struct ndr_push
*push
;
2031 enum ndr_err_code ndr_err
;
2033 struct winreg_GetVersion
*r
;
2035 call
= &ndr_table_winreg
.calls
[NDR_WINREG_GETVERSION
];
2037 r
= talloc(talloc_tos(), struct winreg_GetVersion
);
2042 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
2047 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
2053 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2054 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
2055 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2060 if (DEBUGLEVEL
>= 10) {
2061 NDR_PRINT_IN_DEBUG(winreg_GetVersion
, r
);
2064 ZERO_STRUCT(r
->out
);
2065 r
->out
.version
= talloc_zero(r
, uint32_t);
2066 if (r
->out
.version
== NULL
) {
2071 r
->out
.result
= _winreg_GetVersion(p
, r
);
2073 if (p
->rng_fault_state
) {
2075 /* Return true here, srv_pipe_hnd.c will take care */
2079 if (DEBUGLEVEL
>= 10) {
2080 NDR_PRINT_OUT_DEBUG(winreg_GetVersion
, r
);
2083 push
= ndr_push_init_ctx(r
, NULL
);
2089 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
2090 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2095 blob
= ndr_push_blob(push
);
2096 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
2106 static bool api_winreg_OpenHKCC(pipes_struct
*p
)
2108 const struct ndr_interface_call
*call
;
2109 struct ndr_pull
*pull
;
2110 struct ndr_push
*push
;
2111 enum ndr_err_code ndr_err
;
2113 struct winreg_OpenHKCC
*r
;
2115 call
= &ndr_table_winreg
.calls
[NDR_WINREG_OPENHKCC
];
2117 r
= talloc(talloc_tos(), struct winreg_OpenHKCC
);
2122 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
2127 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
2133 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2134 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
2135 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2140 if (DEBUGLEVEL
>= 10) {
2141 NDR_PRINT_IN_DEBUG(winreg_OpenHKCC
, r
);
2144 ZERO_STRUCT(r
->out
);
2145 r
->out
.handle
= talloc_zero(r
, struct policy_handle
);
2146 if (r
->out
.handle
== NULL
) {
2151 r
->out
.result
= _winreg_OpenHKCC(p
, r
);
2153 if (p
->rng_fault_state
) {
2155 /* Return true here, srv_pipe_hnd.c will take care */
2159 if (DEBUGLEVEL
>= 10) {
2160 NDR_PRINT_OUT_DEBUG(winreg_OpenHKCC
, r
);
2163 push
= ndr_push_init_ctx(r
, NULL
);
2169 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
2170 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2175 blob
= ndr_push_blob(push
);
2176 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
2186 static bool api_winreg_OpenHKDD(pipes_struct
*p
)
2188 const struct ndr_interface_call
*call
;
2189 struct ndr_pull
*pull
;
2190 struct ndr_push
*push
;
2191 enum ndr_err_code ndr_err
;
2193 struct winreg_OpenHKDD
*r
;
2195 call
= &ndr_table_winreg
.calls
[NDR_WINREG_OPENHKDD
];
2197 r
= talloc(talloc_tos(), struct winreg_OpenHKDD
);
2202 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
2207 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
2213 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2214 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
2215 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2220 if (DEBUGLEVEL
>= 10) {
2221 NDR_PRINT_IN_DEBUG(winreg_OpenHKDD
, r
);
2224 ZERO_STRUCT(r
->out
);
2225 r
->out
.handle
= talloc_zero(r
, struct policy_handle
);
2226 if (r
->out
.handle
== NULL
) {
2231 r
->out
.result
= _winreg_OpenHKDD(p
, r
);
2233 if (p
->rng_fault_state
) {
2235 /* Return true here, srv_pipe_hnd.c will take care */
2239 if (DEBUGLEVEL
>= 10) {
2240 NDR_PRINT_OUT_DEBUG(winreg_OpenHKDD
, r
);
2243 push
= ndr_push_init_ctx(r
, NULL
);
2249 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
2250 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2255 blob
= ndr_push_blob(push
);
2256 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
2266 static bool api_winreg_QueryMultipleValues(pipes_struct
*p
)
2268 const struct ndr_interface_call
*call
;
2269 struct ndr_pull
*pull
;
2270 struct ndr_push
*push
;
2271 enum ndr_err_code ndr_err
;
2273 struct winreg_QueryMultipleValues
*r
;
2275 call
= &ndr_table_winreg
.calls
[NDR_WINREG_QUERYMULTIPLEVALUES
];
2277 r
= talloc(talloc_tos(), struct winreg_QueryMultipleValues
);
2282 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
2287 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
2293 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2294 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
2295 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2300 if (DEBUGLEVEL
>= 10) {
2301 NDR_PRINT_IN_DEBUG(winreg_QueryMultipleValues
, r
);
2304 ZERO_STRUCT(r
->out
);
2305 r
->out
.values
= r
->in
.values
;
2306 r
->out
.buffer
= r
->in
.buffer
;
2307 r
->out
.buffer_size
= r
->in
.buffer_size
;
2308 r
->out
.result
= _winreg_QueryMultipleValues(p
, r
);
2310 if (p
->rng_fault_state
) {
2312 /* Return true here, srv_pipe_hnd.c will take care */
2316 if (DEBUGLEVEL
>= 10) {
2317 NDR_PRINT_OUT_DEBUG(winreg_QueryMultipleValues
, r
);
2320 push
= ndr_push_init_ctx(r
, NULL
);
2326 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
2327 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2332 blob
= ndr_push_blob(push
);
2333 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
2343 static bool api_winreg_InitiateSystemShutdownEx(pipes_struct
*p
)
2345 const struct ndr_interface_call
*call
;
2346 struct ndr_pull
*pull
;
2347 struct ndr_push
*push
;
2348 enum ndr_err_code ndr_err
;
2350 struct winreg_InitiateSystemShutdownEx
*r
;
2352 call
= &ndr_table_winreg
.calls
[NDR_WINREG_INITIATESYSTEMSHUTDOWNEX
];
2354 r
= talloc(talloc_tos(), struct winreg_InitiateSystemShutdownEx
);
2359 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
2364 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
2370 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2371 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
2372 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2377 if (DEBUGLEVEL
>= 10) {
2378 NDR_PRINT_IN_DEBUG(winreg_InitiateSystemShutdownEx
, r
);
2381 r
->out
.result
= _winreg_InitiateSystemShutdownEx(p
, r
);
2383 if (p
->rng_fault_state
) {
2385 /* Return true here, srv_pipe_hnd.c will take care */
2389 if (DEBUGLEVEL
>= 10) {
2390 NDR_PRINT_OUT_DEBUG(winreg_InitiateSystemShutdownEx
, r
);
2393 push
= ndr_push_init_ctx(r
, NULL
);
2399 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
2400 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2405 blob
= ndr_push_blob(push
);
2406 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
2416 static bool api_winreg_SaveKeyEx(pipes_struct
*p
)
2418 const struct ndr_interface_call
*call
;
2419 struct ndr_pull
*pull
;
2420 struct ndr_push
*push
;
2421 enum ndr_err_code ndr_err
;
2423 struct winreg_SaveKeyEx
*r
;
2425 call
= &ndr_table_winreg
.calls
[NDR_WINREG_SAVEKEYEX
];
2427 r
= talloc(talloc_tos(), struct winreg_SaveKeyEx
);
2432 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
2437 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
2443 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2444 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
2445 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2450 if (DEBUGLEVEL
>= 10) {
2451 NDR_PRINT_IN_DEBUG(winreg_SaveKeyEx
, r
);
2454 r
->out
.result
= _winreg_SaveKeyEx(p
, r
);
2456 if (p
->rng_fault_state
) {
2458 /* Return true here, srv_pipe_hnd.c will take care */
2462 if (DEBUGLEVEL
>= 10) {
2463 NDR_PRINT_OUT_DEBUG(winreg_SaveKeyEx
, r
);
2466 push
= ndr_push_init_ctx(r
, NULL
);
2472 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
2473 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2478 blob
= ndr_push_blob(push
);
2479 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
2489 static bool api_winreg_OpenHKPT(pipes_struct
*p
)
2491 const struct ndr_interface_call
*call
;
2492 struct ndr_pull
*pull
;
2493 struct ndr_push
*push
;
2494 enum ndr_err_code ndr_err
;
2496 struct winreg_OpenHKPT
*r
;
2498 call
= &ndr_table_winreg
.calls
[NDR_WINREG_OPENHKPT
];
2500 r
= talloc(talloc_tos(), struct winreg_OpenHKPT
);
2505 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
2510 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
2516 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2517 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
2518 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2523 if (DEBUGLEVEL
>= 10) {
2524 NDR_PRINT_IN_DEBUG(winreg_OpenHKPT
, r
);
2527 ZERO_STRUCT(r
->out
);
2528 r
->out
.handle
= talloc_zero(r
, struct policy_handle
);
2529 if (r
->out
.handle
== NULL
) {
2534 r
->out
.result
= _winreg_OpenHKPT(p
, r
);
2536 if (p
->rng_fault_state
) {
2538 /* Return true here, srv_pipe_hnd.c will take care */
2542 if (DEBUGLEVEL
>= 10) {
2543 NDR_PRINT_OUT_DEBUG(winreg_OpenHKPT
, r
);
2546 push
= ndr_push_init_ctx(r
, NULL
);
2552 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
2553 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2558 blob
= ndr_push_blob(push
);
2559 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
2569 static bool api_winreg_OpenHKPN(pipes_struct
*p
)
2571 const struct ndr_interface_call
*call
;
2572 struct ndr_pull
*pull
;
2573 struct ndr_push
*push
;
2574 enum ndr_err_code ndr_err
;
2576 struct winreg_OpenHKPN
*r
;
2578 call
= &ndr_table_winreg
.calls
[NDR_WINREG_OPENHKPN
];
2580 r
= talloc(talloc_tos(), struct winreg_OpenHKPN
);
2585 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
2590 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
2596 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2597 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
2598 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2603 if (DEBUGLEVEL
>= 10) {
2604 NDR_PRINT_IN_DEBUG(winreg_OpenHKPN
, r
);
2607 ZERO_STRUCT(r
->out
);
2608 r
->out
.handle
= talloc_zero(r
, struct policy_handle
);
2609 if (r
->out
.handle
== NULL
) {
2614 r
->out
.result
= _winreg_OpenHKPN(p
, r
);
2616 if (p
->rng_fault_state
) {
2618 /* Return true here, srv_pipe_hnd.c will take care */
2622 if (DEBUGLEVEL
>= 10) {
2623 NDR_PRINT_OUT_DEBUG(winreg_OpenHKPN
, r
);
2626 push
= ndr_push_init_ctx(r
, NULL
);
2632 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
2633 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2638 blob
= ndr_push_blob(push
);
2639 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
2649 static bool api_winreg_QueryMultipleValues2(pipes_struct
*p
)
2651 const struct ndr_interface_call
*call
;
2652 struct ndr_pull
*pull
;
2653 struct ndr_push
*push
;
2654 enum ndr_err_code ndr_err
;
2656 struct winreg_QueryMultipleValues2
*r
;
2658 call
= &ndr_table_winreg
.calls
[NDR_WINREG_QUERYMULTIPLEVALUES2
];
2660 r
= talloc(talloc_tos(), struct winreg_QueryMultipleValues2
);
2665 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
2670 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
2676 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2677 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
2678 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2683 if (DEBUGLEVEL
>= 10) {
2684 NDR_PRINT_IN_DEBUG(winreg_QueryMultipleValues2
, r
);
2687 r
->out
.result
= _winreg_QueryMultipleValues2(p
, r
);
2689 if (p
->rng_fault_state
) {
2691 /* Return true here, srv_pipe_hnd.c will take care */
2695 if (DEBUGLEVEL
>= 10) {
2696 NDR_PRINT_OUT_DEBUG(winreg_QueryMultipleValues2
, r
);
2699 push
= ndr_push_init_ctx(r
, NULL
);
2705 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
2706 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2711 blob
= ndr_push_blob(push
);
2712 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
2724 static struct api_struct api_winreg_cmds
[] =
2726 {"WINREG_OPENHKCR", NDR_WINREG_OPENHKCR
, api_winreg_OpenHKCR
},
2727 {"WINREG_OPENHKCU", NDR_WINREG_OPENHKCU
, api_winreg_OpenHKCU
},
2728 {"WINREG_OPENHKLM", NDR_WINREG_OPENHKLM
, api_winreg_OpenHKLM
},
2729 {"WINREG_OPENHKPD", NDR_WINREG_OPENHKPD
, api_winreg_OpenHKPD
},
2730 {"WINREG_OPENHKU", NDR_WINREG_OPENHKU
, api_winreg_OpenHKU
},
2731 {"WINREG_CLOSEKEY", NDR_WINREG_CLOSEKEY
, api_winreg_CloseKey
},
2732 {"WINREG_CREATEKEY", NDR_WINREG_CREATEKEY
, api_winreg_CreateKey
},
2733 {"WINREG_DELETEKEY", NDR_WINREG_DELETEKEY
, api_winreg_DeleteKey
},
2734 {"WINREG_DELETEVALUE", NDR_WINREG_DELETEVALUE
, api_winreg_DeleteValue
},
2735 {"WINREG_ENUMKEY", NDR_WINREG_ENUMKEY
, api_winreg_EnumKey
},
2736 {"WINREG_ENUMVALUE", NDR_WINREG_ENUMVALUE
, api_winreg_EnumValue
},
2737 {"WINREG_FLUSHKEY", NDR_WINREG_FLUSHKEY
, api_winreg_FlushKey
},
2738 {"WINREG_GETKEYSECURITY", NDR_WINREG_GETKEYSECURITY
, api_winreg_GetKeySecurity
},
2739 {"WINREG_LOADKEY", NDR_WINREG_LOADKEY
, api_winreg_LoadKey
},
2740 {"WINREG_NOTIFYCHANGEKEYVALUE", NDR_WINREG_NOTIFYCHANGEKEYVALUE
, api_winreg_NotifyChangeKeyValue
},
2741 {"WINREG_OPENKEY", NDR_WINREG_OPENKEY
, api_winreg_OpenKey
},
2742 {"WINREG_QUERYINFOKEY", NDR_WINREG_QUERYINFOKEY
, api_winreg_QueryInfoKey
},
2743 {"WINREG_QUERYVALUE", NDR_WINREG_QUERYVALUE
, api_winreg_QueryValue
},
2744 {"WINREG_REPLACEKEY", NDR_WINREG_REPLACEKEY
, api_winreg_ReplaceKey
},
2745 {"WINREG_RESTOREKEY", NDR_WINREG_RESTOREKEY
, api_winreg_RestoreKey
},
2746 {"WINREG_SAVEKEY", NDR_WINREG_SAVEKEY
, api_winreg_SaveKey
},
2747 {"WINREG_SETKEYSECURITY", NDR_WINREG_SETKEYSECURITY
, api_winreg_SetKeySecurity
},
2748 {"WINREG_SETVALUE", NDR_WINREG_SETVALUE
, api_winreg_SetValue
},
2749 {"WINREG_UNLOADKEY", NDR_WINREG_UNLOADKEY
, api_winreg_UnLoadKey
},
2750 {"WINREG_INITIATESYSTEMSHUTDOWN", NDR_WINREG_INITIATESYSTEMSHUTDOWN
, api_winreg_InitiateSystemShutdown
},
2751 {"WINREG_ABORTSYSTEMSHUTDOWN", NDR_WINREG_ABORTSYSTEMSHUTDOWN
, api_winreg_AbortSystemShutdown
},
2752 {"WINREG_GETVERSION", NDR_WINREG_GETVERSION
, api_winreg_GetVersion
},
2753 {"WINREG_OPENHKCC", NDR_WINREG_OPENHKCC
, api_winreg_OpenHKCC
},
2754 {"WINREG_OPENHKDD", NDR_WINREG_OPENHKDD
, api_winreg_OpenHKDD
},
2755 {"WINREG_QUERYMULTIPLEVALUES", NDR_WINREG_QUERYMULTIPLEVALUES
, api_winreg_QueryMultipleValues
},
2756 {"WINREG_INITIATESYSTEMSHUTDOWNEX", NDR_WINREG_INITIATESYSTEMSHUTDOWNEX
, api_winreg_InitiateSystemShutdownEx
},
2757 {"WINREG_SAVEKEYEX", NDR_WINREG_SAVEKEYEX
, api_winreg_SaveKeyEx
},
2758 {"WINREG_OPENHKPT", NDR_WINREG_OPENHKPT
, api_winreg_OpenHKPT
},
2759 {"WINREG_OPENHKPN", NDR_WINREG_OPENHKPN
, api_winreg_OpenHKPN
},
2760 {"WINREG_QUERYMULTIPLEVALUES2", NDR_WINREG_QUERYMULTIPLEVALUES2
, api_winreg_QueryMultipleValues2
},
2763 void winreg_get_pipe_fns(struct api_struct
**fns
, int *n_fns
)
2765 *fns
= api_winreg_cmds
;
2766 *n_fns
= sizeof(api_winreg_cmds
) / sizeof(struct api_struct
);
2769 NTSTATUS
rpc_winreg_dispatch(struct rpc_pipe_client
*cli
, TALLOC_CTX
*mem_ctx
, const struct ndr_interface_table
*table
, uint32_t opnum
, void *_r
)
2771 if (cli
->pipes_struct
== NULL
) {
2772 return NT_STATUS_INVALID_PARAMETER
;
2777 case NDR_WINREG_OPENHKCR
: {
2778 struct winreg_OpenHKCR
*r
= (struct winreg_OpenHKCR
*)_r
;
2779 ZERO_STRUCT(r
->out
);
2780 r
->out
.handle
= talloc_zero(mem_ctx
, struct policy_handle
);
2781 if (r
->out
.handle
== NULL
) {
2782 return NT_STATUS_NO_MEMORY
;
2785 r
->out
.result
= _winreg_OpenHKCR(cli
->pipes_struct
, r
);
2786 return NT_STATUS_OK
;
2789 case NDR_WINREG_OPENHKCU
: {
2790 struct winreg_OpenHKCU
*r
= (struct winreg_OpenHKCU
*)_r
;
2791 ZERO_STRUCT(r
->out
);
2792 r
->out
.handle
= talloc_zero(mem_ctx
, struct policy_handle
);
2793 if (r
->out
.handle
== NULL
) {
2794 return NT_STATUS_NO_MEMORY
;
2797 r
->out
.result
= _winreg_OpenHKCU(cli
->pipes_struct
, r
);
2798 return NT_STATUS_OK
;
2801 case NDR_WINREG_OPENHKLM
: {
2802 struct winreg_OpenHKLM
*r
= (struct winreg_OpenHKLM
*)_r
;
2803 ZERO_STRUCT(r
->out
);
2804 r
->out
.handle
= talloc_zero(mem_ctx
, struct policy_handle
);
2805 if (r
->out
.handle
== NULL
) {
2806 return NT_STATUS_NO_MEMORY
;
2809 r
->out
.result
= _winreg_OpenHKLM(cli
->pipes_struct
, r
);
2810 return NT_STATUS_OK
;
2813 case NDR_WINREG_OPENHKPD
: {
2814 struct winreg_OpenHKPD
*r
= (struct winreg_OpenHKPD
*)_r
;
2815 ZERO_STRUCT(r
->out
);
2816 r
->out
.handle
= talloc_zero(mem_ctx
, struct policy_handle
);
2817 if (r
->out
.handle
== NULL
) {
2818 return NT_STATUS_NO_MEMORY
;
2821 r
->out
.result
= _winreg_OpenHKPD(cli
->pipes_struct
, r
);
2822 return NT_STATUS_OK
;
2825 case NDR_WINREG_OPENHKU
: {
2826 struct winreg_OpenHKU
*r
= (struct winreg_OpenHKU
*)_r
;
2827 ZERO_STRUCT(r
->out
);
2828 r
->out
.handle
= talloc_zero(mem_ctx
, struct policy_handle
);
2829 if (r
->out
.handle
== NULL
) {
2830 return NT_STATUS_NO_MEMORY
;
2833 r
->out
.result
= _winreg_OpenHKU(cli
->pipes_struct
, r
);
2834 return NT_STATUS_OK
;
2837 case NDR_WINREG_CLOSEKEY
: {
2838 struct winreg_CloseKey
*r
= (struct winreg_CloseKey
*)_r
;
2839 ZERO_STRUCT(r
->out
);
2840 r
->out
.handle
= r
->in
.handle
;
2841 r
->out
.result
= _winreg_CloseKey(cli
->pipes_struct
, r
);
2842 return NT_STATUS_OK
;
2845 case NDR_WINREG_CREATEKEY
: {
2846 struct winreg_CreateKey
*r
= (struct winreg_CreateKey
*)_r
;
2847 ZERO_STRUCT(r
->out
);
2848 r
->out
.action_taken
= r
->in
.action_taken
;
2849 r
->out
.new_handle
= talloc_zero(mem_ctx
, struct policy_handle
);
2850 if (r
->out
.new_handle
== NULL
) {
2851 return NT_STATUS_NO_MEMORY
;
2854 r
->out
.result
= _winreg_CreateKey(cli
->pipes_struct
, r
);
2855 return NT_STATUS_OK
;
2858 case NDR_WINREG_DELETEKEY
: {
2859 struct winreg_DeleteKey
*r
= (struct winreg_DeleteKey
*)_r
;
2860 r
->out
.result
= _winreg_DeleteKey(cli
->pipes_struct
, r
);
2861 return NT_STATUS_OK
;
2864 case NDR_WINREG_DELETEVALUE
: {
2865 struct winreg_DeleteValue
*r
= (struct winreg_DeleteValue
*)_r
;
2866 r
->out
.result
= _winreg_DeleteValue(cli
->pipes_struct
, r
);
2867 return NT_STATUS_OK
;
2870 case NDR_WINREG_ENUMKEY
: {
2871 struct winreg_EnumKey
*r
= (struct winreg_EnumKey
*)_r
;
2872 ZERO_STRUCT(r
->out
);
2873 r
->out
.name
= r
->in
.name
;
2874 r
->out
.keyclass
= r
->in
.keyclass
;
2875 r
->out
.last_changed_time
= r
->in
.last_changed_time
;
2876 r
->out
.result
= _winreg_EnumKey(cli
->pipes_struct
, r
);
2877 return NT_STATUS_OK
;
2880 case NDR_WINREG_ENUMVALUE
: {
2881 struct winreg_EnumValue
*r
= (struct winreg_EnumValue
*)_r
;
2882 ZERO_STRUCT(r
->out
);
2883 r
->out
.name
= r
->in
.name
;
2884 r
->out
.type
= r
->in
.type
;
2885 r
->out
.value
= r
->in
.value
;
2886 r
->out
.size
= r
->in
.size
;
2887 r
->out
.length
= r
->in
.length
;
2888 r
->out
.result
= _winreg_EnumValue(cli
->pipes_struct
, r
);
2889 return NT_STATUS_OK
;
2892 case NDR_WINREG_FLUSHKEY
: {
2893 struct winreg_FlushKey
*r
= (struct winreg_FlushKey
*)_r
;
2894 r
->out
.result
= _winreg_FlushKey(cli
->pipes_struct
, r
);
2895 return NT_STATUS_OK
;
2898 case NDR_WINREG_GETKEYSECURITY
: {
2899 struct winreg_GetKeySecurity
*r
= (struct winreg_GetKeySecurity
*)_r
;
2900 ZERO_STRUCT(r
->out
);
2901 r
->out
.sd
= r
->in
.sd
;
2902 r
->out
.result
= _winreg_GetKeySecurity(cli
->pipes_struct
, r
);
2903 return NT_STATUS_OK
;
2906 case NDR_WINREG_LOADKEY
: {
2907 struct winreg_LoadKey
*r
= (struct winreg_LoadKey
*)_r
;
2908 r
->out
.result
= _winreg_LoadKey(cli
->pipes_struct
, r
);
2909 return NT_STATUS_OK
;
2912 case NDR_WINREG_NOTIFYCHANGEKEYVALUE
: {
2913 struct winreg_NotifyChangeKeyValue
*r
= (struct winreg_NotifyChangeKeyValue
*)_r
;
2914 r
->out
.result
= _winreg_NotifyChangeKeyValue(cli
->pipes_struct
, r
);
2915 return NT_STATUS_OK
;
2918 case NDR_WINREG_OPENKEY
: {
2919 struct winreg_OpenKey
*r
= (struct winreg_OpenKey
*)_r
;
2920 ZERO_STRUCT(r
->out
);
2921 r
->out
.handle
= talloc_zero(mem_ctx
, struct policy_handle
);
2922 if (r
->out
.handle
== NULL
) {
2923 return NT_STATUS_NO_MEMORY
;
2926 r
->out
.result
= _winreg_OpenKey(cli
->pipes_struct
, r
);
2927 return NT_STATUS_OK
;
2930 case NDR_WINREG_QUERYINFOKEY
: {
2931 struct winreg_QueryInfoKey
*r
= (struct winreg_QueryInfoKey
*)_r
;
2932 ZERO_STRUCT(r
->out
);
2933 r
->out
.classname
= r
->in
.classname
;
2934 r
->out
.num_subkeys
= talloc_zero(mem_ctx
, uint32_t);
2935 if (r
->out
.num_subkeys
== NULL
) {
2936 return NT_STATUS_NO_MEMORY
;
2939 r
->out
.max_subkeylen
= talloc_zero(mem_ctx
, uint32_t);
2940 if (r
->out
.max_subkeylen
== NULL
) {
2941 return NT_STATUS_NO_MEMORY
;
2944 r
->out
.max_classlen
= talloc_zero(mem_ctx
, uint32_t);
2945 if (r
->out
.max_classlen
== NULL
) {
2946 return NT_STATUS_NO_MEMORY
;
2949 r
->out
.num_values
= talloc_zero(mem_ctx
, uint32_t);
2950 if (r
->out
.num_values
== NULL
) {
2951 return NT_STATUS_NO_MEMORY
;
2954 r
->out
.max_valnamelen
= talloc_zero(mem_ctx
, uint32_t);
2955 if (r
->out
.max_valnamelen
== NULL
) {
2956 return NT_STATUS_NO_MEMORY
;
2959 r
->out
.max_valbufsize
= talloc_zero(mem_ctx
, uint32_t);
2960 if (r
->out
.max_valbufsize
== NULL
) {
2961 return NT_STATUS_NO_MEMORY
;
2964 r
->out
.secdescsize
= talloc_zero(mem_ctx
, uint32_t);
2965 if (r
->out
.secdescsize
== NULL
) {
2966 return NT_STATUS_NO_MEMORY
;
2969 r
->out
.last_changed_time
= talloc_zero(mem_ctx
, NTTIME
);
2970 if (r
->out
.last_changed_time
== NULL
) {
2971 return NT_STATUS_NO_MEMORY
;
2974 r
->out
.result
= _winreg_QueryInfoKey(cli
->pipes_struct
, r
);
2975 return NT_STATUS_OK
;
2978 case NDR_WINREG_QUERYVALUE
: {
2979 struct winreg_QueryValue
*r
= (struct winreg_QueryValue
*)_r
;
2980 ZERO_STRUCT(r
->out
);
2981 r
->out
.type
= r
->in
.type
;
2982 r
->out
.data
= r
->in
.data
;
2983 r
->out
.data_size
= r
->in
.data_size
;
2984 r
->out
.data_length
= r
->in
.data_length
;
2985 r
->out
.result
= _winreg_QueryValue(cli
->pipes_struct
, r
);
2986 return NT_STATUS_OK
;
2989 case NDR_WINREG_REPLACEKEY
: {
2990 struct winreg_ReplaceKey
*r
= (struct winreg_ReplaceKey
*)_r
;
2991 r
->out
.result
= _winreg_ReplaceKey(cli
->pipes_struct
, r
);
2992 return NT_STATUS_OK
;
2995 case NDR_WINREG_RESTOREKEY
: {
2996 struct winreg_RestoreKey
*r
= (struct winreg_RestoreKey
*)_r
;
2997 r
->out
.result
= _winreg_RestoreKey(cli
->pipes_struct
, r
);
2998 return NT_STATUS_OK
;
3001 case NDR_WINREG_SAVEKEY
: {
3002 struct winreg_SaveKey
*r
= (struct winreg_SaveKey
*)_r
;
3003 r
->out
.result
= _winreg_SaveKey(cli
->pipes_struct
, r
);
3004 return NT_STATUS_OK
;
3007 case NDR_WINREG_SETKEYSECURITY
: {
3008 struct winreg_SetKeySecurity
*r
= (struct winreg_SetKeySecurity
*)_r
;
3009 r
->out
.result
= _winreg_SetKeySecurity(cli
->pipes_struct
, r
);
3010 return NT_STATUS_OK
;
3013 case NDR_WINREG_SETVALUE
: {
3014 struct winreg_SetValue
*r
= (struct winreg_SetValue
*)_r
;
3015 r
->out
.result
= _winreg_SetValue(cli
->pipes_struct
, r
);
3016 return NT_STATUS_OK
;
3019 case NDR_WINREG_UNLOADKEY
: {
3020 struct winreg_UnLoadKey
*r
= (struct winreg_UnLoadKey
*)_r
;
3021 r
->out
.result
= _winreg_UnLoadKey(cli
->pipes_struct
, r
);
3022 return NT_STATUS_OK
;
3025 case NDR_WINREG_INITIATESYSTEMSHUTDOWN
: {
3026 struct winreg_InitiateSystemShutdown
*r
= (struct winreg_InitiateSystemShutdown
*)_r
;
3027 r
->out
.result
= _winreg_InitiateSystemShutdown(cli
->pipes_struct
, r
);
3028 return NT_STATUS_OK
;
3031 case NDR_WINREG_ABORTSYSTEMSHUTDOWN
: {
3032 struct winreg_AbortSystemShutdown
*r
= (struct winreg_AbortSystemShutdown
*)_r
;
3033 r
->out
.result
= _winreg_AbortSystemShutdown(cli
->pipes_struct
, r
);
3034 return NT_STATUS_OK
;
3037 case NDR_WINREG_GETVERSION
: {
3038 struct winreg_GetVersion
*r
= (struct winreg_GetVersion
*)_r
;
3039 ZERO_STRUCT(r
->out
);
3040 r
->out
.version
= talloc_zero(mem_ctx
, uint32_t);
3041 if (r
->out
.version
== NULL
) {
3042 return NT_STATUS_NO_MEMORY
;
3045 r
->out
.result
= _winreg_GetVersion(cli
->pipes_struct
, r
);
3046 return NT_STATUS_OK
;
3049 case NDR_WINREG_OPENHKCC
: {
3050 struct winreg_OpenHKCC
*r
= (struct winreg_OpenHKCC
*)_r
;
3051 ZERO_STRUCT(r
->out
);
3052 r
->out
.handle
= talloc_zero(mem_ctx
, struct policy_handle
);
3053 if (r
->out
.handle
== NULL
) {
3054 return NT_STATUS_NO_MEMORY
;
3057 r
->out
.result
= _winreg_OpenHKCC(cli
->pipes_struct
, r
);
3058 return NT_STATUS_OK
;
3061 case NDR_WINREG_OPENHKDD
: {
3062 struct winreg_OpenHKDD
*r
= (struct winreg_OpenHKDD
*)_r
;
3063 ZERO_STRUCT(r
->out
);
3064 r
->out
.handle
= talloc_zero(mem_ctx
, struct policy_handle
);
3065 if (r
->out
.handle
== NULL
) {
3066 return NT_STATUS_NO_MEMORY
;
3069 r
->out
.result
= _winreg_OpenHKDD(cli
->pipes_struct
, r
);
3070 return NT_STATUS_OK
;
3073 case NDR_WINREG_QUERYMULTIPLEVALUES
: {
3074 struct winreg_QueryMultipleValues
*r
= (struct winreg_QueryMultipleValues
*)_r
;
3075 ZERO_STRUCT(r
->out
);
3076 r
->out
.values
= r
->in
.values
;
3077 r
->out
.buffer
= r
->in
.buffer
;
3078 r
->out
.buffer_size
= r
->in
.buffer_size
;
3079 r
->out
.result
= _winreg_QueryMultipleValues(cli
->pipes_struct
, r
);
3080 return NT_STATUS_OK
;
3083 case NDR_WINREG_INITIATESYSTEMSHUTDOWNEX
: {
3084 struct winreg_InitiateSystemShutdownEx
*r
= (struct winreg_InitiateSystemShutdownEx
*)_r
;
3085 r
->out
.result
= _winreg_InitiateSystemShutdownEx(cli
->pipes_struct
, r
);
3086 return NT_STATUS_OK
;
3089 case NDR_WINREG_SAVEKEYEX
: {
3090 struct winreg_SaveKeyEx
*r
= (struct winreg_SaveKeyEx
*)_r
;
3091 r
->out
.result
= _winreg_SaveKeyEx(cli
->pipes_struct
, r
);
3092 return NT_STATUS_OK
;
3095 case NDR_WINREG_OPENHKPT
: {
3096 struct winreg_OpenHKPT
*r
= (struct winreg_OpenHKPT
*)_r
;
3097 ZERO_STRUCT(r
->out
);
3098 r
->out
.handle
= talloc_zero(mem_ctx
, struct policy_handle
);
3099 if (r
->out
.handle
== NULL
) {
3100 return NT_STATUS_NO_MEMORY
;
3103 r
->out
.result
= _winreg_OpenHKPT(cli
->pipes_struct
, r
);
3104 return NT_STATUS_OK
;
3107 case NDR_WINREG_OPENHKPN
: {
3108 struct winreg_OpenHKPN
*r
= (struct winreg_OpenHKPN
*)_r
;
3109 ZERO_STRUCT(r
->out
);
3110 r
->out
.handle
= talloc_zero(mem_ctx
, struct policy_handle
);
3111 if (r
->out
.handle
== NULL
) {
3112 return NT_STATUS_NO_MEMORY
;
3115 r
->out
.result
= _winreg_OpenHKPN(cli
->pipes_struct
, r
);
3116 return NT_STATUS_OK
;
3119 case NDR_WINREG_QUERYMULTIPLEVALUES2
: {
3120 struct winreg_QueryMultipleValues2
*r
= (struct winreg_QueryMultipleValues2
*)_r
;
3121 r
->out
.result
= _winreg_QueryMultipleValues2(cli
->pipes_struct
, r
);
3122 return NT_STATUS_OK
;
3126 return NT_STATUS_NOT_IMPLEMENTED
;
3130 NTSTATUS
rpc_winreg_init(void)
3132 return rpc_srv_register(SMB_RPC_INTERFACE_VERSION
, "winreg", "winreg", &ndr_table_winreg
, api_winreg_cmds
, sizeof(api_winreg_cmds
) / sizeof(struct api_struct
));