2 * Unix SMB/CIFS implementation.
3 * server auto-generated by pidl. DO NOT MODIFY!
7 #include "../librpc/gen_ndr/srv_svcctl.h"
9 static bool api_svcctl_CloseServiceHandle(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 svcctl_CloseServiceHandle
*r
;
18 call
= &ndr_table_svcctl
.calls
[NDR_SVCCTL_CLOSESERVICEHANDLE
];
20 r
= talloc(talloc_tos(), struct svcctl_CloseServiceHandle
);
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(svcctl_CloseServiceHandle
, r
);
48 r
->out
.handle
= r
->in
.handle
;
49 r
->out
.result
= _svcctl_CloseServiceHandle(p
, r
);
51 if (p
->rng_fault_state
) {
53 /* Return true here, srv_pipe_hnd.c will take care */
57 if (DEBUGLEVEL
>= 10) {
58 NDR_PRINT_OUT_DEBUG(svcctl_CloseServiceHandle
, r
);
61 push
= ndr_push_init_ctx(r
, NULL
);
67 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
68 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
73 blob
= ndr_push_blob(push
);
74 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
84 static bool api_svcctl_ControlService(pipes_struct
*p
)
86 const struct ndr_interface_call
*call
;
87 struct ndr_pull
*pull
;
88 struct ndr_push
*push
;
89 enum ndr_err_code ndr_err
;
91 struct svcctl_ControlService
*r
;
93 call
= &ndr_table_svcctl
.calls
[NDR_SVCCTL_CONTROLSERVICE
];
95 r
= talloc(talloc_tos(), struct svcctl_ControlService
);
100 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
105 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
111 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
112 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
113 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
118 if (DEBUGLEVEL
>= 10) {
119 NDR_PRINT_IN_DEBUG(svcctl_ControlService
, r
);
123 r
->out
.service_status
= talloc_zero(r
, struct SERVICE_STATUS
);
124 if (r
->out
.service_status
== NULL
) {
129 r
->out
.result
= _svcctl_ControlService(p
, r
);
131 if (p
->rng_fault_state
) {
133 /* Return true here, srv_pipe_hnd.c will take care */
137 if (DEBUGLEVEL
>= 10) {
138 NDR_PRINT_OUT_DEBUG(svcctl_ControlService
, r
);
141 push
= ndr_push_init_ctx(r
, NULL
);
147 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
148 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
153 blob
= ndr_push_blob(push
);
154 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
164 static bool api_svcctl_DeleteService(pipes_struct
*p
)
166 const struct ndr_interface_call
*call
;
167 struct ndr_pull
*pull
;
168 struct ndr_push
*push
;
169 enum ndr_err_code ndr_err
;
171 struct svcctl_DeleteService
*r
;
173 call
= &ndr_table_svcctl
.calls
[NDR_SVCCTL_DELETESERVICE
];
175 r
= talloc(talloc_tos(), struct svcctl_DeleteService
);
180 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
185 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
191 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
192 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
193 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
198 if (DEBUGLEVEL
>= 10) {
199 NDR_PRINT_IN_DEBUG(svcctl_DeleteService
, r
);
202 r
->out
.result
= _svcctl_DeleteService(p
, r
);
204 if (p
->rng_fault_state
) {
206 /* Return true here, srv_pipe_hnd.c will take care */
210 if (DEBUGLEVEL
>= 10) {
211 NDR_PRINT_OUT_DEBUG(svcctl_DeleteService
, r
);
214 push
= ndr_push_init_ctx(r
, NULL
);
220 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
221 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
226 blob
= ndr_push_blob(push
);
227 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
237 static bool api_svcctl_LockServiceDatabase(pipes_struct
*p
)
239 const struct ndr_interface_call
*call
;
240 struct ndr_pull
*pull
;
241 struct ndr_push
*push
;
242 enum ndr_err_code ndr_err
;
244 struct svcctl_LockServiceDatabase
*r
;
246 call
= &ndr_table_svcctl
.calls
[NDR_SVCCTL_LOCKSERVICEDATABASE
];
248 r
= talloc(talloc_tos(), struct svcctl_LockServiceDatabase
);
253 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
258 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
264 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
265 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
266 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
271 if (DEBUGLEVEL
>= 10) {
272 NDR_PRINT_IN_DEBUG(svcctl_LockServiceDatabase
, r
);
276 r
->out
.lock
= talloc_zero(r
, struct policy_handle
);
277 if (r
->out
.lock
== NULL
) {
282 r
->out
.result
= _svcctl_LockServiceDatabase(p
, r
);
284 if (p
->rng_fault_state
) {
286 /* Return true here, srv_pipe_hnd.c will take care */
290 if (DEBUGLEVEL
>= 10) {
291 NDR_PRINT_OUT_DEBUG(svcctl_LockServiceDatabase
, r
);
294 push
= ndr_push_init_ctx(r
, NULL
);
300 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
301 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
306 blob
= ndr_push_blob(push
);
307 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
317 static bool api_svcctl_QueryServiceObjectSecurity(pipes_struct
*p
)
319 const struct ndr_interface_call
*call
;
320 struct ndr_pull
*pull
;
321 struct ndr_push
*push
;
322 enum ndr_err_code ndr_err
;
324 struct svcctl_QueryServiceObjectSecurity
*r
;
326 call
= &ndr_table_svcctl
.calls
[NDR_SVCCTL_QUERYSERVICEOBJECTSECURITY
];
328 r
= talloc(talloc_tos(), struct svcctl_QueryServiceObjectSecurity
);
333 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
338 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
344 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
345 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
346 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
351 if (DEBUGLEVEL
>= 10) {
352 NDR_PRINT_IN_DEBUG(svcctl_QueryServiceObjectSecurity
, r
);
356 r
->out
.buffer
= talloc_zero_array(r
, uint8_t, r
->in
.offered
);
357 if (r
->out
.buffer
== NULL
) {
362 r
->out
.needed
= talloc_zero(r
, uint32_t);
363 if (r
->out
.needed
== NULL
) {
368 r
->out
.result
= _svcctl_QueryServiceObjectSecurity(p
, r
);
370 if (p
->rng_fault_state
) {
372 /* Return true here, srv_pipe_hnd.c will take care */
376 if (DEBUGLEVEL
>= 10) {
377 NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceObjectSecurity
, r
);
380 push
= ndr_push_init_ctx(r
, NULL
);
386 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
387 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
392 blob
= ndr_push_blob(push
);
393 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
403 static bool api_svcctl_SetServiceObjectSecurity(pipes_struct
*p
)
405 const struct ndr_interface_call
*call
;
406 struct ndr_pull
*pull
;
407 struct ndr_push
*push
;
408 enum ndr_err_code ndr_err
;
410 struct svcctl_SetServiceObjectSecurity
*r
;
412 call
= &ndr_table_svcctl
.calls
[NDR_SVCCTL_SETSERVICEOBJECTSECURITY
];
414 r
= talloc(talloc_tos(), struct svcctl_SetServiceObjectSecurity
);
419 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
424 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
430 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
431 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
432 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
437 if (DEBUGLEVEL
>= 10) {
438 NDR_PRINT_IN_DEBUG(svcctl_SetServiceObjectSecurity
, r
);
441 r
->out
.result
= _svcctl_SetServiceObjectSecurity(p
, r
);
443 if (p
->rng_fault_state
) {
445 /* Return true here, srv_pipe_hnd.c will take care */
449 if (DEBUGLEVEL
>= 10) {
450 NDR_PRINT_OUT_DEBUG(svcctl_SetServiceObjectSecurity
, r
);
453 push
= ndr_push_init_ctx(r
, NULL
);
459 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
460 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
465 blob
= ndr_push_blob(push
);
466 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
476 static bool api_svcctl_QueryServiceStatus(pipes_struct
*p
)
478 const struct ndr_interface_call
*call
;
479 struct ndr_pull
*pull
;
480 struct ndr_push
*push
;
481 enum ndr_err_code ndr_err
;
483 struct svcctl_QueryServiceStatus
*r
;
485 call
= &ndr_table_svcctl
.calls
[NDR_SVCCTL_QUERYSERVICESTATUS
];
487 r
= talloc(talloc_tos(), struct svcctl_QueryServiceStatus
);
492 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
497 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
503 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
504 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
505 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
510 if (DEBUGLEVEL
>= 10) {
511 NDR_PRINT_IN_DEBUG(svcctl_QueryServiceStatus
, r
);
515 r
->out
.service_status
= talloc_zero(r
, struct SERVICE_STATUS
);
516 if (r
->out
.service_status
== NULL
) {
521 r
->out
.result
= _svcctl_QueryServiceStatus(p
, r
);
523 if (p
->rng_fault_state
) {
525 /* Return true here, srv_pipe_hnd.c will take care */
529 if (DEBUGLEVEL
>= 10) {
530 NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceStatus
, r
);
533 push
= ndr_push_init_ctx(r
, NULL
);
539 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
540 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
545 blob
= ndr_push_blob(push
);
546 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
556 static bool api_svcctl_SetServiceStatus(pipes_struct
*p
)
558 const struct ndr_interface_call
*call
;
559 struct ndr_pull
*pull
;
560 struct ndr_push
*push
;
561 enum ndr_err_code ndr_err
;
563 struct svcctl_SetServiceStatus
*r
;
565 call
= &ndr_table_svcctl
.calls
[NDR_SVCCTL_SETSERVICESTATUS
];
567 r
= talloc(talloc_tos(), struct svcctl_SetServiceStatus
);
572 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
577 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
583 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
584 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
585 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
590 if (DEBUGLEVEL
>= 10) {
591 NDR_PRINT_IN_DEBUG(svcctl_SetServiceStatus
, r
);
594 r
->out
.result
= _svcctl_SetServiceStatus(p
, r
);
596 if (p
->rng_fault_state
) {
598 /* Return true here, srv_pipe_hnd.c will take care */
602 if (DEBUGLEVEL
>= 10) {
603 NDR_PRINT_OUT_DEBUG(svcctl_SetServiceStatus
, r
);
606 push
= ndr_push_init_ctx(r
, NULL
);
612 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
613 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
618 blob
= ndr_push_blob(push
);
619 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
629 static bool api_svcctl_UnlockServiceDatabase(pipes_struct
*p
)
631 const struct ndr_interface_call
*call
;
632 struct ndr_pull
*pull
;
633 struct ndr_push
*push
;
634 enum ndr_err_code ndr_err
;
636 struct svcctl_UnlockServiceDatabase
*r
;
638 call
= &ndr_table_svcctl
.calls
[NDR_SVCCTL_UNLOCKSERVICEDATABASE
];
640 r
= talloc(talloc_tos(), struct svcctl_UnlockServiceDatabase
);
645 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
650 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
656 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
657 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
658 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
663 if (DEBUGLEVEL
>= 10) {
664 NDR_PRINT_IN_DEBUG(svcctl_UnlockServiceDatabase
, r
);
668 r
->out
.lock
= r
->in
.lock
;
669 r
->out
.result
= _svcctl_UnlockServiceDatabase(p
, r
);
671 if (p
->rng_fault_state
) {
673 /* Return true here, srv_pipe_hnd.c will take care */
677 if (DEBUGLEVEL
>= 10) {
678 NDR_PRINT_OUT_DEBUG(svcctl_UnlockServiceDatabase
, r
);
681 push
= ndr_push_init_ctx(r
, NULL
);
687 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
688 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
693 blob
= ndr_push_blob(push
);
694 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
704 static bool api_svcctl_NotifyBootConfigStatus(pipes_struct
*p
)
706 const struct ndr_interface_call
*call
;
707 struct ndr_pull
*pull
;
708 struct ndr_push
*push
;
709 enum ndr_err_code ndr_err
;
711 struct svcctl_NotifyBootConfigStatus
*r
;
713 call
= &ndr_table_svcctl
.calls
[NDR_SVCCTL_NOTIFYBOOTCONFIGSTATUS
];
715 r
= talloc(talloc_tos(), struct svcctl_NotifyBootConfigStatus
);
720 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
725 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
731 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
732 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
733 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
738 if (DEBUGLEVEL
>= 10) {
739 NDR_PRINT_IN_DEBUG(svcctl_NotifyBootConfigStatus
, r
);
742 r
->out
.result
= _svcctl_NotifyBootConfigStatus(p
, r
);
744 if (p
->rng_fault_state
) {
746 /* Return true here, srv_pipe_hnd.c will take care */
750 if (DEBUGLEVEL
>= 10) {
751 NDR_PRINT_OUT_DEBUG(svcctl_NotifyBootConfigStatus
, r
);
754 push
= ndr_push_init_ctx(r
, NULL
);
760 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
761 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
766 blob
= ndr_push_blob(push
);
767 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
777 static bool api_svcctl_SCSetServiceBitsW(pipes_struct
*p
)
779 const struct ndr_interface_call
*call
;
780 struct ndr_pull
*pull
;
781 struct ndr_push
*push
;
782 enum ndr_err_code ndr_err
;
784 struct svcctl_SCSetServiceBitsW
*r
;
786 call
= &ndr_table_svcctl
.calls
[NDR_SVCCTL_SCSETSERVICEBITSW
];
788 r
= talloc(talloc_tos(), struct svcctl_SCSetServiceBitsW
);
793 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
798 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
804 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
805 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
806 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
811 if (DEBUGLEVEL
>= 10) {
812 NDR_PRINT_IN_DEBUG(svcctl_SCSetServiceBitsW
, r
);
815 r
->out
.result
= _svcctl_SCSetServiceBitsW(p
, r
);
817 if (p
->rng_fault_state
) {
819 /* Return true here, srv_pipe_hnd.c will take care */
823 if (DEBUGLEVEL
>= 10) {
824 NDR_PRINT_OUT_DEBUG(svcctl_SCSetServiceBitsW
, r
);
827 push
= ndr_push_init_ctx(r
, NULL
);
833 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
834 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
839 blob
= ndr_push_blob(push
);
840 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
850 static bool api_svcctl_ChangeServiceConfigW(pipes_struct
*p
)
852 const struct ndr_interface_call
*call
;
853 struct ndr_pull
*pull
;
854 struct ndr_push
*push
;
855 enum ndr_err_code ndr_err
;
857 struct svcctl_ChangeServiceConfigW
*r
;
859 call
= &ndr_table_svcctl
.calls
[NDR_SVCCTL_CHANGESERVICECONFIGW
];
861 r
= talloc(talloc_tos(), struct svcctl_ChangeServiceConfigW
);
866 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
871 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
877 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
878 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
879 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
884 if (DEBUGLEVEL
>= 10) {
885 NDR_PRINT_IN_DEBUG(svcctl_ChangeServiceConfigW
, r
);
889 r
->out
.tag_id
= talloc_zero(r
, uint32_t);
890 if (r
->out
.tag_id
== NULL
) {
895 r
->out
.result
= _svcctl_ChangeServiceConfigW(p
, r
);
897 if (p
->rng_fault_state
) {
899 /* Return true here, srv_pipe_hnd.c will take care */
903 if (DEBUGLEVEL
>= 10) {
904 NDR_PRINT_OUT_DEBUG(svcctl_ChangeServiceConfigW
, r
);
907 push
= ndr_push_init_ctx(r
, NULL
);
913 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
914 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
919 blob
= ndr_push_blob(push
);
920 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
930 static bool api_svcctl_CreateServiceW(pipes_struct
*p
)
932 const struct ndr_interface_call
*call
;
933 struct ndr_pull
*pull
;
934 struct ndr_push
*push
;
935 enum ndr_err_code ndr_err
;
937 struct svcctl_CreateServiceW
*r
;
939 call
= &ndr_table_svcctl
.calls
[NDR_SVCCTL_CREATESERVICEW
];
941 r
= talloc(talloc_tos(), struct svcctl_CreateServiceW
);
946 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
951 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
957 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
958 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
959 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
964 if (DEBUGLEVEL
>= 10) {
965 NDR_PRINT_IN_DEBUG(svcctl_CreateServiceW
, r
);
969 r
->out
.TagId
= r
->in
.TagId
;
970 r
->out
.handle
= talloc_zero(r
, struct policy_handle
);
971 if (r
->out
.handle
== NULL
) {
976 r
->out
.result
= _svcctl_CreateServiceW(p
, r
);
978 if (p
->rng_fault_state
) {
980 /* Return true here, srv_pipe_hnd.c will take care */
984 if (DEBUGLEVEL
>= 10) {
985 NDR_PRINT_OUT_DEBUG(svcctl_CreateServiceW
, r
);
988 push
= ndr_push_init_ctx(r
, NULL
);
994 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
995 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1000 blob
= ndr_push_blob(push
);
1001 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
1011 static bool api_svcctl_EnumDependentServicesW(pipes_struct
*p
)
1013 const struct ndr_interface_call
*call
;
1014 struct ndr_pull
*pull
;
1015 struct ndr_push
*push
;
1016 enum ndr_err_code ndr_err
;
1018 struct svcctl_EnumDependentServicesW
*r
;
1020 call
= &ndr_table_svcctl
.calls
[NDR_SVCCTL_ENUMDEPENDENTSERVICESW
];
1022 r
= talloc(talloc_tos(), struct svcctl_EnumDependentServicesW
);
1027 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
1032 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
1038 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1039 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
1040 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1045 if (DEBUGLEVEL
>= 10) {
1046 NDR_PRINT_IN_DEBUG(svcctl_EnumDependentServicesW
, r
);
1049 ZERO_STRUCT(r
->out
);
1050 r
->out
.service_status
= talloc_zero_array(r
, uint8_t, r
->in
.offered
);
1051 if (r
->out
.service_status
== NULL
) {
1056 r
->out
.needed
= talloc_zero(r
, uint32_t);
1057 if (r
->out
.needed
== NULL
) {
1062 r
->out
.services_returned
= talloc_zero(r
, uint32_t);
1063 if (r
->out
.services_returned
== NULL
) {
1068 r
->out
.result
= _svcctl_EnumDependentServicesW(p
, r
);
1070 if (p
->rng_fault_state
) {
1072 /* Return true here, srv_pipe_hnd.c will take care */
1076 if (DEBUGLEVEL
>= 10) {
1077 NDR_PRINT_OUT_DEBUG(svcctl_EnumDependentServicesW
, r
);
1080 push
= ndr_push_init_ctx(r
, NULL
);
1086 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
1087 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1092 blob
= ndr_push_blob(push
);
1093 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
1103 static bool api_svcctl_EnumServicesStatusW(pipes_struct
*p
)
1105 const struct ndr_interface_call
*call
;
1106 struct ndr_pull
*pull
;
1107 struct ndr_push
*push
;
1108 enum ndr_err_code ndr_err
;
1110 struct svcctl_EnumServicesStatusW
*r
;
1112 call
= &ndr_table_svcctl
.calls
[NDR_SVCCTL_ENUMSERVICESSTATUSW
];
1114 r
= talloc(talloc_tos(), struct svcctl_EnumServicesStatusW
);
1119 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
1124 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
1130 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1131 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
1132 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1137 if (DEBUGLEVEL
>= 10) {
1138 NDR_PRINT_IN_DEBUG(svcctl_EnumServicesStatusW
, r
);
1141 ZERO_STRUCT(r
->out
);
1142 r
->out
.resume_handle
= r
->in
.resume_handle
;
1143 r
->out
.service
= talloc_zero_array(r
, uint8_t, r
->in
.offered
);
1144 if (r
->out
.service
== NULL
) {
1149 r
->out
.needed
= talloc_zero(r
, uint32_t);
1150 if (r
->out
.needed
== NULL
) {
1155 r
->out
.services_returned
= talloc_zero(r
, uint32_t);
1156 if (r
->out
.services_returned
== NULL
) {
1161 r
->out
.result
= _svcctl_EnumServicesStatusW(p
, r
);
1163 if (p
->rng_fault_state
) {
1165 /* Return true here, srv_pipe_hnd.c will take care */
1169 if (DEBUGLEVEL
>= 10) {
1170 NDR_PRINT_OUT_DEBUG(svcctl_EnumServicesStatusW
, r
);
1173 push
= ndr_push_init_ctx(r
, NULL
);
1179 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
1180 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1185 blob
= ndr_push_blob(push
);
1186 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
1196 static bool api_svcctl_OpenSCManagerW(pipes_struct
*p
)
1198 const struct ndr_interface_call
*call
;
1199 struct ndr_pull
*pull
;
1200 struct ndr_push
*push
;
1201 enum ndr_err_code ndr_err
;
1203 struct svcctl_OpenSCManagerW
*r
;
1205 call
= &ndr_table_svcctl
.calls
[NDR_SVCCTL_OPENSCMANAGERW
];
1207 r
= talloc(talloc_tos(), struct svcctl_OpenSCManagerW
);
1212 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
1217 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
1223 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1224 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
1225 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1230 if (DEBUGLEVEL
>= 10) {
1231 NDR_PRINT_IN_DEBUG(svcctl_OpenSCManagerW
, r
);
1234 ZERO_STRUCT(r
->out
);
1235 r
->out
.handle
= talloc_zero(r
, struct policy_handle
);
1236 if (r
->out
.handle
== NULL
) {
1241 r
->out
.result
= _svcctl_OpenSCManagerW(p
, r
);
1243 if (p
->rng_fault_state
) {
1245 /* Return true here, srv_pipe_hnd.c will take care */
1249 if (DEBUGLEVEL
>= 10) {
1250 NDR_PRINT_OUT_DEBUG(svcctl_OpenSCManagerW
, r
);
1253 push
= ndr_push_init_ctx(r
, NULL
);
1259 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
1260 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1265 blob
= ndr_push_blob(push
);
1266 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
1276 static bool api_svcctl_OpenServiceW(pipes_struct
*p
)
1278 const struct ndr_interface_call
*call
;
1279 struct ndr_pull
*pull
;
1280 struct ndr_push
*push
;
1281 enum ndr_err_code ndr_err
;
1283 struct svcctl_OpenServiceW
*r
;
1285 call
= &ndr_table_svcctl
.calls
[NDR_SVCCTL_OPENSERVICEW
];
1287 r
= talloc(talloc_tos(), struct svcctl_OpenServiceW
);
1292 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
1297 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
1303 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1304 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
1305 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1310 if (DEBUGLEVEL
>= 10) {
1311 NDR_PRINT_IN_DEBUG(svcctl_OpenServiceW
, r
);
1314 ZERO_STRUCT(r
->out
);
1315 r
->out
.handle
= talloc_zero(r
, struct policy_handle
);
1316 if (r
->out
.handle
== NULL
) {
1321 r
->out
.result
= _svcctl_OpenServiceW(p
, r
);
1323 if (p
->rng_fault_state
) {
1325 /* Return true here, srv_pipe_hnd.c will take care */
1329 if (DEBUGLEVEL
>= 10) {
1330 NDR_PRINT_OUT_DEBUG(svcctl_OpenServiceW
, r
);
1333 push
= ndr_push_init_ctx(r
, NULL
);
1339 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
1340 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1345 blob
= ndr_push_blob(push
);
1346 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
1356 static bool api_svcctl_QueryServiceConfigW(pipes_struct
*p
)
1358 const struct ndr_interface_call
*call
;
1359 struct ndr_pull
*pull
;
1360 struct ndr_push
*push
;
1361 enum ndr_err_code ndr_err
;
1363 struct svcctl_QueryServiceConfigW
*r
;
1365 call
= &ndr_table_svcctl
.calls
[NDR_SVCCTL_QUERYSERVICECONFIGW
];
1367 r
= talloc(talloc_tos(), struct svcctl_QueryServiceConfigW
);
1372 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
1377 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
1383 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1384 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
1385 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1390 if (DEBUGLEVEL
>= 10) {
1391 NDR_PRINT_IN_DEBUG(svcctl_QueryServiceConfigW
, r
);
1394 ZERO_STRUCT(r
->out
);
1395 r
->out
.query
= talloc_zero(r
, struct QUERY_SERVICE_CONFIG
);
1396 if (r
->out
.query
== NULL
) {
1401 r
->out
.needed
= talloc_zero(r
, uint32_t);
1402 if (r
->out
.needed
== NULL
) {
1407 r
->out
.result
= _svcctl_QueryServiceConfigW(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(svcctl_QueryServiceConfigW
, 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_svcctl_QueryServiceLockStatusW(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 svcctl_QueryServiceLockStatusW
*r
;
1451 call
= &ndr_table_svcctl
.calls
[NDR_SVCCTL_QUERYSERVICELOCKSTATUSW
];
1453 r
= talloc(talloc_tos(), struct svcctl_QueryServiceLockStatusW
);
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(svcctl_QueryServiceLockStatusW
, r
);
1480 ZERO_STRUCT(r
->out
);
1481 r
->out
.lock_status
= talloc_zero(r
, struct SERVICE_LOCK_STATUS
);
1482 if (r
->out
.lock_status
== NULL
) {
1487 r
->out
.needed
= talloc_zero(r
, uint32_t);
1488 if (r
->out
.needed
== NULL
) {
1493 r
->out
.result
= _svcctl_QueryServiceLockStatusW(p
, r
);
1495 if (p
->rng_fault_state
) {
1497 /* Return true here, srv_pipe_hnd.c will take care */
1501 if (DEBUGLEVEL
>= 10) {
1502 NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceLockStatusW
, r
);
1505 push
= ndr_push_init_ctx(r
, NULL
);
1511 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
1512 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1517 blob
= ndr_push_blob(push
);
1518 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
1528 static bool api_svcctl_StartServiceW(pipes_struct
*p
)
1530 const struct ndr_interface_call
*call
;
1531 struct ndr_pull
*pull
;
1532 struct ndr_push
*push
;
1533 enum ndr_err_code ndr_err
;
1535 struct svcctl_StartServiceW
*r
;
1537 call
= &ndr_table_svcctl
.calls
[NDR_SVCCTL_STARTSERVICEW
];
1539 r
= talloc(talloc_tos(), struct svcctl_StartServiceW
);
1544 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
1549 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
1555 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1556 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
1557 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1562 if (DEBUGLEVEL
>= 10) {
1563 NDR_PRINT_IN_DEBUG(svcctl_StartServiceW
, r
);
1566 r
->out
.result
= _svcctl_StartServiceW(p
, r
);
1568 if (p
->rng_fault_state
) {
1570 /* Return true here, srv_pipe_hnd.c will take care */
1574 if (DEBUGLEVEL
>= 10) {
1575 NDR_PRINT_OUT_DEBUG(svcctl_StartServiceW
, r
);
1578 push
= ndr_push_init_ctx(r
, NULL
);
1584 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
1585 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1590 blob
= ndr_push_blob(push
);
1591 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
1601 static bool api_svcctl_GetServiceDisplayNameW(pipes_struct
*p
)
1603 const struct ndr_interface_call
*call
;
1604 struct ndr_pull
*pull
;
1605 struct ndr_push
*push
;
1606 enum ndr_err_code ndr_err
;
1608 struct svcctl_GetServiceDisplayNameW
*r
;
1610 call
= &ndr_table_svcctl
.calls
[NDR_SVCCTL_GETSERVICEDISPLAYNAMEW
];
1612 r
= talloc(talloc_tos(), struct svcctl_GetServiceDisplayNameW
);
1617 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
1622 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
1628 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1629 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
1630 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1635 if (DEBUGLEVEL
>= 10) {
1636 NDR_PRINT_IN_DEBUG(svcctl_GetServiceDisplayNameW
, r
);
1639 ZERO_STRUCT(r
->out
);
1640 r
->out
.display_name_length
= r
->in
.display_name_length
;
1641 r
->out
.display_name
= talloc_zero(r
, const char *);
1642 if (r
->out
.display_name
== NULL
) {
1647 r
->out
.result
= _svcctl_GetServiceDisplayNameW(p
, r
);
1649 if (p
->rng_fault_state
) {
1651 /* Return true here, srv_pipe_hnd.c will take care */
1655 if (DEBUGLEVEL
>= 10) {
1656 NDR_PRINT_OUT_DEBUG(svcctl_GetServiceDisplayNameW
, r
);
1659 push
= ndr_push_init_ctx(r
, NULL
);
1665 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
1666 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1671 blob
= ndr_push_blob(push
);
1672 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
1682 static bool api_svcctl_GetServiceKeyNameW(pipes_struct
*p
)
1684 const struct ndr_interface_call
*call
;
1685 struct ndr_pull
*pull
;
1686 struct ndr_push
*push
;
1687 enum ndr_err_code ndr_err
;
1689 struct svcctl_GetServiceKeyNameW
*r
;
1691 call
= &ndr_table_svcctl
.calls
[NDR_SVCCTL_GETSERVICEKEYNAMEW
];
1693 r
= talloc(talloc_tos(), struct svcctl_GetServiceKeyNameW
);
1698 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
1703 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
1709 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1710 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
1711 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1716 if (DEBUGLEVEL
>= 10) {
1717 NDR_PRINT_IN_DEBUG(svcctl_GetServiceKeyNameW
, r
);
1720 ZERO_STRUCT(r
->out
);
1721 r
->out
.display_name_length
= r
->in
.display_name_length
;
1722 r
->out
.key_name
= talloc_zero(r
, const char *);
1723 if (r
->out
.key_name
== NULL
) {
1728 r
->out
.result
= _svcctl_GetServiceKeyNameW(p
, r
);
1730 if (p
->rng_fault_state
) {
1732 /* Return true here, srv_pipe_hnd.c will take care */
1736 if (DEBUGLEVEL
>= 10) {
1737 NDR_PRINT_OUT_DEBUG(svcctl_GetServiceKeyNameW
, r
);
1740 push
= ndr_push_init_ctx(r
, NULL
);
1746 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
1747 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1752 blob
= ndr_push_blob(push
);
1753 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
1763 static bool api_svcctl_SCSetServiceBitsA(pipes_struct
*p
)
1765 const struct ndr_interface_call
*call
;
1766 struct ndr_pull
*pull
;
1767 struct ndr_push
*push
;
1768 enum ndr_err_code ndr_err
;
1770 struct svcctl_SCSetServiceBitsA
*r
;
1772 call
= &ndr_table_svcctl
.calls
[NDR_SVCCTL_SCSETSERVICEBITSA
];
1774 r
= talloc(talloc_tos(), struct svcctl_SCSetServiceBitsA
);
1779 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
1784 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
1790 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1791 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
1792 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1797 if (DEBUGLEVEL
>= 10) {
1798 NDR_PRINT_IN_DEBUG(svcctl_SCSetServiceBitsA
, r
);
1801 r
->out
.result
= _svcctl_SCSetServiceBitsA(p
, r
);
1803 if (p
->rng_fault_state
) {
1805 /* Return true here, srv_pipe_hnd.c will take care */
1809 if (DEBUGLEVEL
>= 10) {
1810 NDR_PRINT_OUT_DEBUG(svcctl_SCSetServiceBitsA
, r
);
1813 push
= ndr_push_init_ctx(r
, NULL
);
1819 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
1820 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1825 blob
= ndr_push_blob(push
);
1826 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
1836 static bool api_svcctl_ChangeServiceConfigA(pipes_struct
*p
)
1838 const struct ndr_interface_call
*call
;
1839 struct ndr_pull
*pull
;
1840 struct ndr_push
*push
;
1841 enum ndr_err_code ndr_err
;
1843 struct svcctl_ChangeServiceConfigA
*r
;
1845 call
= &ndr_table_svcctl
.calls
[NDR_SVCCTL_CHANGESERVICECONFIGA
];
1847 r
= talloc(talloc_tos(), struct svcctl_ChangeServiceConfigA
);
1852 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
1857 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
1863 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1864 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
1865 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1870 if (DEBUGLEVEL
>= 10) {
1871 NDR_PRINT_IN_DEBUG(svcctl_ChangeServiceConfigA
, r
);
1874 ZERO_STRUCT(r
->out
);
1875 r
->out
.tag_id
= talloc_zero(r
, uint32_t);
1876 if (r
->out
.tag_id
== NULL
) {
1881 r
->out
.result
= _svcctl_ChangeServiceConfigA(p
, r
);
1883 if (p
->rng_fault_state
) {
1885 /* Return true here, srv_pipe_hnd.c will take care */
1889 if (DEBUGLEVEL
>= 10) {
1890 NDR_PRINT_OUT_DEBUG(svcctl_ChangeServiceConfigA
, r
);
1893 push
= ndr_push_init_ctx(r
, NULL
);
1899 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
1900 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1905 blob
= ndr_push_blob(push
);
1906 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
1916 static bool api_svcctl_CreateServiceA(pipes_struct
*p
)
1918 const struct ndr_interface_call
*call
;
1919 struct ndr_pull
*pull
;
1920 struct ndr_push
*push
;
1921 enum ndr_err_code ndr_err
;
1923 struct svcctl_CreateServiceA
*r
;
1925 call
= &ndr_table_svcctl
.calls
[NDR_SVCCTL_CREATESERVICEA
];
1927 r
= talloc(talloc_tos(), struct svcctl_CreateServiceA
);
1932 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
1937 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
1943 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1944 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
1945 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1950 if (DEBUGLEVEL
>= 10) {
1951 NDR_PRINT_IN_DEBUG(svcctl_CreateServiceA
, r
);
1954 ZERO_STRUCT(r
->out
);
1955 r
->out
.TagId
= talloc_zero(r
, uint32_t);
1956 if (r
->out
.TagId
== NULL
) {
1961 r
->out
.result
= _svcctl_CreateServiceA(p
, r
);
1963 if (p
->rng_fault_state
) {
1965 /* Return true here, srv_pipe_hnd.c will take care */
1969 if (DEBUGLEVEL
>= 10) {
1970 NDR_PRINT_OUT_DEBUG(svcctl_CreateServiceA
, r
);
1973 push
= ndr_push_init_ctx(r
, NULL
);
1979 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
1980 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1985 blob
= ndr_push_blob(push
);
1986 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
1996 static bool api_svcctl_EnumDependentServicesA(pipes_struct
*p
)
1998 const struct ndr_interface_call
*call
;
1999 struct ndr_pull
*pull
;
2000 struct ndr_push
*push
;
2001 enum ndr_err_code ndr_err
;
2003 struct svcctl_EnumDependentServicesA
*r
;
2005 call
= &ndr_table_svcctl
.calls
[NDR_SVCCTL_ENUMDEPENDENTSERVICESA
];
2007 r
= talloc(talloc_tos(), struct svcctl_EnumDependentServicesA
);
2012 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
2017 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
2023 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2024 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
2025 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2030 if (DEBUGLEVEL
>= 10) {
2031 NDR_PRINT_IN_DEBUG(svcctl_EnumDependentServicesA
, r
);
2034 ZERO_STRUCT(r
->out
);
2035 r
->out
.service_status
= talloc_zero(r
, struct ENUM_SERVICE_STATUSA
);
2036 if (r
->out
.service_status
== NULL
) {
2041 r
->out
.needed
= talloc_zero(r
, uint32_t);
2042 if (r
->out
.needed
== NULL
) {
2047 r
->out
.services_returned
= talloc_zero(r
, uint32_t);
2048 if (r
->out
.services_returned
== NULL
) {
2053 r
->out
.result
= _svcctl_EnumDependentServicesA(p
, r
);
2055 if (p
->rng_fault_state
) {
2057 /* Return true here, srv_pipe_hnd.c will take care */
2061 if (DEBUGLEVEL
>= 10) {
2062 NDR_PRINT_OUT_DEBUG(svcctl_EnumDependentServicesA
, r
);
2065 push
= ndr_push_init_ctx(r
, NULL
);
2071 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
2072 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2077 blob
= ndr_push_blob(push
);
2078 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
2088 static bool api_svcctl_EnumServicesStatusA(pipes_struct
*p
)
2090 const struct ndr_interface_call
*call
;
2091 struct ndr_pull
*pull
;
2092 struct ndr_push
*push
;
2093 enum ndr_err_code ndr_err
;
2095 struct svcctl_EnumServicesStatusA
*r
;
2097 call
= &ndr_table_svcctl
.calls
[NDR_SVCCTL_ENUMSERVICESSTATUSA
];
2099 r
= talloc(talloc_tos(), struct svcctl_EnumServicesStatusA
);
2104 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
2109 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
2115 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2116 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
2117 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2122 if (DEBUGLEVEL
>= 10) {
2123 NDR_PRINT_IN_DEBUG(svcctl_EnumServicesStatusA
, r
);
2126 ZERO_STRUCT(r
->out
);
2127 r
->out
.resume_handle
= r
->in
.resume_handle
;
2128 r
->out
.service
= talloc_zero_array(r
, uint8_t, r
->in
.offered
);
2129 if (r
->out
.service
== NULL
) {
2134 r
->out
.needed
= talloc_zero(r
, uint32_t);
2135 if (r
->out
.needed
== NULL
) {
2140 r
->out
.services_returned
= talloc_zero(r
, uint32_t);
2141 if (r
->out
.services_returned
== NULL
) {
2146 r
->out
.result
= _svcctl_EnumServicesStatusA(p
, r
);
2148 if (p
->rng_fault_state
) {
2150 /* Return true here, srv_pipe_hnd.c will take care */
2154 if (DEBUGLEVEL
>= 10) {
2155 NDR_PRINT_OUT_DEBUG(svcctl_EnumServicesStatusA
, r
);
2158 push
= ndr_push_init_ctx(r
, NULL
);
2164 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
2165 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2170 blob
= ndr_push_blob(push
);
2171 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
2181 static bool api_svcctl_OpenSCManagerA(pipes_struct
*p
)
2183 const struct ndr_interface_call
*call
;
2184 struct ndr_pull
*pull
;
2185 struct ndr_push
*push
;
2186 enum ndr_err_code ndr_err
;
2188 struct svcctl_OpenSCManagerA
*r
;
2190 call
= &ndr_table_svcctl
.calls
[NDR_SVCCTL_OPENSCMANAGERA
];
2192 r
= talloc(talloc_tos(), struct svcctl_OpenSCManagerA
);
2197 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
2202 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
2208 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2209 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
2210 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2215 if (DEBUGLEVEL
>= 10) {
2216 NDR_PRINT_IN_DEBUG(svcctl_OpenSCManagerA
, r
);
2219 ZERO_STRUCT(r
->out
);
2220 r
->out
.handle
= talloc_zero(r
, struct policy_handle
);
2221 if (r
->out
.handle
== NULL
) {
2226 r
->out
.result
= _svcctl_OpenSCManagerA(p
, r
);
2228 if (p
->rng_fault_state
) {
2230 /* Return true here, srv_pipe_hnd.c will take care */
2234 if (DEBUGLEVEL
>= 10) {
2235 NDR_PRINT_OUT_DEBUG(svcctl_OpenSCManagerA
, r
);
2238 push
= ndr_push_init_ctx(r
, NULL
);
2244 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
2245 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2250 blob
= ndr_push_blob(push
);
2251 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
2261 static bool api_svcctl_OpenServiceA(pipes_struct
*p
)
2263 const struct ndr_interface_call
*call
;
2264 struct ndr_pull
*pull
;
2265 struct ndr_push
*push
;
2266 enum ndr_err_code ndr_err
;
2268 struct svcctl_OpenServiceA
*r
;
2270 call
= &ndr_table_svcctl
.calls
[NDR_SVCCTL_OPENSERVICEA
];
2272 r
= talloc(talloc_tos(), struct svcctl_OpenServiceA
);
2277 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
2282 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
2288 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2289 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
2290 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2295 if (DEBUGLEVEL
>= 10) {
2296 NDR_PRINT_IN_DEBUG(svcctl_OpenServiceA
, r
);
2299 r
->out
.result
= _svcctl_OpenServiceA(p
, r
);
2301 if (p
->rng_fault_state
) {
2303 /* Return true here, srv_pipe_hnd.c will take care */
2307 if (DEBUGLEVEL
>= 10) {
2308 NDR_PRINT_OUT_DEBUG(svcctl_OpenServiceA
, r
);
2311 push
= ndr_push_init_ctx(r
, NULL
);
2317 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
2318 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2323 blob
= ndr_push_blob(push
);
2324 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
2334 static bool api_svcctl_QueryServiceConfigA(pipes_struct
*p
)
2336 const struct ndr_interface_call
*call
;
2337 struct ndr_pull
*pull
;
2338 struct ndr_push
*push
;
2339 enum ndr_err_code ndr_err
;
2341 struct svcctl_QueryServiceConfigA
*r
;
2343 call
= &ndr_table_svcctl
.calls
[NDR_SVCCTL_QUERYSERVICECONFIGA
];
2345 r
= talloc(talloc_tos(), struct svcctl_QueryServiceConfigA
);
2350 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
2355 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
2361 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2362 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
2363 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2368 if (DEBUGLEVEL
>= 10) {
2369 NDR_PRINT_IN_DEBUG(svcctl_QueryServiceConfigA
, r
);
2372 ZERO_STRUCT(r
->out
);
2373 r
->out
.query
= talloc_zero_array(r
, uint8_t, r
->in
.offered
);
2374 if (r
->out
.query
== NULL
) {
2379 r
->out
.needed
= talloc_zero(r
, uint32_t);
2380 if (r
->out
.needed
== NULL
) {
2385 r
->out
.result
= _svcctl_QueryServiceConfigA(p
, r
);
2387 if (p
->rng_fault_state
) {
2389 /* Return true here, srv_pipe_hnd.c will take care */
2393 if (DEBUGLEVEL
>= 10) {
2394 NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceConfigA
, r
);
2397 push
= ndr_push_init_ctx(r
, NULL
);
2403 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
2404 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2409 blob
= ndr_push_blob(push
);
2410 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
2420 static bool api_svcctl_QueryServiceLockStatusA(pipes_struct
*p
)
2422 const struct ndr_interface_call
*call
;
2423 struct ndr_pull
*pull
;
2424 struct ndr_push
*push
;
2425 enum ndr_err_code ndr_err
;
2427 struct svcctl_QueryServiceLockStatusA
*r
;
2429 call
= &ndr_table_svcctl
.calls
[NDR_SVCCTL_QUERYSERVICELOCKSTATUSA
];
2431 r
= talloc(talloc_tos(), struct svcctl_QueryServiceLockStatusA
);
2436 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
2441 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
2447 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2448 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
2449 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2454 if (DEBUGLEVEL
>= 10) {
2455 NDR_PRINT_IN_DEBUG(svcctl_QueryServiceLockStatusA
, r
);
2458 ZERO_STRUCT(r
->out
);
2459 r
->out
.lock_status
= talloc_zero(r
, struct SERVICE_LOCK_STATUS
);
2460 if (r
->out
.lock_status
== NULL
) {
2465 r
->out
.needed
= talloc_zero(r
, uint32_t);
2466 if (r
->out
.needed
== NULL
) {
2471 r
->out
.result
= _svcctl_QueryServiceLockStatusA(p
, r
);
2473 if (p
->rng_fault_state
) {
2475 /* Return true here, srv_pipe_hnd.c will take care */
2479 if (DEBUGLEVEL
>= 10) {
2480 NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceLockStatusA
, r
);
2483 push
= ndr_push_init_ctx(r
, NULL
);
2489 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
2490 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2495 blob
= ndr_push_blob(push
);
2496 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
2506 static bool api_svcctl_StartServiceA(pipes_struct
*p
)
2508 const struct ndr_interface_call
*call
;
2509 struct ndr_pull
*pull
;
2510 struct ndr_push
*push
;
2511 enum ndr_err_code ndr_err
;
2513 struct svcctl_StartServiceA
*r
;
2515 call
= &ndr_table_svcctl
.calls
[NDR_SVCCTL_STARTSERVICEA
];
2517 r
= talloc(talloc_tos(), struct svcctl_StartServiceA
);
2522 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
2527 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
2533 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2534 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
2535 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2540 if (DEBUGLEVEL
>= 10) {
2541 NDR_PRINT_IN_DEBUG(svcctl_StartServiceA
, r
);
2544 r
->out
.result
= _svcctl_StartServiceA(p
, r
);
2546 if (p
->rng_fault_state
) {
2548 /* Return true here, srv_pipe_hnd.c will take care */
2552 if (DEBUGLEVEL
>= 10) {
2553 NDR_PRINT_OUT_DEBUG(svcctl_StartServiceA
, r
);
2556 push
= ndr_push_init_ctx(r
, NULL
);
2562 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
2563 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2568 blob
= ndr_push_blob(push
);
2569 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
2579 static bool api_svcctl_GetServiceDisplayNameA(pipes_struct
*p
)
2581 const struct ndr_interface_call
*call
;
2582 struct ndr_pull
*pull
;
2583 struct ndr_push
*push
;
2584 enum ndr_err_code ndr_err
;
2586 struct svcctl_GetServiceDisplayNameA
*r
;
2588 call
= &ndr_table_svcctl
.calls
[NDR_SVCCTL_GETSERVICEDISPLAYNAMEA
];
2590 r
= talloc(talloc_tos(), struct svcctl_GetServiceDisplayNameA
);
2595 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
2600 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
2606 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2607 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
2608 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2613 if (DEBUGLEVEL
>= 10) {
2614 NDR_PRINT_IN_DEBUG(svcctl_GetServiceDisplayNameA
, r
);
2617 ZERO_STRUCT(r
->out
);
2618 r
->out
.display_name_length
= r
->in
.display_name_length
;
2619 r
->out
.display_name
= talloc_zero(r
, const char *);
2620 if (r
->out
.display_name
== NULL
) {
2625 r
->out
.result
= _svcctl_GetServiceDisplayNameA(p
, r
);
2627 if (p
->rng_fault_state
) {
2629 /* Return true here, srv_pipe_hnd.c will take care */
2633 if (DEBUGLEVEL
>= 10) {
2634 NDR_PRINT_OUT_DEBUG(svcctl_GetServiceDisplayNameA
, r
);
2637 push
= ndr_push_init_ctx(r
, NULL
);
2643 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
2644 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2649 blob
= ndr_push_blob(push
);
2650 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
2660 static bool api_svcctl_GetServiceKeyNameA(pipes_struct
*p
)
2662 const struct ndr_interface_call
*call
;
2663 struct ndr_pull
*pull
;
2664 struct ndr_push
*push
;
2665 enum ndr_err_code ndr_err
;
2667 struct svcctl_GetServiceKeyNameA
*r
;
2669 call
= &ndr_table_svcctl
.calls
[NDR_SVCCTL_GETSERVICEKEYNAMEA
];
2671 r
= talloc(talloc_tos(), struct svcctl_GetServiceKeyNameA
);
2676 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
2681 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
2687 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2688 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
2689 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2694 if (DEBUGLEVEL
>= 10) {
2695 NDR_PRINT_IN_DEBUG(svcctl_GetServiceKeyNameA
, r
);
2698 ZERO_STRUCT(r
->out
);
2699 r
->out
.display_name_length
= r
->in
.display_name_length
;
2700 r
->out
.key_name
= talloc_zero(r
, const char *);
2701 if (r
->out
.key_name
== NULL
) {
2706 r
->out
.result
= _svcctl_GetServiceKeyNameA(p
, r
);
2708 if (p
->rng_fault_state
) {
2710 /* Return true here, srv_pipe_hnd.c will take care */
2714 if (DEBUGLEVEL
>= 10) {
2715 NDR_PRINT_OUT_DEBUG(svcctl_GetServiceKeyNameA
, r
);
2718 push
= ndr_push_init_ctx(r
, NULL
);
2724 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
2725 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2730 blob
= ndr_push_blob(push
);
2731 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
2741 static bool api_svcctl_GetCurrentGroupeStateW(pipes_struct
*p
)
2743 const struct ndr_interface_call
*call
;
2744 struct ndr_pull
*pull
;
2745 struct ndr_push
*push
;
2746 enum ndr_err_code ndr_err
;
2748 struct svcctl_GetCurrentGroupeStateW
*r
;
2750 call
= &ndr_table_svcctl
.calls
[NDR_SVCCTL_GETCURRENTGROUPESTATEW
];
2752 r
= talloc(talloc_tos(), struct svcctl_GetCurrentGroupeStateW
);
2757 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
2762 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
2768 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2769 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
2770 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2775 if (DEBUGLEVEL
>= 10) {
2776 NDR_PRINT_IN_DEBUG(svcctl_GetCurrentGroupeStateW
, r
);
2779 r
->out
.result
= _svcctl_GetCurrentGroupeStateW(p
, r
);
2781 if (p
->rng_fault_state
) {
2783 /* Return true here, srv_pipe_hnd.c will take care */
2787 if (DEBUGLEVEL
>= 10) {
2788 NDR_PRINT_OUT_DEBUG(svcctl_GetCurrentGroupeStateW
, r
);
2791 push
= ndr_push_init_ctx(r
, NULL
);
2797 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
2798 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2803 blob
= ndr_push_blob(push
);
2804 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
2814 static bool api_svcctl_EnumServiceGroupW(pipes_struct
*p
)
2816 const struct ndr_interface_call
*call
;
2817 struct ndr_pull
*pull
;
2818 struct ndr_push
*push
;
2819 enum ndr_err_code ndr_err
;
2821 struct svcctl_EnumServiceGroupW
*r
;
2823 call
= &ndr_table_svcctl
.calls
[NDR_SVCCTL_ENUMSERVICEGROUPW
];
2825 r
= talloc(talloc_tos(), struct svcctl_EnumServiceGroupW
);
2830 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
2835 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
2841 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2842 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
2843 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2848 if (DEBUGLEVEL
>= 10) {
2849 NDR_PRINT_IN_DEBUG(svcctl_EnumServiceGroupW
, r
);
2852 r
->out
.result
= _svcctl_EnumServiceGroupW(p
, r
);
2854 if (p
->rng_fault_state
) {
2856 /* Return true here, srv_pipe_hnd.c will take care */
2860 if (DEBUGLEVEL
>= 10) {
2861 NDR_PRINT_OUT_DEBUG(svcctl_EnumServiceGroupW
, r
);
2864 push
= ndr_push_init_ctx(r
, NULL
);
2870 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
2871 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2876 blob
= ndr_push_blob(push
);
2877 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
2887 static bool api_svcctl_ChangeServiceConfig2A(pipes_struct
*p
)
2889 const struct ndr_interface_call
*call
;
2890 struct ndr_pull
*pull
;
2891 struct ndr_push
*push
;
2892 enum ndr_err_code ndr_err
;
2894 struct svcctl_ChangeServiceConfig2A
*r
;
2896 call
= &ndr_table_svcctl
.calls
[NDR_SVCCTL_CHANGESERVICECONFIG2A
];
2898 r
= talloc(talloc_tos(), struct svcctl_ChangeServiceConfig2A
);
2903 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
2908 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
2914 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2915 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
2916 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2921 if (DEBUGLEVEL
>= 10) {
2922 NDR_PRINT_IN_DEBUG(svcctl_ChangeServiceConfig2A
, r
);
2925 r
->out
.result
= _svcctl_ChangeServiceConfig2A(p
, r
);
2927 if (p
->rng_fault_state
) {
2929 /* Return true here, srv_pipe_hnd.c will take care */
2933 if (DEBUGLEVEL
>= 10) {
2934 NDR_PRINT_OUT_DEBUG(svcctl_ChangeServiceConfig2A
, r
);
2937 push
= ndr_push_init_ctx(r
, NULL
);
2943 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
2944 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2949 blob
= ndr_push_blob(push
);
2950 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
2960 static bool api_svcctl_ChangeServiceConfig2W(pipes_struct
*p
)
2962 const struct ndr_interface_call
*call
;
2963 struct ndr_pull
*pull
;
2964 struct ndr_push
*push
;
2965 enum ndr_err_code ndr_err
;
2967 struct svcctl_ChangeServiceConfig2W
*r
;
2969 call
= &ndr_table_svcctl
.calls
[NDR_SVCCTL_CHANGESERVICECONFIG2W
];
2971 r
= talloc(talloc_tos(), struct svcctl_ChangeServiceConfig2W
);
2976 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
2981 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
2987 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2988 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
2989 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2994 if (DEBUGLEVEL
>= 10) {
2995 NDR_PRINT_IN_DEBUG(svcctl_ChangeServiceConfig2W
, r
);
2998 r
->out
.result
= _svcctl_ChangeServiceConfig2W(p
, r
);
3000 if (p
->rng_fault_state
) {
3002 /* Return true here, srv_pipe_hnd.c will take care */
3006 if (DEBUGLEVEL
>= 10) {
3007 NDR_PRINT_OUT_DEBUG(svcctl_ChangeServiceConfig2W
, r
);
3010 push
= ndr_push_init_ctx(r
, NULL
);
3016 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
3017 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3022 blob
= ndr_push_blob(push
);
3023 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
3033 static bool api_svcctl_QueryServiceConfig2A(pipes_struct
*p
)
3035 const struct ndr_interface_call
*call
;
3036 struct ndr_pull
*pull
;
3037 struct ndr_push
*push
;
3038 enum ndr_err_code ndr_err
;
3040 struct svcctl_QueryServiceConfig2A
*r
;
3042 call
= &ndr_table_svcctl
.calls
[NDR_SVCCTL_QUERYSERVICECONFIG2A
];
3044 r
= talloc(talloc_tos(), struct svcctl_QueryServiceConfig2A
);
3049 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
3054 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
3060 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
3061 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
3062 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3067 if (DEBUGLEVEL
>= 10) {
3068 NDR_PRINT_IN_DEBUG(svcctl_QueryServiceConfig2A
, r
);
3071 ZERO_STRUCT(r
->out
);
3072 r
->out
.buffer
= talloc_zero_array(r
, uint8_t, r
->in
.offered
);
3073 if (r
->out
.buffer
== NULL
) {
3078 r
->out
.needed
= talloc_zero(r
, uint32_t);
3079 if (r
->out
.needed
== NULL
) {
3084 r
->out
.result
= _svcctl_QueryServiceConfig2A(p
, r
);
3086 if (p
->rng_fault_state
) {
3088 /* Return true here, srv_pipe_hnd.c will take care */
3092 if (DEBUGLEVEL
>= 10) {
3093 NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceConfig2A
, r
);
3096 push
= ndr_push_init_ctx(r
, NULL
);
3102 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
3103 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3108 blob
= ndr_push_blob(push
);
3109 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
3119 static bool api_svcctl_QueryServiceConfig2W(pipes_struct
*p
)
3121 const struct ndr_interface_call
*call
;
3122 struct ndr_pull
*pull
;
3123 struct ndr_push
*push
;
3124 enum ndr_err_code ndr_err
;
3126 struct svcctl_QueryServiceConfig2W
*r
;
3128 call
= &ndr_table_svcctl
.calls
[NDR_SVCCTL_QUERYSERVICECONFIG2W
];
3130 r
= talloc(talloc_tos(), struct svcctl_QueryServiceConfig2W
);
3135 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
3140 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
3146 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
3147 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
3148 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3153 if (DEBUGLEVEL
>= 10) {
3154 NDR_PRINT_IN_DEBUG(svcctl_QueryServiceConfig2W
, r
);
3157 ZERO_STRUCT(r
->out
);
3158 r
->out
.buffer
= talloc_zero_array(r
, uint8_t, r
->in
.offered
);
3159 if (r
->out
.buffer
== NULL
) {
3164 r
->out
.needed
= talloc_zero(r
, uint32_t);
3165 if (r
->out
.needed
== NULL
) {
3170 r
->out
.result
= _svcctl_QueryServiceConfig2W(p
, r
);
3172 if (p
->rng_fault_state
) {
3174 /* Return true here, srv_pipe_hnd.c will take care */
3178 if (DEBUGLEVEL
>= 10) {
3179 NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceConfig2W
, r
);
3182 push
= ndr_push_init_ctx(r
, NULL
);
3188 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
3189 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3194 blob
= ndr_push_blob(push
);
3195 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
3205 static bool api_svcctl_QueryServiceStatusEx(pipes_struct
*p
)
3207 const struct ndr_interface_call
*call
;
3208 struct ndr_pull
*pull
;
3209 struct ndr_push
*push
;
3210 enum ndr_err_code ndr_err
;
3212 struct svcctl_QueryServiceStatusEx
*r
;
3214 call
= &ndr_table_svcctl
.calls
[NDR_SVCCTL_QUERYSERVICESTATUSEX
];
3216 r
= talloc(talloc_tos(), struct svcctl_QueryServiceStatusEx
);
3221 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
3226 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
3232 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
3233 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
3234 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3239 if (DEBUGLEVEL
>= 10) {
3240 NDR_PRINT_IN_DEBUG(svcctl_QueryServiceStatusEx
, r
);
3243 ZERO_STRUCT(r
->out
);
3244 r
->out
.buffer
= talloc_zero_array(r
, uint8_t, r
->in
.offered
);
3245 if (r
->out
.buffer
== NULL
) {
3250 r
->out
.needed
= talloc_zero(r
, uint32_t);
3251 if (r
->out
.needed
== NULL
) {
3256 r
->out
.result
= _svcctl_QueryServiceStatusEx(p
, r
);
3258 if (p
->rng_fault_state
) {
3260 /* Return true here, srv_pipe_hnd.c will take care */
3264 if (DEBUGLEVEL
>= 10) {
3265 NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceStatusEx
, r
);
3268 push
= ndr_push_init_ctx(r
, NULL
);
3274 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
3275 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3280 blob
= ndr_push_blob(push
);
3281 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
3291 static bool api_EnumServicesStatusExA(pipes_struct
*p
)
3293 const struct ndr_interface_call
*call
;
3294 struct ndr_pull
*pull
;
3295 struct ndr_push
*push
;
3296 enum ndr_err_code ndr_err
;
3298 struct EnumServicesStatusExA
*r
;
3300 call
= &ndr_table_svcctl
.calls
[NDR_ENUMSERVICESSTATUSEXA
];
3302 r
= talloc(talloc_tos(), struct EnumServicesStatusExA
);
3307 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
3312 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
3318 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
3319 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
3320 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3325 if (DEBUGLEVEL
>= 10) {
3326 NDR_PRINT_IN_DEBUG(EnumServicesStatusExA
, r
);
3329 ZERO_STRUCT(r
->out
);
3330 r
->out
.resume_handle
= r
->in
.resume_handle
;
3331 r
->out
.services
= talloc_zero_array(r
, uint8_t, r
->in
.offered
);
3332 if (r
->out
.services
== NULL
) {
3337 r
->out
.needed
= talloc_zero(r
, uint32_t);
3338 if (r
->out
.needed
== NULL
) {
3343 r
->out
.service_returned
= talloc_zero(r
, uint32_t);
3344 if (r
->out
.service_returned
== NULL
) {
3349 r
->out
.group_name
= talloc_zero(r
, const char *);
3350 if (r
->out
.group_name
== NULL
) {
3355 r
->out
.result
= _EnumServicesStatusExA(p
, r
);
3357 if (p
->rng_fault_state
) {
3359 /* Return true here, srv_pipe_hnd.c will take care */
3363 if (DEBUGLEVEL
>= 10) {
3364 NDR_PRINT_OUT_DEBUG(EnumServicesStatusExA
, r
);
3367 push
= ndr_push_init_ctx(r
, NULL
);
3373 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
3374 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3379 blob
= ndr_push_blob(push
);
3380 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
3390 static bool api_EnumServicesStatusExW(pipes_struct
*p
)
3392 const struct ndr_interface_call
*call
;
3393 struct ndr_pull
*pull
;
3394 struct ndr_push
*push
;
3395 enum ndr_err_code ndr_err
;
3397 struct EnumServicesStatusExW
*r
;
3399 call
= &ndr_table_svcctl
.calls
[NDR_ENUMSERVICESSTATUSEXW
];
3401 r
= talloc(talloc_tos(), struct EnumServicesStatusExW
);
3406 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
3411 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
3417 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
3418 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
3419 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3424 if (DEBUGLEVEL
>= 10) {
3425 NDR_PRINT_IN_DEBUG(EnumServicesStatusExW
, r
);
3428 ZERO_STRUCT(r
->out
);
3429 r
->out
.resume_handle
= r
->in
.resume_handle
;
3430 r
->out
.services
= talloc_zero_array(r
, uint8_t, r
->in
.offered
);
3431 if (r
->out
.services
== NULL
) {
3436 r
->out
.needed
= talloc_zero(r
, uint32_t);
3437 if (r
->out
.needed
== NULL
) {
3442 r
->out
.service_returned
= talloc_zero(r
, uint32_t);
3443 if (r
->out
.service_returned
== NULL
) {
3448 r
->out
.result
= _EnumServicesStatusExW(p
, r
);
3450 if (p
->rng_fault_state
) {
3452 /* Return true here, srv_pipe_hnd.c will take care */
3456 if (DEBUGLEVEL
>= 10) {
3457 NDR_PRINT_OUT_DEBUG(EnumServicesStatusExW
, r
);
3460 push
= ndr_push_init_ctx(r
, NULL
);
3466 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
3467 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3472 blob
= ndr_push_blob(push
);
3473 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
3483 static bool api_svcctl_SCSendTSMessage(pipes_struct
*p
)
3485 const struct ndr_interface_call
*call
;
3486 struct ndr_pull
*pull
;
3487 struct ndr_push
*push
;
3488 enum ndr_err_code ndr_err
;
3490 struct svcctl_SCSendTSMessage
*r
;
3492 call
= &ndr_table_svcctl
.calls
[NDR_SVCCTL_SCSENDTSMESSAGE
];
3494 r
= talloc(talloc_tos(), struct svcctl_SCSendTSMessage
);
3499 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
3504 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
3510 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
3511 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
3512 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3517 if (DEBUGLEVEL
>= 10) {
3518 NDR_PRINT_IN_DEBUG(svcctl_SCSendTSMessage
, r
);
3521 r
->out
.result
= _svcctl_SCSendTSMessage(p
, r
);
3523 if (p
->rng_fault_state
) {
3525 /* Return true here, srv_pipe_hnd.c will take care */
3529 if (DEBUGLEVEL
>= 10) {
3530 NDR_PRINT_OUT_DEBUG(svcctl_SCSendTSMessage
, r
);
3533 push
= ndr_push_init_ctx(r
, NULL
);
3539 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
3540 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3545 blob
= ndr_push_blob(push
);
3546 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
3558 static struct api_struct api_svcctl_cmds
[] =
3560 {"SVCCTL_CLOSESERVICEHANDLE", NDR_SVCCTL_CLOSESERVICEHANDLE
, api_svcctl_CloseServiceHandle
},
3561 {"SVCCTL_CONTROLSERVICE", NDR_SVCCTL_CONTROLSERVICE
, api_svcctl_ControlService
},
3562 {"SVCCTL_DELETESERVICE", NDR_SVCCTL_DELETESERVICE
, api_svcctl_DeleteService
},
3563 {"SVCCTL_LOCKSERVICEDATABASE", NDR_SVCCTL_LOCKSERVICEDATABASE
, api_svcctl_LockServiceDatabase
},
3564 {"SVCCTL_QUERYSERVICEOBJECTSECURITY", NDR_SVCCTL_QUERYSERVICEOBJECTSECURITY
, api_svcctl_QueryServiceObjectSecurity
},
3565 {"SVCCTL_SETSERVICEOBJECTSECURITY", NDR_SVCCTL_SETSERVICEOBJECTSECURITY
, api_svcctl_SetServiceObjectSecurity
},
3566 {"SVCCTL_QUERYSERVICESTATUS", NDR_SVCCTL_QUERYSERVICESTATUS
, api_svcctl_QueryServiceStatus
},
3567 {"SVCCTL_SETSERVICESTATUS", NDR_SVCCTL_SETSERVICESTATUS
, api_svcctl_SetServiceStatus
},
3568 {"SVCCTL_UNLOCKSERVICEDATABASE", NDR_SVCCTL_UNLOCKSERVICEDATABASE
, api_svcctl_UnlockServiceDatabase
},
3569 {"SVCCTL_NOTIFYBOOTCONFIGSTATUS", NDR_SVCCTL_NOTIFYBOOTCONFIGSTATUS
, api_svcctl_NotifyBootConfigStatus
},
3570 {"SVCCTL_SCSETSERVICEBITSW", NDR_SVCCTL_SCSETSERVICEBITSW
, api_svcctl_SCSetServiceBitsW
},
3571 {"SVCCTL_CHANGESERVICECONFIGW", NDR_SVCCTL_CHANGESERVICECONFIGW
, api_svcctl_ChangeServiceConfigW
},
3572 {"SVCCTL_CREATESERVICEW", NDR_SVCCTL_CREATESERVICEW
, api_svcctl_CreateServiceW
},
3573 {"SVCCTL_ENUMDEPENDENTSERVICESW", NDR_SVCCTL_ENUMDEPENDENTSERVICESW
, api_svcctl_EnumDependentServicesW
},
3574 {"SVCCTL_ENUMSERVICESSTATUSW", NDR_SVCCTL_ENUMSERVICESSTATUSW
, api_svcctl_EnumServicesStatusW
},
3575 {"SVCCTL_OPENSCMANAGERW", NDR_SVCCTL_OPENSCMANAGERW
, api_svcctl_OpenSCManagerW
},
3576 {"SVCCTL_OPENSERVICEW", NDR_SVCCTL_OPENSERVICEW
, api_svcctl_OpenServiceW
},
3577 {"SVCCTL_QUERYSERVICECONFIGW", NDR_SVCCTL_QUERYSERVICECONFIGW
, api_svcctl_QueryServiceConfigW
},
3578 {"SVCCTL_QUERYSERVICELOCKSTATUSW", NDR_SVCCTL_QUERYSERVICELOCKSTATUSW
, api_svcctl_QueryServiceLockStatusW
},
3579 {"SVCCTL_STARTSERVICEW", NDR_SVCCTL_STARTSERVICEW
, api_svcctl_StartServiceW
},
3580 {"SVCCTL_GETSERVICEDISPLAYNAMEW", NDR_SVCCTL_GETSERVICEDISPLAYNAMEW
, api_svcctl_GetServiceDisplayNameW
},
3581 {"SVCCTL_GETSERVICEKEYNAMEW", NDR_SVCCTL_GETSERVICEKEYNAMEW
, api_svcctl_GetServiceKeyNameW
},
3582 {"SVCCTL_SCSETSERVICEBITSA", NDR_SVCCTL_SCSETSERVICEBITSA
, api_svcctl_SCSetServiceBitsA
},
3583 {"SVCCTL_CHANGESERVICECONFIGA", NDR_SVCCTL_CHANGESERVICECONFIGA
, api_svcctl_ChangeServiceConfigA
},
3584 {"SVCCTL_CREATESERVICEA", NDR_SVCCTL_CREATESERVICEA
, api_svcctl_CreateServiceA
},
3585 {"SVCCTL_ENUMDEPENDENTSERVICESA", NDR_SVCCTL_ENUMDEPENDENTSERVICESA
, api_svcctl_EnumDependentServicesA
},
3586 {"SVCCTL_ENUMSERVICESSTATUSA", NDR_SVCCTL_ENUMSERVICESSTATUSA
, api_svcctl_EnumServicesStatusA
},
3587 {"SVCCTL_OPENSCMANAGERA", NDR_SVCCTL_OPENSCMANAGERA
, api_svcctl_OpenSCManagerA
},
3588 {"SVCCTL_OPENSERVICEA", NDR_SVCCTL_OPENSERVICEA
, api_svcctl_OpenServiceA
},
3589 {"SVCCTL_QUERYSERVICECONFIGA", NDR_SVCCTL_QUERYSERVICECONFIGA
, api_svcctl_QueryServiceConfigA
},
3590 {"SVCCTL_QUERYSERVICELOCKSTATUSA", NDR_SVCCTL_QUERYSERVICELOCKSTATUSA
, api_svcctl_QueryServiceLockStatusA
},
3591 {"SVCCTL_STARTSERVICEA", NDR_SVCCTL_STARTSERVICEA
, api_svcctl_StartServiceA
},
3592 {"SVCCTL_GETSERVICEDISPLAYNAMEA", NDR_SVCCTL_GETSERVICEDISPLAYNAMEA
, api_svcctl_GetServiceDisplayNameA
},
3593 {"SVCCTL_GETSERVICEKEYNAMEA", NDR_SVCCTL_GETSERVICEKEYNAMEA
, api_svcctl_GetServiceKeyNameA
},
3594 {"SVCCTL_GETCURRENTGROUPESTATEW", NDR_SVCCTL_GETCURRENTGROUPESTATEW
, api_svcctl_GetCurrentGroupeStateW
},
3595 {"SVCCTL_ENUMSERVICEGROUPW", NDR_SVCCTL_ENUMSERVICEGROUPW
, api_svcctl_EnumServiceGroupW
},
3596 {"SVCCTL_CHANGESERVICECONFIG2A", NDR_SVCCTL_CHANGESERVICECONFIG2A
, api_svcctl_ChangeServiceConfig2A
},
3597 {"SVCCTL_CHANGESERVICECONFIG2W", NDR_SVCCTL_CHANGESERVICECONFIG2W
, api_svcctl_ChangeServiceConfig2W
},
3598 {"SVCCTL_QUERYSERVICECONFIG2A", NDR_SVCCTL_QUERYSERVICECONFIG2A
, api_svcctl_QueryServiceConfig2A
},
3599 {"SVCCTL_QUERYSERVICECONFIG2W", NDR_SVCCTL_QUERYSERVICECONFIG2W
, api_svcctl_QueryServiceConfig2W
},
3600 {"SVCCTL_QUERYSERVICESTATUSEX", NDR_SVCCTL_QUERYSERVICESTATUSEX
, api_svcctl_QueryServiceStatusEx
},
3601 {"ENUMSERVICESSTATUSEXA", NDR_ENUMSERVICESSTATUSEXA
, api_EnumServicesStatusExA
},
3602 {"ENUMSERVICESSTATUSEXW", NDR_ENUMSERVICESSTATUSEXW
, api_EnumServicesStatusExW
},
3603 {"SVCCTL_SCSENDTSMESSAGE", NDR_SVCCTL_SCSENDTSMESSAGE
, api_svcctl_SCSendTSMessage
},
3606 void svcctl_get_pipe_fns(struct api_struct
**fns
, int *n_fns
)
3608 *fns
= api_svcctl_cmds
;
3609 *n_fns
= sizeof(api_svcctl_cmds
) / sizeof(struct api_struct
);
3612 NTSTATUS
rpc_svcctl_dispatch(struct rpc_pipe_client
*cli
, TALLOC_CTX
*mem_ctx
, const struct ndr_interface_table
*table
, uint32_t opnum
, void *_r
)
3614 if (cli
->pipes_struct
== NULL
) {
3615 return NT_STATUS_INVALID_PARAMETER
;
3620 case NDR_SVCCTL_CLOSESERVICEHANDLE
: {
3621 struct svcctl_CloseServiceHandle
*r
= (struct svcctl_CloseServiceHandle
*)_r
;
3622 ZERO_STRUCT(r
->out
);
3623 r
->out
.handle
= r
->in
.handle
;
3624 r
->out
.result
= _svcctl_CloseServiceHandle(cli
->pipes_struct
, r
);
3625 return NT_STATUS_OK
;
3628 case NDR_SVCCTL_CONTROLSERVICE
: {
3629 struct svcctl_ControlService
*r
= (struct svcctl_ControlService
*)_r
;
3630 ZERO_STRUCT(r
->out
);
3631 r
->out
.service_status
= talloc_zero(mem_ctx
, struct SERVICE_STATUS
);
3632 if (r
->out
.service_status
== NULL
) {
3633 return NT_STATUS_NO_MEMORY
;
3636 r
->out
.result
= _svcctl_ControlService(cli
->pipes_struct
, r
);
3637 return NT_STATUS_OK
;
3640 case NDR_SVCCTL_DELETESERVICE
: {
3641 struct svcctl_DeleteService
*r
= (struct svcctl_DeleteService
*)_r
;
3642 r
->out
.result
= _svcctl_DeleteService(cli
->pipes_struct
, r
);
3643 return NT_STATUS_OK
;
3646 case NDR_SVCCTL_LOCKSERVICEDATABASE
: {
3647 struct svcctl_LockServiceDatabase
*r
= (struct svcctl_LockServiceDatabase
*)_r
;
3648 ZERO_STRUCT(r
->out
);
3649 r
->out
.lock
= talloc_zero(mem_ctx
, struct policy_handle
);
3650 if (r
->out
.lock
== NULL
) {
3651 return NT_STATUS_NO_MEMORY
;
3654 r
->out
.result
= _svcctl_LockServiceDatabase(cli
->pipes_struct
, r
);
3655 return NT_STATUS_OK
;
3658 case NDR_SVCCTL_QUERYSERVICEOBJECTSECURITY
: {
3659 struct svcctl_QueryServiceObjectSecurity
*r
= (struct svcctl_QueryServiceObjectSecurity
*)_r
;
3660 ZERO_STRUCT(r
->out
);
3661 r
->out
.buffer
= talloc_zero_array(mem_ctx
, uint8_t, r
->in
.offered
);
3662 if (r
->out
.buffer
== NULL
) {
3663 return NT_STATUS_NO_MEMORY
;
3666 r
->out
.needed
= talloc_zero(mem_ctx
, uint32_t);
3667 if (r
->out
.needed
== NULL
) {
3668 return NT_STATUS_NO_MEMORY
;
3671 r
->out
.result
= _svcctl_QueryServiceObjectSecurity(cli
->pipes_struct
, r
);
3672 return NT_STATUS_OK
;
3675 case NDR_SVCCTL_SETSERVICEOBJECTSECURITY
: {
3676 struct svcctl_SetServiceObjectSecurity
*r
= (struct svcctl_SetServiceObjectSecurity
*)_r
;
3677 r
->out
.result
= _svcctl_SetServiceObjectSecurity(cli
->pipes_struct
, r
);
3678 return NT_STATUS_OK
;
3681 case NDR_SVCCTL_QUERYSERVICESTATUS
: {
3682 struct svcctl_QueryServiceStatus
*r
= (struct svcctl_QueryServiceStatus
*)_r
;
3683 ZERO_STRUCT(r
->out
);
3684 r
->out
.service_status
= talloc_zero(mem_ctx
, struct SERVICE_STATUS
);
3685 if (r
->out
.service_status
== NULL
) {
3686 return NT_STATUS_NO_MEMORY
;
3689 r
->out
.result
= _svcctl_QueryServiceStatus(cli
->pipes_struct
, r
);
3690 return NT_STATUS_OK
;
3693 case NDR_SVCCTL_SETSERVICESTATUS
: {
3694 struct svcctl_SetServiceStatus
*r
= (struct svcctl_SetServiceStatus
*)_r
;
3695 r
->out
.result
= _svcctl_SetServiceStatus(cli
->pipes_struct
, r
);
3696 return NT_STATUS_OK
;
3699 case NDR_SVCCTL_UNLOCKSERVICEDATABASE
: {
3700 struct svcctl_UnlockServiceDatabase
*r
= (struct svcctl_UnlockServiceDatabase
*)_r
;
3701 ZERO_STRUCT(r
->out
);
3702 r
->out
.lock
= r
->in
.lock
;
3703 r
->out
.result
= _svcctl_UnlockServiceDatabase(cli
->pipes_struct
, r
);
3704 return NT_STATUS_OK
;
3707 case NDR_SVCCTL_NOTIFYBOOTCONFIGSTATUS
: {
3708 struct svcctl_NotifyBootConfigStatus
*r
= (struct svcctl_NotifyBootConfigStatus
*)_r
;
3709 r
->out
.result
= _svcctl_NotifyBootConfigStatus(cli
->pipes_struct
, r
);
3710 return NT_STATUS_OK
;
3713 case NDR_SVCCTL_SCSETSERVICEBITSW
: {
3714 struct svcctl_SCSetServiceBitsW
*r
= (struct svcctl_SCSetServiceBitsW
*)_r
;
3715 r
->out
.result
= _svcctl_SCSetServiceBitsW(cli
->pipes_struct
, r
);
3716 return NT_STATUS_OK
;
3719 case NDR_SVCCTL_CHANGESERVICECONFIGW
: {
3720 struct svcctl_ChangeServiceConfigW
*r
= (struct svcctl_ChangeServiceConfigW
*)_r
;
3721 ZERO_STRUCT(r
->out
);
3722 r
->out
.tag_id
= talloc_zero(mem_ctx
, uint32_t);
3723 if (r
->out
.tag_id
== NULL
) {
3724 return NT_STATUS_NO_MEMORY
;
3727 r
->out
.result
= _svcctl_ChangeServiceConfigW(cli
->pipes_struct
, r
);
3728 return NT_STATUS_OK
;
3731 case NDR_SVCCTL_CREATESERVICEW
: {
3732 struct svcctl_CreateServiceW
*r
= (struct svcctl_CreateServiceW
*)_r
;
3733 ZERO_STRUCT(r
->out
);
3734 r
->out
.TagId
= r
->in
.TagId
;
3735 r
->out
.handle
= talloc_zero(mem_ctx
, struct policy_handle
);
3736 if (r
->out
.handle
== NULL
) {
3737 return NT_STATUS_NO_MEMORY
;
3740 r
->out
.result
= _svcctl_CreateServiceW(cli
->pipes_struct
, r
);
3741 return NT_STATUS_OK
;
3744 case NDR_SVCCTL_ENUMDEPENDENTSERVICESW
: {
3745 struct svcctl_EnumDependentServicesW
*r
= (struct svcctl_EnumDependentServicesW
*)_r
;
3746 ZERO_STRUCT(r
->out
);
3747 r
->out
.service_status
= talloc_zero_array(mem_ctx
, uint8_t, r
->in
.offered
);
3748 if (r
->out
.service_status
== NULL
) {
3749 return NT_STATUS_NO_MEMORY
;
3752 r
->out
.needed
= talloc_zero(mem_ctx
, uint32_t);
3753 if (r
->out
.needed
== NULL
) {
3754 return NT_STATUS_NO_MEMORY
;
3757 r
->out
.services_returned
= talloc_zero(mem_ctx
, uint32_t);
3758 if (r
->out
.services_returned
== NULL
) {
3759 return NT_STATUS_NO_MEMORY
;
3762 r
->out
.result
= _svcctl_EnumDependentServicesW(cli
->pipes_struct
, r
);
3763 return NT_STATUS_OK
;
3766 case NDR_SVCCTL_ENUMSERVICESSTATUSW
: {
3767 struct svcctl_EnumServicesStatusW
*r
= (struct svcctl_EnumServicesStatusW
*)_r
;
3768 ZERO_STRUCT(r
->out
);
3769 r
->out
.resume_handle
= r
->in
.resume_handle
;
3770 r
->out
.service
= talloc_zero_array(mem_ctx
, uint8_t, r
->in
.offered
);
3771 if (r
->out
.service
== NULL
) {
3772 return NT_STATUS_NO_MEMORY
;
3775 r
->out
.needed
= talloc_zero(mem_ctx
, uint32_t);
3776 if (r
->out
.needed
== NULL
) {
3777 return NT_STATUS_NO_MEMORY
;
3780 r
->out
.services_returned
= talloc_zero(mem_ctx
, uint32_t);
3781 if (r
->out
.services_returned
== NULL
) {
3782 return NT_STATUS_NO_MEMORY
;
3785 r
->out
.result
= _svcctl_EnumServicesStatusW(cli
->pipes_struct
, r
);
3786 return NT_STATUS_OK
;
3789 case NDR_SVCCTL_OPENSCMANAGERW
: {
3790 struct svcctl_OpenSCManagerW
*r
= (struct svcctl_OpenSCManagerW
*)_r
;
3791 ZERO_STRUCT(r
->out
);
3792 r
->out
.handle
= talloc_zero(mem_ctx
, struct policy_handle
);
3793 if (r
->out
.handle
== NULL
) {
3794 return NT_STATUS_NO_MEMORY
;
3797 r
->out
.result
= _svcctl_OpenSCManagerW(cli
->pipes_struct
, r
);
3798 return NT_STATUS_OK
;
3801 case NDR_SVCCTL_OPENSERVICEW
: {
3802 struct svcctl_OpenServiceW
*r
= (struct svcctl_OpenServiceW
*)_r
;
3803 ZERO_STRUCT(r
->out
);
3804 r
->out
.handle
= talloc_zero(mem_ctx
, struct policy_handle
);
3805 if (r
->out
.handle
== NULL
) {
3806 return NT_STATUS_NO_MEMORY
;
3809 r
->out
.result
= _svcctl_OpenServiceW(cli
->pipes_struct
, r
);
3810 return NT_STATUS_OK
;
3813 case NDR_SVCCTL_QUERYSERVICECONFIGW
: {
3814 struct svcctl_QueryServiceConfigW
*r
= (struct svcctl_QueryServiceConfigW
*)_r
;
3815 ZERO_STRUCT(r
->out
);
3816 r
->out
.query
= talloc_zero(mem_ctx
, struct QUERY_SERVICE_CONFIG
);
3817 if (r
->out
.query
== NULL
) {
3818 return NT_STATUS_NO_MEMORY
;
3821 r
->out
.needed
= talloc_zero(mem_ctx
, uint32_t);
3822 if (r
->out
.needed
== NULL
) {
3823 return NT_STATUS_NO_MEMORY
;
3826 r
->out
.result
= _svcctl_QueryServiceConfigW(cli
->pipes_struct
, r
);
3827 return NT_STATUS_OK
;
3830 case NDR_SVCCTL_QUERYSERVICELOCKSTATUSW
: {
3831 struct svcctl_QueryServiceLockStatusW
*r
= (struct svcctl_QueryServiceLockStatusW
*)_r
;
3832 ZERO_STRUCT(r
->out
);
3833 r
->out
.lock_status
= talloc_zero(mem_ctx
, struct SERVICE_LOCK_STATUS
);
3834 if (r
->out
.lock_status
== NULL
) {
3835 return NT_STATUS_NO_MEMORY
;
3838 r
->out
.needed
= talloc_zero(mem_ctx
, uint32_t);
3839 if (r
->out
.needed
== NULL
) {
3840 return NT_STATUS_NO_MEMORY
;
3843 r
->out
.result
= _svcctl_QueryServiceLockStatusW(cli
->pipes_struct
, r
);
3844 return NT_STATUS_OK
;
3847 case NDR_SVCCTL_STARTSERVICEW
: {
3848 struct svcctl_StartServiceW
*r
= (struct svcctl_StartServiceW
*)_r
;
3849 r
->out
.result
= _svcctl_StartServiceW(cli
->pipes_struct
, r
);
3850 return NT_STATUS_OK
;
3853 case NDR_SVCCTL_GETSERVICEDISPLAYNAMEW
: {
3854 struct svcctl_GetServiceDisplayNameW
*r
= (struct svcctl_GetServiceDisplayNameW
*)_r
;
3855 ZERO_STRUCT(r
->out
);
3856 r
->out
.display_name_length
= r
->in
.display_name_length
;
3857 r
->out
.display_name
= talloc_zero(mem_ctx
, const char *);
3858 if (r
->out
.display_name
== NULL
) {
3859 return NT_STATUS_NO_MEMORY
;
3862 r
->out
.result
= _svcctl_GetServiceDisplayNameW(cli
->pipes_struct
, r
);
3863 return NT_STATUS_OK
;
3866 case NDR_SVCCTL_GETSERVICEKEYNAMEW
: {
3867 struct svcctl_GetServiceKeyNameW
*r
= (struct svcctl_GetServiceKeyNameW
*)_r
;
3868 ZERO_STRUCT(r
->out
);
3869 r
->out
.display_name_length
= r
->in
.display_name_length
;
3870 r
->out
.key_name
= talloc_zero(mem_ctx
, const char *);
3871 if (r
->out
.key_name
== NULL
) {
3872 return NT_STATUS_NO_MEMORY
;
3875 r
->out
.result
= _svcctl_GetServiceKeyNameW(cli
->pipes_struct
, r
);
3876 return NT_STATUS_OK
;
3879 case NDR_SVCCTL_SCSETSERVICEBITSA
: {
3880 struct svcctl_SCSetServiceBitsA
*r
= (struct svcctl_SCSetServiceBitsA
*)_r
;
3881 r
->out
.result
= _svcctl_SCSetServiceBitsA(cli
->pipes_struct
, r
);
3882 return NT_STATUS_OK
;
3885 case NDR_SVCCTL_CHANGESERVICECONFIGA
: {
3886 struct svcctl_ChangeServiceConfigA
*r
= (struct svcctl_ChangeServiceConfigA
*)_r
;
3887 ZERO_STRUCT(r
->out
);
3888 r
->out
.tag_id
= talloc_zero(mem_ctx
, uint32_t);
3889 if (r
->out
.tag_id
== NULL
) {
3890 return NT_STATUS_NO_MEMORY
;
3893 r
->out
.result
= _svcctl_ChangeServiceConfigA(cli
->pipes_struct
, r
);
3894 return NT_STATUS_OK
;
3897 case NDR_SVCCTL_CREATESERVICEA
: {
3898 struct svcctl_CreateServiceA
*r
= (struct svcctl_CreateServiceA
*)_r
;
3899 ZERO_STRUCT(r
->out
);
3900 r
->out
.TagId
= talloc_zero(mem_ctx
, uint32_t);
3901 if (r
->out
.TagId
== NULL
) {
3902 return NT_STATUS_NO_MEMORY
;
3905 r
->out
.result
= _svcctl_CreateServiceA(cli
->pipes_struct
, r
);
3906 return NT_STATUS_OK
;
3909 case NDR_SVCCTL_ENUMDEPENDENTSERVICESA
: {
3910 struct svcctl_EnumDependentServicesA
*r
= (struct svcctl_EnumDependentServicesA
*)_r
;
3911 ZERO_STRUCT(r
->out
);
3912 r
->out
.service_status
= talloc_zero(mem_ctx
, struct ENUM_SERVICE_STATUSA
);
3913 if (r
->out
.service_status
== NULL
) {
3914 return NT_STATUS_NO_MEMORY
;
3917 r
->out
.needed
= talloc_zero(mem_ctx
, uint32_t);
3918 if (r
->out
.needed
== NULL
) {
3919 return NT_STATUS_NO_MEMORY
;
3922 r
->out
.services_returned
= talloc_zero(mem_ctx
, uint32_t);
3923 if (r
->out
.services_returned
== NULL
) {
3924 return NT_STATUS_NO_MEMORY
;
3927 r
->out
.result
= _svcctl_EnumDependentServicesA(cli
->pipes_struct
, r
);
3928 return NT_STATUS_OK
;
3931 case NDR_SVCCTL_ENUMSERVICESSTATUSA
: {
3932 struct svcctl_EnumServicesStatusA
*r
= (struct svcctl_EnumServicesStatusA
*)_r
;
3933 ZERO_STRUCT(r
->out
);
3934 r
->out
.resume_handle
= r
->in
.resume_handle
;
3935 r
->out
.service
= talloc_zero_array(mem_ctx
, uint8_t, r
->in
.offered
);
3936 if (r
->out
.service
== NULL
) {
3937 return NT_STATUS_NO_MEMORY
;
3940 r
->out
.needed
= talloc_zero(mem_ctx
, uint32_t);
3941 if (r
->out
.needed
== NULL
) {
3942 return NT_STATUS_NO_MEMORY
;
3945 r
->out
.services_returned
= talloc_zero(mem_ctx
, uint32_t);
3946 if (r
->out
.services_returned
== NULL
) {
3947 return NT_STATUS_NO_MEMORY
;
3950 r
->out
.result
= _svcctl_EnumServicesStatusA(cli
->pipes_struct
, r
);
3951 return NT_STATUS_OK
;
3954 case NDR_SVCCTL_OPENSCMANAGERA
: {
3955 struct svcctl_OpenSCManagerA
*r
= (struct svcctl_OpenSCManagerA
*)_r
;
3956 ZERO_STRUCT(r
->out
);
3957 r
->out
.handle
= talloc_zero(mem_ctx
, struct policy_handle
);
3958 if (r
->out
.handle
== NULL
) {
3959 return NT_STATUS_NO_MEMORY
;
3962 r
->out
.result
= _svcctl_OpenSCManagerA(cli
->pipes_struct
, r
);
3963 return NT_STATUS_OK
;
3966 case NDR_SVCCTL_OPENSERVICEA
: {
3967 struct svcctl_OpenServiceA
*r
= (struct svcctl_OpenServiceA
*)_r
;
3968 r
->out
.result
= _svcctl_OpenServiceA(cli
->pipes_struct
, r
);
3969 return NT_STATUS_OK
;
3972 case NDR_SVCCTL_QUERYSERVICECONFIGA
: {
3973 struct svcctl_QueryServiceConfigA
*r
= (struct svcctl_QueryServiceConfigA
*)_r
;
3974 ZERO_STRUCT(r
->out
);
3975 r
->out
.query
= talloc_zero_array(mem_ctx
, uint8_t, r
->in
.offered
);
3976 if (r
->out
.query
== NULL
) {
3977 return NT_STATUS_NO_MEMORY
;
3980 r
->out
.needed
= talloc_zero(mem_ctx
, uint32_t);
3981 if (r
->out
.needed
== NULL
) {
3982 return NT_STATUS_NO_MEMORY
;
3985 r
->out
.result
= _svcctl_QueryServiceConfigA(cli
->pipes_struct
, r
);
3986 return NT_STATUS_OK
;
3989 case NDR_SVCCTL_QUERYSERVICELOCKSTATUSA
: {
3990 struct svcctl_QueryServiceLockStatusA
*r
= (struct svcctl_QueryServiceLockStatusA
*)_r
;
3991 ZERO_STRUCT(r
->out
);
3992 r
->out
.lock_status
= talloc_zero(mem_ctx
, struct SERVICE_LOCK_STATUS
);
3993 if (r
->out
.lock_status
== NULL
) {
3994 return NT_STATUS_NO_MEMORY
;
3997 r
->out
.needed
= talloc_zero(mem_ctx
, uint32_t);
3998 if (r
->out
.needed
== NULL
) {
3999 return NT_STATUS_NO_MEMORY
;
4002 r
->out
.result
= _svcctl_QueryServiceLockStatusA(cli
->pipes_struct
, r
);
4003 return NT_STATUS_OK
;
4006 case NDR_SVCCTL_STARTSERVICEA
: {
4007 struct svcctl_StartServiceA
*r
= (struct svcctl_StartServiceA
*)_r
;
4008 r
->out
.result
= _svcctl_StartServiceA(cli
->pipes_struct
, r
);
4009 return NT_STATUS_OK
;
4012 case NDR_SVCCTL_GETSERVICEDISPLAYNAMEA
: {
4013 struct svcctl_GetServiceDisplayNameA
*r
= (struct svcctl_GetServiceDisplayNameA
*)_r
;
4014 ZERO_STRUCT(r
->out
);
4015 r
->out
.display_name_length
= r
->in
.display_name_length
;
4016 r
->out
.display_name
= talloc_zero(mem_ctx
, const char *);
4017 if (r
->out
.display_name
== NULL
) {
4018 return NT_STATUS_NO_MEMORY
;
4021 r
->out
.result
= _svcctl_GetServiceDisplayNameA(cli
->pipes_struct
, r
);
4022 return NT_STATUS_OK
;
4025 case NDR_SVCCTL_GETSERVICEKEYNAMEA
: {
4026 struct svcctl_GetServiceKeyNameA
*r
= (struct svcctl_GetServiceKeyNameA
*)_r
;
4027 ZERO_STRUCT(r
->out
);
4028 r
->out
.display_name_length
= r
->in
.display_name_length
;
4029 r
->out
.key_name
= talloc_zero(mem_ctx
, const char *);
4030 if (r
->out
.key_name
== NULL
) {
4031 return NT_STATUS_NO_MEMORY
;
4034 r
->out
.result
= _svcctl_GetServiceKeyNameA(cli
->pipes_struct
, r
);
4035 return NT_STATUS_OK
;
4038 case NDR_SVCCTL_GETCURRENTGROUPESTATEW
: {
4039 struct svcctl_GetCurrentGroupeStateW
*r
= (struct svcctl_GetCurrentGroupeStateW
*)_r
;
4040 r
->out
.result
= _svcctl_GetCurrentGroupeStateW(cli
->pipes_struct
, r
);
4041 return NT_STATUS_OK
;
4044 case NDR_SVCCTL_ENUMSERVICEGROUPW
: {
4045 struct svcctl_EnumServiceGroupW
*r
= (struct svcctl_EnumServiceGroupW
*)_r
;
4046 r
->out
.result
= _svcctl_EnumServiceGroupW(cli
->pipes_struct
, r
);
4047 return NT_STATUS_OK
;
4050 case NDR_SVCCTL_CHANGESERVICECONFIG2A
: {
4051 struct svcctl_ChangeServiceConfig2A
*r
= (struct svcctl_ChangeServiceConfig2A
*)_r
;
4052 r
->out
.result
= _svcctl_ChangeServiceConfig2A(cli
->pipes_struct
, r
);
4053 return NT_STATUS_OK
;
4056 case NDR_SVCCTL_CHANGESERVICECONFIG2W
: {
4057 struct svcctl_ChangeServiceConfig2W
*r
= (struct svcctl_ChangeServiceConfig2W
*)_r
;
4058 r
->out
.result
= _svcctl_ChangeServiceConfig2W(cli
->pipes_struct
, r
);
4059 return NT_STATUS_OK
;
4062 case NDR_SVCCTL_QUERYSERVICECONFIG2A
: {
4063 struct svcctl_QueryServiceConfig2A
*r
= (struct svcctl_QueryServiceConfig2A
*)_r
;
4064 ZERO_STRUCT(r
->out
);
4065 r
->out
.buffer
= talloc_zero_array(mem_ctx
, uint8_t, r
->in
.offered
);
4066 if (r
->out
.buffer
== NULL
) {
4067 return NT_STATUS_NO_MEMORY
;
4070 r
->out
.needed
= talloc_zero(mem_ctx
, uint32_t);
4071 if (r
->out
.needed
== NULL
) {
4072 return NT_STATUS_NO_MEMORY
;
4075 r
->out
.result
= _svcctl_QueryServiceConfig2A(cli
->pipes_struct
, r
);
4076 return NT_STATUS_OK
;
4079 case NDR_SVCCTL_QUERYSERVICECONFIG2W
: {
4080 struct svcctl_QueryServiceConfig2W
*r
= (struct svcctl_QueryServiceConfig2W
*)_r
;
4081 ZERO_STRUCT(r
->out
);
4082 r
->out
.buffer
= talloc_zero_array(mem_ctx
, uint8_t, r
->in
.offered
);
4083 if (r
->out
.buffer
== NULL
) {
4084 return NT_STATUS_NO_MEMORY
;
4087 r
->out
.needed
= talloc_zero(mem_ctx
, uint32_t);
4088 if (r
->out
.needed
== NULL
) {
4089 return NT_STATUS_NO_MEMORY
;
4092 r
->out
.result
= _svcctl_QueryServiceConfig2W(cli
->pipes_struct
, r
);
4093 return NT_STATUS_OK
;
4096 case NDR_SVCCTL_QUERYSERVICESTATUSEX
: {
4097 struct svcctl_QueryServiceStatusEx
*r
= (struct svcctl_QueryServiceStatusEx
*)_r
;
4098 ZERO_STRUCT(r
->out
);
4099 r
->out
.buffer
= talloc_zero_array(mem_ctx
, uint8_t, r
->in
.offered
);
4100 if (r
->out
.buffer
== NULL
) {
4101 return NT_STATUS_NO_MEMORY
;
4104 r
->out
.needed
= talloc_zero(mem_ctx
, uint32_t);
4105 if (r
->out
.needed
== NULL
) {
4106 return NT_STATUS_NO_MEMORY
;
4109 r
->out
.result
= _svcctl_QueryServiceStatusEx(cli
->pipes_struct
, r
);
4110 return NT_STATUS_OK
;
4113 case NDR_ENUMSERVICESSTATUSEXA
: {
4114 struct EnumServicesStatusExA
*r
= (struct EnumServicesStatusExA
*)_r
;
4115 ZERO_STRUCT(r
->out
);
4116 r
->out
.resume_handle
= r
->in
.resume_handle
;
4117 r
->out
.services
= talloc_zero_array(mem_ctx
, uint8_t, r
->in
.offered
);
4118 if (r
->out
.services
== NULL
) {
4119 return NT_STATUS_NO_MEMORY
;
4122 r
->out
.needed
= talloc_zero(mem_ctx
, uint32_t);
4123 if (r
->out
.needed
== NULL
) {
4124 return NT_STATUS_NO_MEMORY
;
4127 r
->out
.service_returned
= talloc_zero(mem_ctx
, uint32_t);
4128 if (r
->out
.service_returned
== NULL
) {
4129 return NT_STATUS_NO_MEMORY
;
4132 r
->out
.group_name
= talloc_zero(mem_ctx
, const char *);
4133 if (r
->out
.group_name
== NULL
) {
4134 return NT_STATUS_NO_MEMORY
;
4137 r
->out
.result
= _EnumServicesStatusExA(cli
->pipes_struct
, r
);
4138 return NT_STATUS_OK
;
4141 case NDR_ENUMSERVICESSTATUSEXW
: {
4142 struct EnumServicesStatusExW
*r
= (struct EnumServicesStatusExW
*)_r
;
4143 ZERO_STRUCT(r
->out
);
4144 r
->out
.resume_handle
= r
->in
.resume_handle
;
4145 r
->out
.services
= talloc_zero_array(mem_ctx
, uint8_t, r
->in
.offered
);
4146 if (r
->out
.services
== NULL
) {
4147 return NT_STATUS_NO_MEMORY
;
4150 r
->out
.needed
= talloc_zero(mem_ctx
, uint32_t);
4151 if (r
->out
.needed
== NULL
) {
4152 return NT_STATUS_NO_MEMORY
;
4155 r
->out
.service_returned
= talloc_zero(mem_ctx
, uint32_t);
4156 if (r
->out
.service_returned
== NULL
) {
4157 return NT_STATUS_NO_MEMORY
;
4160 r
->out
.result
= _EnumServicesStatusExW(cli
->pipes_struct
, r
);
4161 return NT_STATUS_OK
;
4164 case NDR_SVCCTL_SCSENDTSMESSAGE
: {
4165 struct svcctl_SCSendTSMessage
*r
= (struct svcctl_SCSendTSMessage
*)_r
;
4166 r
->out
.result
= _svcctl_SCSendTSMessage(cli
->pipes_struct
, r
);
4167 return NT_STATUS_OK
;
4171 return NT_STATUS_NOT_IMPLEMENTED
;
4175 NTSTATUS
rpc_svcctl_init(void)
4177 return rpc_srv_register(SMB_RPC_INTERFACE_VERSION
, "svcctl", "svcctl", &ndr_table_svcctl
, api_svcctl_cmds
, sizeof(api_svcctl_cmds
) / sizeof(struct api_struct
));