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 struct ndr_pull
*pull
;
12 struct ndr_push
*push
;
15 struct svcctl_CloseServiceHandle r
;
16 TALLOC_CTX
*mem_ctx
= talloc_init("api_svcctl_CloseServiceHandle");
18 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
23 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
29 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
30 status
= ndr_pull_svcctl_CloseServiceHandle(pull
, NDR_IN
, &r
);
31 if (NT_STATUS_IS_ERR(status
)) {
37 NDR_PRINT_IN_DEBUG(svcctl_CloseServiceHandle
, &r
);
40 r
.out
.handle
= r
.in
.handle
;
41 r
.out
.result
= _svcctl_CloseServiceHandle(p
, &r
);
43 if (p
->rng_fault_state
) {
45 /* Return True here, srv_pipe_hnd.c will take care */
50 NDR_PRINT_OUT_DEBUG(svcctl_CloseServiceHandle
, &r
);
52 push
= ndr_push_init_ctx(mem_ctx
);
58 status
= ndr_push_svcctl_CloseServiceHandle(push
, NDR_OUT
, &r
);
59 if (NT_STATUS_IS_ERR(status
)) {
64 blob
= ndr_push_blob(push
);
65 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32
)blob
.length
)) {
75 static BOOL
api_svcctl_ControlService(pipes_struct
*p
)
77 struct ndr_pull
*pull
;
78 struct ndr_push
*push
;
81 struct svcctl_ControlService r
;
82 TALLOC_CTX
*mem_ctx
= talloc_init("api_svcctl_ControlService");
84 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
89 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
95 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
96 status
= ndr_pull_svcctl_ControlService(pull
, NDR_IN
, &r
);
97 if (NT_STATUS_IS_ERR(status
)) {
102 if (DEBUGLEVEL
>= 10)
103 NDR_PRINT_IN_DEBUG(svcctl_ControlService
, &r
);
106 r
.out
.service_status
= talloc_zero(mem_ctx
, struct SERVICE_STATUS
);
107 if (r
.out
.service_status
== NULL
) {
108 talloc_free(mem_ctx
);
112 r
.out
.result
= _svcctl_ControlService(p
, &r
);
114 if (p
->rng_fault_state
) {
115 talloc_free(mem_ctx
);
116 /* Return True here, srv_pipe_hnd.c will take care */
120 if (DEBUGLEVEL
>= 10)
121 NDR_PRINT_OUT_DEBUG(svcctl_ControlService
, &r
);
123 push
= ndr_push_init_ctx(mem_ctx
);
125 talloc_free(mem_ctx
);
129 status
= ndr_push_svcctl_ControlService(push
, NDR_OUT
, &r
);
130 if (NT_STATUS_IS_ERR(status
)) {
131 talloc_free(mem_ctx
);
135 blob
= ndr_push_blob(push
);
136 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32
)blob
.length
)) {
137 talloc_free(mem_ctx
);
141 talloc_free(mem_ctx
);
146 static BOOL
api_svcctl_DeleteService(pipes_struct
*p
)
148 struct ndr_pull
*pull
;
149 struct ndr_push
*push
;
152 struct svcctl_DeleteService r
;
153 TALLOC_CTX
*mem_ctx
= talloc_init("api_svcctl_DeleteService");
155 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
156 talloc_free(mem_ctx
);
160 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
162 talloc_free(mem_ctx
);
166 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
167 status
= ndr_pull_svcctl_DeleteService(pull
, NDR_IN
, &r
);
168 if (NT_STATUS_IS_ERR(status
)) {
169 talloc_free(mem_ctx
);
173 if (DEBUGLEVEL
>= 10)
174 NDR_PRINT_IN_DEBUG(svcctl_DeleteService
, &r
);
176 r
.out
.result
= _svcctl_DeleteService(p
, &r
);
178 if (p
->rng_fault_state
) {
179 talloc_free(mem_ctx
);
180 /* Return True here, srv_pipe_hnd.c will take care */
184 if (DEBUGLEVEL
>= 10)
185 NDR_PRINT_OUT_DEBUG(svcctl_DeleteService
, &r
);
187 push
= ndr_push_init_ctx(mem_ctx
);
189 talloc_free(mem_ctx
);
193 status
= ndr_push_svcctl_DeleteService(push
, NDR_OUT
, &r
);
194 if (NT_STATUS_IS_ERR(status
)) {
195 talloc_free(mem_ctx
);
199 blob
= ndr_push_blob(push
);
200 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32
)blob
.length
)) {
201 talloc_free(mem_ctx
);
205 talloc_free(mem_ctx
);
210 static BOOL
api_svcctl_LockServiceDatabase(pipes_struct
*p
)
212 struct ndr_pull
*pull
;
213 struct ndr_push
*push
;
216 struct svcctl_LockServiceDatabase r
;
217 TALLOC_CTX
*mem_ctx
= talloc_init("api_svcctl_LockServiceDatabase");
219 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
220 talloc_free(mem_ctx
);
224 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
226 talloc_free(mem_ctx
);
230 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
231 status
= ndr_pull_svcctl_LockServiceDatabase(pull
, NDR_IN
, &r
);
232 if (NT_STATUS_IS_ERR(status
)) {
233 talloc_free(mem_ctx
);
237 if (DEBUGLEVEL
>= 10)
238 NDR_PRINT_IN_DEBUG(svcctl_LockServiceDatabase
, &r
);
241 r
.out
.lock
= talloc_zero(mem_ctx
, struct policy_handle
);
242 if (r
.out
.lock
== NULL
) {
243 talloc_free(mem_ctx
);
247 r
.out
.result
= _svcctl_LockServiceDatabase(p
, &r
);
249 if (p
->rng_fault_state
) {
250 talloc_free(mem_ctx
);
251 /* Return True here, srv_pipe_hnd.c will take care */
255 if (DEBUGLEVEL
>= 10)
256 NDR_PRINT_OUT_DEBUG(svcctl_LockServiceDatabase
, &r
);
258 push
= ndr_push_init_ctx(mem_ctx
);
260 talloc_free(mem_ctx
);
264 status
= ndr_push_svcctl_LockServiceDatabase(push
, NDR_OUT
, &r
);
265 if (NT_STATUS_IS_ERR(status
)) {
266 talloc_free(mem_ctx
);
270 blob
= ndr_push_blob(push
);
271 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32
)blob
.length
)) {
272 talloc_free(mem_ctx
);
276 talloc_free(mem_ctx
);
281 static BOOL
api_svcctl_QueryServiceObjectSecurity(pipes_struct
*p
)
283 struct ndr_pull
*pull
;
284 struct ndr_push
*push
;
287 struct svcctl_QueryServiceObjectSecurity r
;
288 TALLOC_CTX
*mem_ctx
= talloc_init("api_svcctl_QueryServiceObjectSecurity");
290 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
291 talloc_free(mem_ctx
);
295 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
297 talloc_free(mem_ctx
);
301 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
302 status
= ndr_pull_svcctl_QueryServiceObjectSecurity(pull
, NDR_IN
, &r
);
303 if (NT_STATUS_IS_ERR(status
)) {
304 talloc_free(mem_ctx
);
308 if (DEBUGLEVEL
>= 10)
309 NDR_PRINT_IN_DEBUG(svcctl_QueryServiceObjectSecurity
, &r
);
311 r
.out
.result
= _svcctl_QueryServiceObjectSecurity(p
, &r
);
313 if (p
->rng_fault_state
) {
314 talloc_free(mem_ctx
);
315 /* Return True here, srv_pipe_hnd.c will take care */
319 if (DEBUGLEVEL
>= 10)
320 NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceObjectSecurity
, &r
);
322 push
= ndr_push_init_ctx(mem_ctx
);
324 talloc_free(mem_ctx
);
328 status
= ndr_push_svcctl_QueryServiceObjectSecurity(push
, NDR_OUT
, &r
);
329 if (NT_STATUS_IS_ERR(status
)) {
330 talloc_free(mem_ctx
);
334 blob
= ndr_push_blob(push
);
335 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32
)blob
.length
)) {
336 talloc_free(mem_ctx
);
340 talloc_free(mem_ctx
);
345 static BOOL
api_svcctl_SetServiceObjectSecurity(pipes_struct
*p
)
347 struct ndr_pull
*pull
;
348 struct ndr_push
*push
;
351 struct svcctl_SetServiceObjectSecurity r
;
352 TALLOC_CTX
*mem_ctx
= talloc_init("api_svcctl_SetServiceObjectSecurity");
354 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
355 talloc_free(mem_ctx
);
359 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
361 talloc_free(mem_ctx
);
365 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
366 status
= ndr_pull_svcctl_SetServiceObjectSecurity(pull
, NDR_IN
, &r
);
367 if (NT_STATUS_IS_ERR(status
)) {
368 talloc_free(mem_ctx
);
372 if (DEBUGLEVEL
>= 10)
373 NDR_PRINT_IN_DEBUG(svcctl_SetServiceObjectSecurity
, &r
);
375 r
.out
.result
= _svcctl_SetServiceObjectSecurity(p
, &r
);
377 if (p
->rng_fault_state
) {
378 talloc_free(mem_ctx
);
379 /* Return True here, srv_pipe_hnd.c will take care */
383 if (DEBUGLEVEL
>= 10)
384 NDR_PRINT_OUT_DEBUG(svcctl_SetServiceObjectSecurity
, &r
);
386 push
= ndr_push_init_ctx(mem_ctx
);
388 talloc_free(mem_ctx
);
392 status
= ndr_push_svcctl_SetServiceObjectSecurity(push
, NDR_OUT
, &r
);
393 if (NT_STATUS_IS_ERR(status
)) {
394 talloc_free(mem_ctx
);
398 blob
= ndr_push_blob(push
);
399 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32
)blob
.length
)) {
400 talloc_free(mem_ctx
);
404 talloc_free(mem_ctx
);
409 static BOOL
api_svcctl_QueryServiceStatus(pipes_struct
*p
)
411 struct ndr_pull
*pull
;
412 struct ndr_push
*push
;
415 struct svcctl_QueryServiceStatus r
;
416 TALLOC_CTX
*mem_ctx
= talloc_init("api_svcctl_QueryServiceStatus");
418 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
419 talloc_free(mem_ctx
);
423 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
425 talloc_free(mem_ctx
);
429 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
430 status
= ndr_pull_svcctl_QueryServiceStatus(pull
, NDR_IN
, &r
);
431 if (NT_STATUS_IS_ERR(status
)) {
432 talloc_free(mem_ctx
);
436 if (DEBUGLEVEL
>= 10)
437 NDR_PRINT_IN_DEBUG(svcctl_QueryServiceStatus
, &r
);
440 r
.out
.service_status
= talloc_zero(mem_ctx
, struct SERVICE_STATUS
);
441 if (r
.out
.service_status
== NULL
) {
442 talloc_free(mem_ctx
);
446 r
.out
.result
= _svcctl_QueryServiceStatus(p
, &r
);
448 if (p
->rng_fault_state
) {
449 talloc_free(mem_ctx
);
450 /* Return True here, srv_pipe_hnd.c will take care */
454 if (DEBUGLEVEL
>= 10)
455 NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceStatus
, &r
);
457 push
= ndr_push_init_ctx(mem_ctx
);
459 talloc_free(mem_ctx
);
463 status
= ndr_push_svcctl_QueryServiceStatus(push
, NDR_OUT
, &r
);
464 if (NT_STATUS_IS_ERR(status
)) {
465 talloc_free(mem_ctx
);
469 blob
= ndr_push_blob(push
);
470 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32
)blob
.length
)) {
471 talloc_free(mem_ctx
);
475 talloc_free(mem_ctx
);
480 static BOOL
api_svcctl_SetServiceStatus(pipes_struct
*p
)
482 struct ndr_pull
*pull
;
483 struct ndr_push
*push
;
486 struct svcctl_SetServiceStatus r
;
487 TALLOC_CTX
*mem_ctx
= talloc_init("api_svcctl_SetServiceStatus");
489 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
490 talloc_free(mem_ctx
);
494 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
496 talloc_free(mem_ctx
);
500 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
501 status
= ndr_pull_svcctl_SetServiceStatus(pull
, NDR_IN
, &r
);
502 if (NT_STATUS_IS_ERR(status
)) {
503 talloc_free(mem_ctx
);
507 if (DEBUGLEVEL
>= 10)
508 NDR_PRINT_IN_DEBUG(svcctl_SetServiceStatus
, &r
);
510 r
.out
.result
= _svcctl_SetServiceStatus(p
, &r
);
512 if (p
->rng_fault_state
) {
513 talloc_free(mem_ctx
);
514 /* Return True here, srv_pipe_hnd.c will take care */
518 if (DEBUGLEVEL
>= 10)
519 NDR_PRINT_OUT_DEBUG(svcctl_SetServiceStatus
, &r
);
521 push
= ndr_push_init_ctx(mem_ctx
);
523 talloc_free(mem_ctx
);
527 status
= ndr_push_svcctl_SetServiceStatus(push
, NDR_OUT
, &r
);
528 if (NT_STATUS_IS_ERR(status
)) {
529 talloc_free(mem_ctx
);
533 blob
= ndr_push_blob(push
);
534 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32
)blob
.length
)) {
535 talloc_free(mem_ctx
);
539 talloc_free(mem_ctx
);
544 static BOOL
api_svcctl_UnlockServiceDatabase(pipes_struct
*p
)
546 struct ndr_pull
*pull
;
547 struct ndr_push
*push
;
550 struct svcctl_UnlockServiceDatabase r
;
551 TALLOC_CTX
*mem_ctx
= talloc_init("api_svcctl_UnlockServiceDatabase");
553 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
554 talloc_free(mem_ctx
);
558 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
560 talloc_free(mem_ctx
);
564 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
565 status
= ndr_pull_svcctl_UnlockServiceDatabase(pull
, NDR_IN
, &r
);
566 if (NT_STATUS_IS_ERR(status
)) {
567 talloc_free(mem_ctx
);
571 if (DEBUGLEVEL
>= 10)
572 NDR_PRINT_IN_DEBUG(svcctl_UnlockServiceDatabase
, &r
);
575 r
.out
.lock
= r
.in
.lock
;
576 r
.out
.result
= _svcctl_UnlockServiceDatabase(p
, &r
);
578 if (p
->rng_fault_state
) {
579 talloc_free(mem_ctx
);
580 /* Return True here, srv_pipe_hnd.c will take care */
584 if (DEBUGLEVEL
>= 10)
585 NDR_PRINT_OUT_DEBUG(svcctl_UnlockServiceDatabase
, &r
);
587 push
= ndr_push_init_ctx(mem_ctx
);
589 talloc_free(mem_ctx
);
593 status
= ndr_push_svcctl_UnlockServiceDatabase(push
, NDR_OUT
, &r
);
594 if (NT_STATUS_IS_ERR(status
)) {
595 talloc_free(mem_ctx
);
599 blob
= ndr_push_blob(push
);
600 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32
)blob
.length
)) {
601 talloc_free(mem_ctx
);
605 talloc_free(mem_ctx
);
610 static BOOL
api_svcctl_NotifyBootConfigStatus(pipes_struct
*p
)
612 struct ndr_pull
*pull
;
613 struct ndr_push
*push
;
616 struct svcctl_NotifyBootConfigStatus r
;
617 TALLOC_CTX
*mem_ctx
= talloc_init("api_svcctl_NotifyBootConfigStatus");
619 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
620 talloc_free(mem_ctx
);
624 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
626 talloc_free(mem_ctx
);
630 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
631 status
= ndr_pull_svcctl_NotifyBootConfigStatus(pull
, NDR_IN
, &r
);
632 if (NT_STATUS_IS_ERR(status
)) {
633 talloc_free(mem_ctx
);
637 if (DEBUGLEVEL
>= 10)
638 NDR_PRINT_IN_DEBUG(svcctl_NotifyBootConfigStatus
, &r
);
640 r
.out
.result
= _svcctl_NotifyBootConfigStatus(p
, &r
);
642 if (p
->rng_fault_state
) {
643 talloc_free(mem_ctx
);
644 /* Return True here, srv_pipe_hnd.c will take care */
648 if (DEBUGLEVEL
>= 10)
649 NDR_PRINT_OUT_DEBUG(svcctl_NotifyBootConfigStatus
, &r
);
651 push
= ndr_push_init_ctx(mem_ctx
);
653 talloc_free(mem_ctx
);
657 status
= ndr_push_svcctl_NotifyBootConfigStatus(push
, NDR_OUT
, &r
);
658 if (NT_STATUS_IS_ERR(status
)) {
659 talloc_free(mem_ctx
);
663 blob
= ndr_push_blob(push
);
664 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32
)blob
.length
)) {
665 talloc_free(mem_ctx
);
669 talloc_free(mem_ctx
);
674 static BOOL
api_svcctl_SCSetServiceBitsW(pipes_struct
*p
)
676 struct ndr_pull
*pull
;
677 struct ndr_push
*push
;
680 struct svcctl_SCSetServiceBitsW r
;
681 TALLOC_CTX
*mem_ctx
= talloc_init("api_svcctl_SCSetServiceBitsW");
683 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
684 talloc_free(mem_ctx
);
688 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
690 talloc_free(mem_ctx
);
694 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
695 status
= ndr_pull_svcctl_SCSetServiceBitsW(pull
, NDR_IN
, &r
);
696 if (NT_STATUS_IS_ERR(status
)) {
697 talloc_free(mem_ctx
);
701 if (DEBUGLEVEL
>= 10)
702 NDR_PRINT_IN_DEBUG(svcctl_SCSetServiceBitsW
, &r
);
704 r
.out
.result
= _svcctl_SCSetServiceBitsW(p
, &r
);
706 if (p
->rng_fault_state
) {
707 talloc_free(mem_ctx
);
708 /* Return True here, srv_pipe_hnd.c will take care */
712 if (DEBUGLEVEL
>= 10)
713 NDR_PRINT_OUT_DEBUG(svcctl_SCSetServiceBitsW
, &r
);
715 push
= ndr_push_init_ctx(mem_ctx
);
717 talloc_free(mem_ctx
);
721 status
= ndr_push_svcctl_SCSetServiceBitsW(push
, NDR_OUT
, &r
);
722 if (NT_STATUS_IS_ERR(status
)) {
723 talloc_free(mem_ctx
);
727 blob
= ndr_push_blob(push
);
728 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32
)blob
.length
)) {
729 talloc_free(mem_ctx
);
733 talloc_free(mem_ctx
);
738 static BOOL
api_svcctl_ChangeServiceConfigW(pipes_struct
*p
)
740 struct ndr_pull
*pull
;
741 struct ndr_push
*push
;
744 struct svcctl_ChangeServiceConfigW r
;
745 TALLOC_CTX
*mem_ctx
= talloc_init("api_svcctl_ChangeServiceConfigW");
747 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
748 talloc_free(mem_ctx
);
752 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
754 talloc_free(mem_ctx
);
758 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
759 status
= ndr_pull_svcctl_ChangeServiceConfigW(pull
, NDR_IN
, &r
);
760 if (NT_STATUS_IS_ERR(status
)) {
761 talloc_free(mem_ctx
);
765 if (DEBUGLEVEL
>= 10)
766 NDR_PRINT_IN_DEBUG(svcctl_ChangeServiceConfigW
, &r
);
769 r
.out
.tag_id
= talloc_zero(mem_ctx
, uint32_t);
770 if (r
.out
.tag_id
== NULL
) {
771 talloc_free(mem_ctx
);
775 r
.out
.result
= _svcctl_ChangeServiceConfigW(p
, &r
);
777 if (p
->rng_fault_state
) {
778 talloc_free(mem_ctx
);
779 /* Return True here, srv_pipe_hnd.c will take care */
783 if (DEBUGLEVEL
>= 10)
784 NDR_PRINT_OUT_DEBUG(svcctl_ChangeServiceConfigW
, &r
);
786 push
= ndr_push_init_ctx(mem_ctx
);
788 talloc_free(mem_ctx
);
792 status
= ndr_push_svcctl_ChangeServiceConfigW(push
, NDR_OUT
, &r
);
793 if (NT_STATUS_IS_ERR(status
)) {
794 talloc_free(mem_ctx
);
798 blob
= ndr_push_blob(push
);
799 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32
)blob
.length
)) {
800 talloc_free(mem_ctx
);
804 talloc_free(mem_ctx
);
809 static BOOL
api_svcctl_CreateServiceW(pipes_struct
*p
)
811 struct ndr_pull
*pull
;
812 struct ndr_push
*push
;
815 struct svcctl_CreateServiceW r
;
816 TALLOC_CTX
*mem_ctx
= talloc_init("api_svcctl_CreateServiceW");
818 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
819 talloc_free(mem_ctx
);
823 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
825 talloc_free(mem_ctx
);
829 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
830 status
= ndr_pull_svcctl_CreateServiceW(pull
, NDR_IN
, &r
);
831 if (NT_STATUS_IS_ERR(status
)) {
832 talloc_free(mem_ctx
);
836 if (DEBUGLEVEL
>= 10)
837 NDR_PRINT_IN_DEBUG(svcctl_CreateServiceW
, &r
);
840 r
.out
.TagId
= r
.in
.TagId
;
841 r
.out
.handle
= talloc_zero(mem_ctx
, struct policy_handle
);
842 if (r
.out
.handle
== NULL
) {
843 talloc_free(mem_ctx
);
847 r
.out
.result
= _svcctl_CreateServiceW(p
, &r
);
849 if (p
->rng_fault_state
) {
850 talloc_free(mem_ctx
);
851 /* Return True here, srv_pipe_hnd.c will take care */
855 if (DEBUGLEVEL
>= 10)
856 NDR_PRINT_OUT_DEBUG(svcctl_CreateServiceW
, &r
);
858 push
= ndr_push_init_ctx(mem_ctx
);
860 talloc_free(mem_ctx
);
864 status
= ndr_push_svcctl_CreateServiceW(push
, NDR_OUT
, &r
);
865 if (NT_STATUS_IS_ERR(status
)) {
866 talloc_free(mem_ctx
);
870 blob
= ndr_push_blob(push
);
871 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32
)blob
.length
)) {
872 talloc_free(mem_ctx
);
876 talloc_free(mem_ctx
);
881 static BOOL
api_svcctl_EnumDependentServicesW(pipes_struct
*p
)
883 struct ndr_pull
*pull
;
884 struct ndr_push
*push
;
887 struct svcctl_EnumDependentServicesW r
;
888 TALLOC_CTX
*mem_ctx
= talloc_init("api_svcctl_EnumDependentServicesW");
890 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
891 talloc_free(mem_ctx
);
895 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
897 talloc_free(mem_ctx
);
901 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
902 status
= ndr_pull_svcctl_EnumDependentServicesW(pull
, NDR_IN
, &r
);
903 if (NT_STATUS_IS_ERR(status
)) {
904 talloc_free(mem_ctx
);
908 if (DEBUGLEVEL
>= 10)
909 NDR_PRINT_IN_DEBUG(svcctl_EnumDependentServicesW
, &r
);
912 r
.out
.service_status
= talloc_zero(mem_ctx
, struct ENUM_SERVICE_STATUS
);
913 if (r
.out
.service_status
== NULL
) {
914 talloc_free(mem_ctx
);
918 r
.out
.bytes_needed
= talloc_zero(mem_ctx
, uint32_t);
919 if (r
.out
.bytes_needed
== NULL
) {
920 talloc_free(mem_ctx
);
924 r
.out
.services_returned
= talloc_zero(mem_ctx
, uint32_t);
925 if (r
.out
.services_returned
== NULL
) {
926 talloc_free(mem_ctx
);
930 r
.out
.result
= _svcctl_EnumDependentServicesW(p
, &r
);
932 if (p
->rng_fault_state
) {
933 talloc_free(mem_ctx
);
934 /* Return True here, srv_pipe_hnd.c will take care */
938 if (DEBUGLEVEL
>= 10)
939 NDR_PRINT_OUT_DEBUG(svcctl_EnumDependentServicesW
, &r
);
941 push
= ndr_push_init_ctx(mem_ctx
);
943 talloc_free(mem_ctx
);
947 status
= ndr_push_svcctl_EnumDependentServicesW(push
, NDR_OUT
, &r
);
948 if (NT_STATUS_IS_ERR(status
)) {
949 talloc_free(mem_ctx
);
953 blob
= ndr_push_blob(push
);
954 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32
)blob
.length
)) {
955 talloc_free(mem_ctx
);
959 talloc_free(mem_ctx
);
964 static BOOL
api_svcctl_EnumServicesStatusW(pipes_struct
*p
)
966 struct ndr_pull
*pull
;
967 struct ndr_push
*push
;
970 struct svcctl_EnumServicesStatusW r
;
971 TALLOC_CTX
*mem_ctx
= talloc_init("api_svcctl_EnumServicesStatusW");
973 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
974 talloc_free(mem_ctx
);
978 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
980 talloc_free(mem_ctx
);
984 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
985 status
= ndr_pull_svcctl_EnumServicesStatusW(pull
, NDR_IN
, &r
);
986 if (NT_STATUS_IS_ERR(status
)) {
987 talloc_free(mem_ctx
);
991 if (DEBUGLEVEL
>= 10)
992 NDR_PRINT_IN_DEBUG(svcctl_EnumServicesStatusW
, &r
);
995 r
.out
.service
= talloc_zero_array(mem_ctx
, uint8_t, r
.in
.buf_size
);
996 if (r
.out
.service
== NULL
) {
997 talloc_free(mem_ctx
);
1001 r
.out
.bytes_needed
= talloc_zero(mem_ctx
, uint32_t);
1002 if (r
.out
.bytes_needed
== NULL
) {
1003 talloc_free(mem_ctx
);
1007 r
.out
.services_returned
= talloc_zero(mem_ctx
, uint32_t);
1008 if (r
.out
.services_returned
== NULL
) {
1009 talloc_free(mem_ctx
);
1013 r
.out
.resume_handle
= r
.in
.resume_handle
;
1014 r
.out
.result
= _svcctl_EnumServicesStatusW(p
, &r
);
1016 if (p
->rng_fault_state
) {
1017 talloc_free(mem_ctx
);
1018 /* Return True here, srv_pipe_hnd.c will take care */
1022 if (DEBUGLEVEL
>= 10)
1023 NDR_PRINT_OUT_DEBUG(svcctl_EnumServicesStatusW
, &r
);
1025 push
= ndr_push_init_ctx(mem_ctx
);
1027 talloc_free(mem_ctx
);
1031 status
= ndr_push_svcctl_EnumServicesStatusW(push
, NDR_OUT
, &r
);
1032 if (NT_STATUS_IS_ERR(status
)) {
1033 talloc_free(mem_ctx
);
1037 blob
= ndr_push_blob(push
);
1038 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32
)blob
.length
)) {
1039 talloc_free(mem_ctx
);
1043 talloc_free(mem_ctx
);
1048 static BOOL
api_svcctl_OpenSCManagerW(pipes_struct
*p
)
1050 struct ndr_pull
*pull
;
1051 struct ndr_push
*push
;
1054 struct svcctl_OpenSCManagerW r
;
1055 TALLOC_CTX
*mem_ctx
= talloc_init("api_svcctl_OpenSCManagerW");
1057 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
1058 talloc_free(mem_ctx
);
1062 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
1064 talloc_free(mem_ctx
);
1068 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1069 status
= ndr_pull_svcctl_OpenSCManagerW(pull
, NDR_IN
, &r
);
1070 if (NT_STATUS_IS_ERR(status
)) {
1071 talloc_free(mem_ctx
);
1075 if (DEBUGLEVEL
>= 10)
1076 NDR_PRINT_IN_DEBUG(svcctl_OpenSCManagerW
, &r
);
1079 r
.out
.handle
= talloc_zero(mem_ctx
, struct policy_handle
);
1080 if (r
.out
.handle
== NULL
) {
1081 talloc_free(mem_ctx
);
1085 r
.out
.result
= _svcctl_OpenSCManagerW(p
, &r
);
1087 if (p
->rng_fault_state
) {
1088 talloc_free(mem_ctx
);
1089 /* Return True here, srv_pipe_hnd.c will take care */
1093 if (DEBUGLEVEL
>= 10)
1094 NDR_PRINT_OUT_DEBUG(svcctl_OpenSCManagerW
, &r
);
1096 push
= ndr_push_init_ctx(mem_ctx
);
1098 talloc_free(mem_ctx
);
1102 status
= ndr_push_svcctl_OpenSCManagerW(push
, NDR_OUT
, &r
);
1103 if (NT_STATUS_IS_ERR(status
)) {
1104 talloc_free(mem_ctx
);
1108 blob
= ndr_push_blob(push
);
1109 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32
)blob
.length
)) {
1110 talloc_free(mem_ctx
);
1114 talloc_free(mem_ctx
);
1119 static BOOL
api_svcctl_OpenServiceW(pipes_struct
*p
)
1121 struct ndr_pull
*pull
;
1122 struct ndr_push
*push
;
1125 struct svcctl_OpenServiceW r
;
1126 TALLOC_CTX
*mem_ctx
= talloc_init("api_svcctl_OpenServiceW");
1128 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
1129 talloc_free(mem_ctx
);
1133 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
1135 talloc_free(mem_ctx
);
1139 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1140 status
= ndr_pull_svcctl_OpenServiceW(pull
, NDR_IN
, &r
);
1141 if (NT_STATUS_IS_ERR(status
)) {
1142 talloc_free(mem_ctx
);
1146 if (DEBUGLEVEL
>= 10)
1147 NDR_PRINT_IN_DEBUG(svcctl_OpenServiceW
, &r
);
1150 r
.out
.handle
= talloc_zero(mem_ctx
, struct policy_handle
);
1151 if (r
.out
.handle
== NULL
) {
1152 talloc_free(mem_ctx
);
1156 r
.out
.result
= _svcctl_OpenServiceW(p
, &r
);
1158 if (p
->rng_fault_state
) {
1159 talloc_free(mem_ctx
);
1160 /* Return True here, srv_pipe_hnd.c will take care */
1164 if (DEBUGLEVEL
>= 10)
1165 NDR_PRINT_OUT_DEBUG(svcctl_OpenServiceW
, &r
);
1167 push
= ndr_push_init_ctx(mem_ctx
);
1169 talloc_free(mem_ctx
);
1173 status
= ndr_push_svcctl_OpenServiceW(push
, NDR_OUT
, &r
);
1174 if (NT_STATUS_IS_ERR(status
)) {
1175 talloc_free(mem_ctx
);
1179 blob
= ndr_push_blob(push
);
1180 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32
)blob
.length
)) {
1181 talloc_free(mem_ctx
);
1185 talloc_free(mem_ctx
);
1190 static BOOL
api_svcctl_QueryServiceConfigW(pipes_struct
*p
)
1192 struct ndr_pull
*pull
;
1193 struct ndr_push
*push
;
1196 struct svcctl_QueryServiceConfigW r
;
1197 TALLOC_CTX
*mem_ctx
= talloc_init("api_svcctl_QueryServiceConfigW");
1199 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
1200 talloc_free(mem_ctx
);
1204 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
1206 talloc_free(mem_ctx
);
1210 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1211 status
= ndr_pull_svcctl_QueryServiceConfigW(pull
, NDR_IN
, &r
);
1212 if (NT_STATUS_IS_ERR(status
)) {
1213 talloc_free(mem_ctx
);
1217 if (DEBUGLEVEL
>= 10)
1218 NDR_PRINT_IN_DEBUG(svcctl_QueryServiceConfigW
, &r
);
1221 r
.out
.query
= talloc_zero_array(mem_ctx
, uint8_t, r
.in
.buf_size
);
1222 if (r
.out
.query
== NULL
) {
1223 talloc_free(mem_ctx
);
1227 r
.out
.bytes_needed
= talloc_zero(mem_ctx
, uint32_t);
1228 if (r
.out
.bytes_needed
== NULL
) {
1229 talloc_free(mem_ctx
);
1233 r
.out
.result
= _svcctl_QueryServiceConfigW(p
, &r
);
1235 if (p
->rng_fault_state
) {
1236 talloc_free(mem_ctx
);
1237 /* Return True here, srv_pipe_hnd.c will take care */
1241 if (DEBUGLEVEL
>= 10)
1242 NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceConfigW
, &r
);
1244 push
= ndr_push_init_ctx(mem_ctx
);
1246 talloc_free(mem_ctx
);
1250 status
= ndr_push_svcctl_QueryServiceConfigW(push
, NDR_OUT
, &r
);
1251 if (NT_STATUS_IS_ERR(status
)) {
1252 talloc_free(mem_ctx
);
1256 blob
= ndr_push_blob(push
);
1257 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32
)blob
.length
)) {
1258 talloc_free(mem_ctx
);
1262 talloc_free(mem_ctx
);
1267 static BOOL
api_svcctl_QueryServiceLockStatusW(pipes_struct
*p
)
1269 struct ndr_pull
*pull
;
1270 struct ndr_push
*push
;
1273 struct svcctl_QueryServiceLockStatusW r
;
1274 TALLOC_CTX
*mem_ctx
= talloc_init("api_svcctl_QueryServiceLockStatusW");
1276 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
1277 talloc_free(mem_ctx
);
1281 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
1283 talloc_free(mem_ctx
);
1287 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1288 status
= ndr_pull_svcctl_QueryServiceLockStatusW(pull
, NDR_IN
, &r
);
1289 if (NT_STATUS_IS_ERR(status
)) {
1290 talloc_free(mem_ctx
);
1294 if (DEBUGLEVEL
>= 10)
1295 NDR_PRINT_IN_DEBUG(svcctl_QueryServiceLockStatusW
, &r
);
1298 r
.out
.lock_status
= talloc_zero(mem_ctx
, struct SERVICE_LOCK_STATUS
);
1299 if (r
.out
.lock_status
== NULL
) {
1300 talloc_free(mem_ctx
);
1304 r
.out
.required_buf_size
= talloc_zero(mem_ctx
, uint32_t);
1305 if (r
.out
.required_buf_size
== NULL
) {
1306 talloc_free(mem_ctx
);
1310 r
.out
.result
= _svcctl_QueryServiceLockStatusW(p
, &r
);
1312 if (p
->rng_fault_state
) {
1313 talloc_free(mem_ctx
);
1314 /* Return True here, srv_pipe_hnd.c will take care */
1318 if (DEBUGLEVEL
>= 10)
1319 NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceLockStatusW
, &r
);
1321 push
= ndr_push_init_ctx(mem_ctx
);
1323 talloc_free(mem_ctx
);
1327 status
= ndr_push_svcctl_QueryServiceLockStatusW(push
, NDR_OUT
, &r
);
1328 if (NT_STATUS_IS_ERR(status
)) {
1329 talloc_free(mem_ctx
);
1333 blob
= ndr_push_blob(push
);
1334 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32
)blob
.length
)) {
1335 talloc_free(mem_ctx
);
1339 talloc_free(mem_ctx
);
1344 static BOOL
api_svcctl_StartServiceW(pipes_struct
*p
)
1346 struct ndr_pull
*pull
;
1347 struct ndr_push
*push
;
1350 struct svcctl_StartServiceW r
;
1351 TALLOC_CTX
*mem_ctx
= talloc_init("api_svcctl_StartServiceW");
1353 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
1354 talloc_free(mem_ctx
);
1358 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
1360 talloc_free(mem_ctx
);
1364 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1365 status
= ndr_pull_svcctl_StartServiceW(pull
, NDR_IN
, &r
);
1366 if (NT_STATUS_IS_ERR(status
)) {
1367 talloc_free(mem_ctx
);
1371 if (DEBUGLEVEL
>= 10)
1372 NDR_PRINT_IN_DEBUG(svcctl_StartServiceW
, &r
);
1374 r
.out
.result
= _svcctl_StartServiceW(p
, &r
);
1376 if (p
->rng_fault_state
) {
1377 talloc_free(mem_ctx
);
1378 /* Return True here, srv_pipe_hnd.c will take care */
1382 if (DEBUGLEVEL
>= 10)
1383 NDR_PRINT_OUT_DEBUG(svcctl_StartServiceW
, &r
);
1385 push
= ndr_push_init_ctx(mem_ctx
);
1387 talloc_free(mem_ctx
);
1391 status
= ndr_push_svcctl_StartServiceW(push
, NDR_OUT
, &r
);
1392 if (NT_STATUS_IS_ERR(status
)) {
1393 talloc_free(mem_ctx
);
1397 blob
= ndr_push_blob(push
);
1398 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32
)blob
.length
)) {
1399 talloc_free(mem_ctx
);
1403 talloc_free(mem_ctx
);
1408 static BOOL
api_svcctl_GetServiceDisplayNameW(pipes_struct
*p
)
1410 struct ndr_pull
*pull
;
1411 struct ndr_push
*push
;
1414 struct svcctl_GetServiceDisplayNameW r
;
1415 TALLOC_CTX
*mem_ctx
= talloc_init("api_svcctl_GetServiceDisplayNameW");
1417 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
1418 talloc_free(mem_ctx
);
1422 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
1424 talloc_free(mem_ctx
);
1428 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1429 status
= ndr_pull_svcctl_GetServiceDisplayNameW(pull
, NDR_IN
, &r
);
1430 if (NT_STATUS_IS_ERR(status
)) {
1431 talloc_free(mem_ctx
);
1435 if (DEBUGLEVEL
>= 10)
1436 NDR_PRINT_IN_DEBUG(svcctl_GetServiceDisplayNameW
, &r
);
1439 r
.out
.display_name
= talloc_zero(mem_ctx
, const char *);
1440 if (r
.out
.display_name
== NULL
) {
1441 talloc_free(mem_ctx
);
1445 r
.out
.display_name_length
= r
.in
.display_name_length
;
1446 r
.out
.result
= _svcctl_GetServiceDisplayNameW(p
, &r
);
1448 if (p
->rng_fault_state
) {
1449 talloc_free(mem_ctx
);
1450 /* Return True here, srv_pipe_hnd.c will take care */
1454 if (DEBUGLEVEL
>= 10)
1455 NDR_PRINT_OUT_DEBUG(svcctl_GetServiceDisplayNameW
, &r
);
1457 push
= ndr_push_init_ctx(mem_ctx
);
1459 talloc_free(mem_ctx
);
1463 status
= ndr_push_svcctl_GetServiceDisplayNameW(push
, NDR_OUT
, &r
);
1464 if (NT_STATUS_IS_ERR(status
)) {
1465 talloc_free(mem_ctx
);
1469 blob
= ndr_push_blob(push
);
1470 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32
)blob
.length
)) {
1471 talloc_free(mem_ctx
);
1475 talloc_free(mem_ctx
);
1480 static BOOL
api_svcctl_GetServiceKeyNameW(pipes_struct
*p
)
1482 struct ndr_pull
*pull
;
1483 struct ndr_push
*push
;
1486 struct svcctl_GetServiceKeyNameW r
;
1487 TALLOC_CTX
*mem_ctx
= talloc_init("api_svcctl_GetServiceKeyNameW");
1489 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
1490 talloc_free(mem_ctx
);
1494 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
1496 talloc_free(mem_ctx
);
1500 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1501 status
= ndr_pull_svcctl_GetServiceKeyNameW(pull
, NDR_IN
, &r
);
1502 if (NT_STATUS_IS_ERR(status
)) {
1503 talloc_free(mem_ctx
);
1507 if (DEBUGLEVEL
>= 10)
1508 NDR_PRINT_IN_DEBUG(svcctl_GetServiceKeyNameW
, &r
);
1511 r
.out
.key_name
= talloc_zero(mem_ctx
, const char *);
1512 if (r
.out
.key_name
== NULL
) {
1513 talloc_free(mem_ctx
);
1517 r
.out
.display_name_length
= r
.in
.display_name_length
;
1518 r
.out
.result
= _svcctl_GetServiceKeyNameW(p
, &r
);
1520 if (p
->rng_fault_state
) {
1521 talloc_free(mem_ctx
);
1522 /* Return True here, srv_pipe_hnd.c will take care */
1526 if (DEBUGLEVEL
>= 10)
1527 NDR_PRINT_OUT_DEBUG(svcctl_GetServiceKeyNameW
, &r
);
1529 push
= ndr_push_init_ctx(mem_ctx
);
1531 talloc_free(mem_ctx
);
1535 status
= ndr_push_svcctl_GetServiceKeyNameW(push
, NDR_OUT
, &r
);
1536 if (NT_STATUS_IS_ERR(status
)) {
1537 talloc_free(mem_ctx
);
1541 blob
= ndr_push_blob(push
);
1542 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32
)blob
.length
)) {
1543 talloc_free(mem_ctx
);
1547 talloc_free(mem_ctx
);
1552 static BOOL
api_svcctl_SCSetServiceBitsA(pipes_struct
*p
)
1554 struct ndr_pull
*pull
;
1555 struct ndr_push
*push
;
1558 struct svcctl_SCSetServiceBitsA r
;
1559 TALLOC_CTX
*mem_ctx
= talloc_init("api_svcctl_SCSetServiceBitsA");
1561 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
1562 talloc_free(mem_ctx
);
1566 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
1568 talloc_free(mem_ctx
);
1572 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1573 status
= ndr_pull_svcctl_SCSetServiceBitsA(pull
, NDR_IN
, &r
);
1574 if (NT_STATUS_IS_ERR(status
)) {
1575 talloc_free(mem_ctx
);
1579 if (DEBUGLEVEL
>= 10)
1580 NDR_PRINT_IN_DEBUG(svcctl_SCSetServiceBitsA
, &r
);
1582 r
.out
.result
= _svcctl_SCSetServiceBitsA(p
, &r
);
1584 if (p
->rng_fault_state
) {
1585 talloc_free(mem_ctx
);
1586 /* Return True here, srv_pipe_hnd.c will take care */
1590 if (DEBUGLEVEL
>= 10)
1591 NDR_PRINT_OUT_DEBUG(svcctl_SCSetServiceBitsA
, &r
);
1593 push
= ndr_push_init_ctx(mem_ctx
);
1595 talloc_free(mem_ctx
);
1599 status
= ndr_push_svcctl_SCSetServiceBitsA(push
, NDR_OUT
, &r
);
1600 if (NT_STATUS_IS_ERR(status
)) {
1601 talloc_free(mem_ctx
);
1605 blob
= ndr_push_blob(push
);
1606 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32
)blob
.length
)) {
1607 talloc_free(mem_ctx
);
1611 talloc_free(mem_ctx
);
1616 static BOOL
api_svcctl_ChangeServiceConfigA(pipes_struct
*p
)
1618 struct ndr_pull
*pull
;
1619 struct ndr_push
*push
;
1622 struct svcctl_ChangeServiceConfigA r
;
1623 TALLOC_CTX
*mem_ctx
= talloc_init("api_svcctl_ChangeServiceConfigA");
1625 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
1626 talloc_free(mem_ctx
);
1630 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
1632 talloc_free(mem_ctx
);
1636 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1637 status
= ndr_pull_svcctl_ChangeServiceConfigA(pull
, NDR_IN
, &r
);
1638 if (NT_STATUS_IS_ERR(status
)) {
1639 talloc_free(mem_ctx
);
1643 if (DEBUGLEVEL
>= 10)
1644 NDR_PRINT_IN_DEBUG(svcctl_ChangeServiceConfigA
, &r
);
1647 r
.out
.tag_id
= talloc_zero(mem_ctx
, uint32_t);
1648 if (r
.out
.tag_id
== NULL
) {
1649 talloc_free(mem_ctx
);
1653 r
.out
.result
= _svcctl_ChangeServiceConfigA(p
, &r
);
1655 if (p
->rng_fault_state
) {
1656 talloc_free(mem_ctx
);
1657 /* Return True here, srv_pipe_hnd.c will take care */
1661 if (DEBUGLEVEL
>= 10)
1662 NDR_PRINT_OUT_DEBUG(svcctl_ChangeServiceConfigA
, &r
);
1664 push
= ndr_push_init_ctx(mem_ctx
);
1666 talloc_free(mem_ctx
);
1670 status
= ndr_push_svcctl_ChangeServiceConfigA(push
, NDR_OUT
, &r
);
1671 if (NT_STATUS_IS_ERR(status
)) {
1672 talloc_free(mem_ctx
);
1676 blob
= ndr_push_blob(push
);
1677 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32
)blob
.length
)) {
1678 talloc_free(mem_ctx
);
1682 talloc_free(mem_ctx
);
1687 static BOOL
api_svcctl_CreateServiceA(pipes_struct
*p
)
1689 struct ndr_pull
*pull
;
1690 struct ndr_push
*push
;
1693 struct svcctl_CreateServiceA r
;
1694 TALLOC_CTX
*mem_ctx
= talloc_init("api_svcctl_CreateServiceA");
1696 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
1697 talloc_free(mem_ctx
);
1701 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
1703 talloc_free(mem_ctx
);
1707 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1708 status
= ndr_pull_svcctl_CreateServiceA(pull
, NDR_IN
, &r
);
1709 if (NT_STATUS_IS_ERR(status
)) {
1710 talloc_free(mem_ctx
);
1714 if (DEBUGLEVEL
>= 10)
1715 NDR_PRINT_IN_DEBUG(svcctl_CreateServiceA
, &r
);
1718 r
.out
.TagId
= talloc_zero(mem_ctx
, uint32_t);
1719 if (r
.out
.TagId
== NULL
) {
1720 talloc_free(mem_ctx
);
1724 r
.out
.result
= _svcctl_CreateServiceA(p
, &r
);
1726 if (p
->rng_fault_state
) {
1727 talloc_free(mem_ctx
);
1728 /* Return True here, srv_pipe_hnd.c will take care */
1732 if (DEBUGLEVEL
>= 10)
1733 NDR_PRINT_OUT_DEBUG(svcctl_CreateServiceA
, &r
);
1735 push
= ndr_push_init_ctx(mem_ctx
);
1737 talloc_free(mem_ctx
);
1741 status
= ndr_push_svcctl_CreateServiceA(push
, NDR_OUT
, &r
);
1742 if (NT_STATUS_IS_ERR(status
)) {
1743 talloc_free(mem_ctx
);
1747 blob
= ndr_push_blob(push
);
1748 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32
)blob
.length
)) {
1749 talloc_free(mem_ctx
);
1753 talloc_free(mem_ctx
);
1758 static BOOL
api_svcctl_EnumDependentServicesA(pipes_struct
*p
)
1760 struct ndr_pull
*pull
;
1761 struct ndr_push
*push
;
1764 struct svcctl_EnumDependentServicesA r
;
1765 TALLOC_CTX
*mem_ctx
= talloc_init("api_svcctl_EnumDependentServicesA");
1767 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
1768 talloc_free(mem_ctx
);
1772 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
1774 talloc_free(mem_ctx
);
1778 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1779 status
= ndr_pull_svcctl_EnumDependentServicesA(pull
, NDR_IN
, &r
);
1780 if (NT_STATUS_IS_ERR(status
)) {
1781 talloc_free(mem_ctx
);
1785 if (DEBUGLEVEL
>= 10)
1786 NDR_PRINT_IN_DEBUG(svcctl_EnumDependentServicesA
, &r
);
1789 r
.out
.service_status
= talloc_zero(mem_ctx
, struct ENUM_SERVICE_STATUS
);
1790 if (r
.out
.service_status
== NULL
) {
1791 talloc_free(mem_ctx
);
1795 r
.out
.bytes_needed
= talloc_zero(mem_ctx
, uint32_t);
1796 if (r
.out
.bytes_needed
== NULL
) {
1797 talloc_free(mem_ctx
);
1801 r
.out
.services_returned
= talloc_zero(mem_ctx
, uint32_t);
1802 if (r
.out
.services_returned
== NULL
) {
1803 talloc_free(mem_ctx
);
1807 r
.out
.result
= _svcctl_EnumDependentServicesA(p
, &r
);
1809 if (p
->rng_fault_state
) {
1810 talloc_free(mem_ctx
);
1811 /* Return True here, srv_pipe_hnd.c will take care */
1815 if (DEBUGLEVEL
>= 10)
1816 NDR_PRINT_OUT_DEBUG(svcctl_EnumDependentServicesA
, &r
);
1818 push
= ndr_push_init_ctx(mem_ctx
);
1820 talloc_free(mem_ctx
);
1824 status
= ndr_push_svcctl_EnumDependentServicesA(push
, NDR_OUT
, &r
);
1825 if (NT_STATUS_IS_ERR(status
)) {
1826 talloc_free(mem_ctx
);
1830 blob
= ndr_push_blob(push
);
1831 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32
)blob
.length
)) {
1832 talloc_free(mem_ctx
);
1836 talloc_free(mem_ctx
);
1841 static BOOL
api_svcctl_EnumServicesStatusA(pipes_struct
*p
)
1843 struct ndr_pull
*pull
;
1844 struct ndr_push
*push
;
1847 struct svcctl_EnumServicesStatusA r
;
1848 TALLOC_CTX
*mem_ctx
= talloc_init("api_svcctl_EnumServicesStatusA");
1850 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
1851 talloc_free(mem_ctx
);
1855 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
1857 talloc_free(mem_ctx
);
1861 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1862 status
= ndr_pull_svcctl_EnumServicesStatusA(pull
, NDR_IN
, &r
);
1863 if (NT_STATUS_IS_ERR(status
)) {
1864 talloc_free(mem_ctx
);
1868 if (DEBUGLEVEL
>= 10)
1869 NDR_PRINT_IN_DEBUG(svcctl_EnumServicesStatusA
, &r
);
1872 r
.out
.service
= talloc_zero_array(mem_ctx
, uint8_t, r
.in
.buf_size
);
1873 if (r
.out
.service
== NULL
) {
1874 talloc_free(mem_ctx
);
1878 r
.out
.bytes_needed
= talloc_zero(mem_ctx
, uint32_t);
1879 if (r
.out
.bytes_needed
== NULL
) {
1880 talloc_free(mem_ctx
);
1884 r
.out
.services_returned
= talloc_zero(mem_ctx
, uint32_t);
1885 if (r
.out
.services_returned
== NULL
) {
1886 talloc_free(mem_ctx
);
1890 r
.out
.resume_handle
= r
.in
.resume_handle
;
1891 r
.out
.result
= _svcctl_EnumServicesStatusA(p
, &r
);
1893 if (p
->rng_fault_state
) {
1894 talloc_free(mem_ctx
);
1895 /* Return True here, srv_pipe_hnd.c will take care */
1899 if (DEBUGLEVEL
>= 10)
1900 NDR_PRINT_OUT_DEBUG(svcctl_EnumServicesStatusA
, &r
);
1902 push
= ndr_push_init_ctx(mem_ctx
);
1904 talloc_free(mem_ctx
);
1908 status
= ndr_push_svcctl_EnumServicesStatusA(push
, NDR_OUT
, &r
);
1909 if (NT_STATUS_IS_ERR(status
)) {
1910 talloc_free(mem_ctx
);
1914 blob
= ndr_push_blob(push
);
1915 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32
)blob
.length
)) {
1916 talloc_free(mem_ctx
);
1920 talloc_free(mem_ctx
);
1925 static BOOL
api_svcctl_OpenSCManagerA(pipes_struct
*p
)
1927 struct ndr_pull
*pull
;
1928 struct ndr_push
*push
;
1931 struct svcctl_OpenSCManagerA r
;
1932 TALLOC_CTX
*mem_ctx
= talloc_init("api_svcctl_OpenSCManagerA");
1934 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
1935 talloc_free(mem_ctx
);
1939 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
1941 talloc_free(mem_ctx
);
1945 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1946 status
= ndr_pull_svcctl_OpenSCManagerA(pull
, NDR_IN
, &r
);
1947 if (NT_STATUS_IS_ERR(status
)) {
1948 talloc_free(mem_ctx
);
1952 if (DEBUGLEVEL
>= 10)
1953 NDR_PRINT_IN_DEBUG(svcctl_OpenSCManagerA
, &r
);
1956 r
.out
.handle
= talloc_zero(mem_ctx
, struct policy_handle
);
1957 if (r
.out
.handle
== NULL
) {
1958 talloc_free(mem_ctx
);
1962 r
.out
.result
= _svcctl_OpenSCManagerA(p
, &r
);
1964 if (p
->rng_fault_state
) {
1965 talloc_free(mem_ctx
);
1966 /* Return True here, srv_pipe_hnd.c will take care */
1970 if (DEBUGLEVEL
>= 10)
1971 NDR_PRINT_OUT_DEBUG(svcctl_OpenSCManagerA
, &r
);
1973 push
= ndr_push_init_ctx(mem_ctx
);
1975 talloc_free(mem_ctx
);
1979 status
= ndr_push_svcctl_OpenSCManagerA(push
, NDR_OUT
, &r
);
1980 if (NT_STATUS_IS_ERR(status
)) {
1981 talloc_free(mem_ctx
);
1985 blob
= ndr_push_blob(push
);
1986 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32
)blob
.length
)) {
1987 talloc_free(mem_ctx
);
1991 talloc_free(mem_ctx
);
1996 static BOOL
api_svcctl_OpenServiceA(pipes_struct
*p
)
1998 struct ndr_pull
*pull
;
1999 struct ndr_push
*push
;
2002 struct svcctl_OpenServiceA r
;
2003 TALLOC_CTX
*mem_ctx
= talloc_init("api_svcctl_OpenServiceA");
2005 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
2006 talloc_free(mem_ctx
);
2010 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
2012 talloc_free(mem_ctx
);
2016 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2017 status
= ndr_pull_svcctl_OpenServiceA(pull
, NDR_IN
, &r
);
2018 if (NT_STATUS_IS_ERR(status
)) {
2019 talloc_free(mem_ctx
);
2023 if (DEBUGLEVEL
>= 10)
2024 NDR_PRINT_IN_DEBUG(svcctl_OpenServiceA
, &r
);
2026 r
.out
.result
= _svcctl_OpenServiceA(p
, &r
);
2028 if (p
->rng_fault_state
) {
2029 talloc_free(mem_ctx
);
2030 /* Return True here, srv_pipe_hnd.c will take care */
2034 if (DEBUGLEVEL
>= 10)
2035 NDR_PRINT_OUT_DEBUG(svcctl_OpenServiceA
, &r
);
2037 push
= ndr_push_init_ctx(mem_ctx
);
2039 talloc_free(mem_ctx
);
2043 status
= ndr_push_svcctl_OpenServiceA(push
, NDR_OUT
, &r
);
2044 if (NT_STATUS_IS_ERR(status
)) {
2045 talloc_free(mem_ctx
);
2049 blob
= ndr_push_blob(push
);
2050 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32
)blob
.length
)) {
2051 talloc_free(mem_ctx
);
2055 talloc_free(mem_ctx
);
2060 static BOOL
api_svcctl_QueryServiceConfigA(pipes_struct
*p
)
2062 struct ndr_pull
*pull
;
2063 struct ndr_push
*push
;
2066 struct svcctl_QueryServiceConfigA r
;
2067 TALLOC_CTX
*mem_ctx
= talloc_init("api_svcctl_QueryServiceConfigA");
2069 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
2070 talloc_free(mem_ctx
);
2074 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
2076 talloc_free(mem_ctx
);
2080 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2081 status
= ndr_pull_svcctl_QueryServiceConfigA(pull
, NDR_IN
, &r
);
2082 if (NT_STATUS_IS_ERR(status
)) {
2083 talloc_free(mem_ctx
);
2087 if (DEBUGLEVEL
>= 10)
2088 NDR_PRINT_IN_DEBUG(svcctl_QueryServiceConfigA
, &r
);
2091 r
.out
.query
= talloc_zero_array(mem_ctx
, uint8_t, r
.in
.buf_size
);
2092 if (r
.out
.query
== NULL
) {
2093 talloc_free(mem_ctx
);
2097 r
.out
.bytes_needed
= talloc_zero(mem_ctx
, uint32_t);
2098 if (r
.out
.bytes_needed
== NULL
) {
2099 talloc_free(mem_ctx
);
2103 r
.out
.result
= _svcctl_QueryServiceConfigA(p
, &r
);
2105 if (p
->rng_fault_state
) {
2106 talloc_free(mem_ctx
);
2107 /* Return True here, srv_pipe_hnd.c will take care */
2111 if (DEBUGLEVEL
>= 10)
2112 NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceConfigA
, &r
);
2114 push
= ndr_push_init_ctx(mem_ctx
);
2116 talloc_free(mem_ctx
);
2120 status
= ndr_push_svcctl_QueryServiceConfigA(push
, NDR_OUT
, &r
);
2121 if (NT_STATUS_IS_ERR(status
)) {
2122 talloc_free(mem_ctx
);
2126 blob
= ndr_push_blob(push
);
2127 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32
)blob
.length
)) {
2128 talloc_free(mem_ctx
);
2132 talloc_free(mem_ctx
);
2137 static BOOL
api_svcctl_QueryServiceLockStatusA(pipes_struct
*p
)
2139 struct ndr_pull
*pull
;
2140 struct ndr_push
*push
;
2143 struct svcctl_QueryServiceLockStatusA r
;
2144 TALLOC_CTX
*mem_ctx
= talloc_init("api_svcctl_QueryServiceLockStatusA");
2146 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
2147 talloc_free(mem_ctx
);
2151 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
2153 talloc_free(mem_ctx
);
2157 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2158 status
= ndr_pull_svcctl_QueryServiceLockStatusA(pull
, NDR_IN
, &r
);
2159 if (NT_STATUS_IS_ERR(status
)) {
2160 talloc_free(mem_ctx
);
2164 if (DEBUGLEVEL
>= 10)
2165 NDR_PRINT_IN_DEBUG(svcctl_QueryServiceLockStatusA
, &r
);
2168 r
.out
.lock_status
= talloc_zero(mem_ctx
, struct SERVICE_LOCK_STATUS
);
2169 if (r
.out
.lock_status
== NULL
) {
2170 talloc_free(mem_ctx
);
2174 r
.out
.required_buf_size
= talloc_zero(mem_ctx
, uint32_t);
2175 if (r
.out
.required_buf_size
== NULL
) {
2176 talloc_free(mem_ctx
);
2180 r
.out
.result
= _svcctl_QueryServiceLockStatusA(p
, &r
);
2182 if (p
->rng_fault_state
) {
2183 talloc_free(mem_ctx
);
2184 /* Return True here, srv_pipe_hnd.c will take care */
2188 if (DEBUGLEVEL
>= 10)
2189 NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceLockStatusA
, &r
);
2191 push
= ndr_push_init_ctx(mem_ctx
);
2193 talloc_free(mem_ctx
);
2197 status
= ndr_push_svcctl_QueryServiceLockStatusA(push
, NDR_OUT
, &r
);
2198 if (NT_STATUS_IS_ERR(status
)) {
2199 talloc_free(mem_ctx
);
2203 blob
= ndr_push_blob(push
);
2204 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32
)blob
.length
)) {
2205 talloc_free(mem_ctx
);
2209 talloc_free(mem_ctx
);
2214 static BOOL
api_svcctl_StartServiceA(pipes_struct
*p
)
2216 struct ndr_pull
*pull
;
2217 struct ndr_push
*push
;
2220 struct svcctl_StartServiceA r
;
2221 TALLOC_CTX
*mem_ctx
= talloc_init("api_svcctl_StartServiceA");
2223 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
2224 talloc_free(mem_ctx
);
2228 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
2230 talloc_free(mem_ctx
);
2234 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2235 status
= ndr_pull_svcctl_StartServiceA(pull
, NDR_IN
, &r
);
2236 if (NT_STATUS_IS_ERR(status
)) {
2237 talloc_free(mem_ctx
);
2241 if (DEBUGLEVEL
>= 10)
2242 NDR_PRINT_IN_DEBUG(svcctl_StartServiceA
, &r
);
2244 r
.out
.result
= _svcctl_StartServiceA(p
, &r
);
2246 if (p
->rng_fault_state
) {
2247 talloc_free(mem_ctx
);
2248 /* Return True here, srv_pipe_hnd.c will take care */
2252 if (DEBUGLEVEL
>= 10)
2253 NDR_PRINT_OUT_DEBUG(svcctl_StartServiceA
, &r
);
2255 push
= ndr_push_init_ctx(mem_ctx
);
2257 talloc_free(mem_ctx
);
2261 status
= ndr_push_svcctl_StartServiceA(push
, NDR_OUT
, &r
);
2262 if (NT_STATUS_IS_ERR(status
)) {
2263 talloc_free(mem_ctx
);
2267 blob
= ndr_push_blob(push
);
2268 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32
)blob
.length
)) {
2269 talloc_free(mem_ctx
);
2273 talloc_free(mem_ctx
);
2278 static BOOL
api_svcctl_GetServiceDisplayNameA(pipes_struct
*p
)
2280 struct ndr_pull
*pull
;
2281 struct ndr_push
*push
;
2284 struct svcctl_GetServiceDisplayNameA r
;
2285 TALLOC_CTX
*mem_ctx
= talloc_init("api_svcctl_GetServiceDisplayNameA");
2287 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
2288 talloc_free(mem_ctx
);
2292 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
2294 talloc_free(mem_ctx
);
2298 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2299 status
= ndr_pull_svcctl_GetServiceDisplayNameA(pull
, NDR_IN
, &r
);
2300 if (NT_STATUS_IS_ERR(status
)) {
2301 talloc_free(mem_ctx
);
2305 if (DEBUGLEVEL
>= 10)
2306 NDR_PRINT_IN_DEBUG(svcctl_GetServiceDisplayNameA
, &r
);
2309 r
.out
.display_name
= talloc_zero(mem_ctx
, const char *);
2310 if (r
.out
.display_name
== NULL
) {
2311 talloc_free(mem_ctx
);
2315 r
.out
.display_name_length
= r
.in
.display_name_length
;
2316 r
.out
.result
= _svcctl_GetServiceDisplayNameA(p
, &r
);
2318 if (p
->rng_fault_state
) {
2319 talloc_free(mem_ctx
);
2320 /* Return True here, srv_pipe_hnd.c will take care */
2324 if (DEBUGLEVEL
>= 10)
2325 NDR_PRINT_OUT_DEBUG(svcctl_GetServiceDisplayNameA
, &r
);
2327 push
= ndr_push_init_ctx(mem_ctx
);
2329 talloc_free(mem_ctx
);
2333 status
= ndr_push_svcctl_GetServiceDisplayNameA(push
, NDR_OUT
, &r
);
2334 if (NT_STATUS_IS_ERR(status
)) {
2335 talloc_free(mem_ctx
);
2339 blob
= ndr_push_blob(push
);
2340 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32
)blob
.length
)) {
2341 talloc_free(mem_ctx
);
2345 talloc_free(mem_ctx
);
2350 static BOOL
api_svcctl_GetServiceKeyNameA(pipes_struct
*p
)
2352 struct ndr_pull
*pull
;
2353 struct ndr_push
*push
;
2356 struct svcctl_GetServiceKeyNameA r
;
2357 TALLOC_CTX
*mem_ctx
= talloc_init("api_svcctl_GetServiceKeyNameA");
2359 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
2360 talloc_free(mem_ctx
);
2364 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
2366 talloc_free(mem_ctx
);
2370 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2371 status
= ndr_pull_svcctl_GetServiceKeyNameA(pull
, NDR_IN
, &r
);
2372 if (NT_STATUS_IS_ERR(status
)) {
2373 talloc_free(mem_ctx
);
2377 if (DEBUGLEVEL
>= 10)
2378 NDR_PRINT_IN_DEBUG(svcctl_GetServiceKeyNameA
, &r
);
2381 r
.out
.key_name
= talloc_zero(mem_ctx
, const char *);
2382 if (r
.out
.key_name
== NULL
) {
2383 talloc_free(mem_ctx
);
2387 r
.out
.display_name_length
= r
.in
.display_name_length
;
2388 r
.out
.result
= _svcctl_GetServiceKeyNameA(p
, &r
);
2390 if (p
->rng_fault_state
) {
2391 talloc_free(mem_ctx
);
2392 /* Return True here, srv_pipe_hnd.c will take care */
2396 if (DEBUGLEVEL
>= 10)
2397 NDR_PRINT_OUT_DEBUG(svcctl_GetServiceKeyNameA
, &r
);
2399 push
= ndr_push_init_ctx(mem_ctx
);
2401 talloc_free(mem_ctx
);
2405 status
= ndr_push_svcctl_GetServiceKeyNameA(push
, NDR_OUT
, &r
);
2406 if (NT_STATUS_IS_ERR(status
)) {
2407 talloc_free(mem_ctx
);
2411 blob
= ndr_push_blob(push
);
2412 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32
)blob
.length
)) {
2413 talloc_free(mem_ctx
);
2417 talloc_free(mem_ctx
);
2422 static BOOL
api_svcctl_GetCurrentGroupeStateW(pipes_struct
*p
)
2424 struct ndr_pull
*pull
;
2425 struct ndr_push
*push
;
2428 struct svcctl_GetCurrentGroupeStateW r
;
2429 TALLOC_CTX
*mem_ctx
= talloc_init("api_svcctl_GetCurrentGroupeStateW");
2431 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
2432 talloc_free(mem_ctx
);
2436 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
2438 talloc_free(mem_ctx
);
2442 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2443 status
= ndr_pull_svcctl_GetCurrentGroupeStateW(pull
, NDR_IN
, &r
);
2444 if (NT_STATUS_IS_ERR(status
)) {
2445 talloc_free(mem_ctx
);
2449 if (DEBUGLEVEL
>= 10)
2450 NDR_PRINT_IN_DEBUG(svcctl_GetCurrentGroupeStateW
, &r
);
2452 r
.out
.result
= _svcctl_GetCurrentGroupeStateW(p
, &r
);
2454 if (p
->rng_fault_state
) {
2455 talloc_free(mem_ctx
);
2456 /* Return True here, srv_pipe_hnd.c will take care */
2460 if (DEBUGLEVEL
>= 10)
2461 NDR_PRINT_OUT_DEBUG(svcctl_GetCurrentGroupeStateW
, &r
);
2463 push
= ndr_push_init_ctx(mem_ctx
);
2465 talloc_free(mem_ctx
);
2469 status
= ndr_push_svcctl_GetCurrentGroupeStateW(push
, NDR_OUT
, &r
);
2470 if (NT_STATUS_IS_ERR(status
)) {
2471 talloc_free(mem_ctx
);
2475 blob
= ndr_push_blob(push
);
2476 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32
)blob
.length
)) {
2477 talloc_free(mem_ctx
);
2481 talloc_free(mem_ctx
);
2486 static BOOL
api_svcctl_EnumServiceGroupW(pipes_struct
*p
)
2488 struct ndr_pull
*pull
;
2489 struct ndr_push
*push
;
2492 struct svcctl_EnumServiceGroupW r
;
2493 TALLOC_CTX
*mem_ctx
= talloc_init("api_svcctl_EnumServiceGroupW");
2495 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
2496 talloc_free(mem_ctx
);
2500 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
2502 talloc_free(mem_ctx
);
2506 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2507 status
= ndr_pull_svcctl_EnumServiceGroupW(pull
, NDR_IN
, &r
);
2508 if (NT_STATUS_IS_ERR(status
)) {
2509 talloc_free(mem_ctx
);
2513 if (DEBUGLEVEL
>= 10)
2514 NDR_PRINT_IN_DEBUG(svcctl_EnumServiceGroupW
, &r
);
2516 r
.out
.result
= _svcctl_EnumServiceGroupW(p
, &r
);
2518 if (p
->rng_fault_state
) {
2519 talloc_free(mem_ctx
);
2520 /* Return True here, srv_pipe_hnd.c will take care */
2524 if (DEBUGLEVEL
>= 10)
2525 NDR_PRINT_OUT_DEBUG(svcctl_EnumServiceGroupW
, &r
);
2527 push
= ndr_push_init_ctx(mem_ctx
);
2529 talloc_free(mem_ctx
);
2533 status
= ndr_push_svcctl_EnumServiceGroupW(push
, NDR_OUT
, &r
);
2534 if (NT_STATUS_IS_ERR(status
)) {
2535 talloc_free(mem_ctx
);
2539 blob
= ndr_push_blob(push
);
2540 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32
)blob
.length
)) {
2541 talloc_free(mem_ctx
);
2545 talloc_free(mem_ctx
);
2550 static BOOL
api_svcctl_ChangeServiceConfig2A(pipes_struct
*p
)
2552 struct ndr_pull
*pull
;
2553 struct ndr_push
*push
;
2556 struct svcctl_ChangeServiceConfig2A r
;
2557 TALLOC_CTX
*mem_ctx
= talloc_init("api_svcctl_ChangeServiceConfig2A");
2559 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
2560 talloc_free(mem_ctx
);
2564 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
2566 talloc_free(mem_ctx
);
2570 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2571 status
= ndr_pull_svcctl_ChangeServiceConfig2A(pull
, NDR_IN
, &r
);
2572 if (NT_STATUS_IS_ERR(status
)) {
2573 talloc_free(mem_ctx
);
2577 if (DEBUGLEVEL
>= 10)
2578 NDR_PRINT_IN_DEBUG(svcctl_ChangeServiceConfig2A
, &r
);
2580 r
.out
.result
= _svcctl_ChangeServiceConfig2A(p
, &r
);
2582 if (p
->rng_fault_state
) {
2583 talloc_free(mem_ctx
);
2584 /* Return True here, srv_pipe_hnd.c will take care */
2588 if (DEBUGLEVEL
>= 10)
2589 NDR_PRINT_OUT_DEBUG(svcctl_ChangeServiceConfig2A
, &r
);
2591 push
= ndr_push_init_ctx(mem_ctx
);
2593 talloc_free(mem_ctx
);
2597 status
= ndr_push_svcctl_ChangeServiceConfig2A(push
, NDR_OUT
, &r
);
2598 if (NT_STATUS_IS_ERR(status
)) {
2599 talloc_free(mem_ctx
);
2603 blob
= ndr_push_blob(push
);
2604 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32
)blob
.length
)) {
2605 talloc_free(mem_ctx
);
2609 talloc_free(mem_ctx
);
2614 static BOOL
api_svcctl_ChangeServiceConfig2W(pipes_struct
*p
)
2616 struct ndr_pull
*pull
;
2617 struct ndr_push
*push
;
2620 struct svcctl_ChangeServiceConfig2W r
;
2621 TALLOC_CTX
*mem_ctx
= talloc_init("api_svcctl_ChangeServiceConfig2W");
2623 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
2624 talloc_free(mem_ctx
);
2628 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
2630 talloc_free(mem_ctx
);
2634 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2635 status
= ndr_pull_svcctl_ChangeServiceConfig2W(pull
, NDR_IN
, &r
);
2636 if (NT_STATUS_IS_ERR(status
)) {
2637 talloc_free(mem_ctx
);
2641 if (DEBUGLEVEL
>= 10)
2642 NDR_PRINT_IN_DEBUG(svcctl_ChangeServiceConfig2W
, &r
);
2644 r
.out
.result
= _svcctl_ChangeServiceConfig2W(p
, &r
);
2646 if (p
->rng_fault_state
) {
2647 talloc_free(mem_ctx
);
2648 /* Return True here, srv_pipe_hnd.c will take care */
2652 if (DEBUGLEVEL
>= 10)
2653 NDR_PRINT_OUT_DEBUG(svcctl_ChangeServiceConfig2W
, &r
);
2655 push
= ndr_push_init_ctx(mem_ctx
);
2657 talloc_free(mem_ctx
);
2661 status
= ndr_push_svcctl_ChangeServiceConfig2W(push
, NDR_OUT
, &r
);
2662 if (NT_STATUS_IS_ERR(status
)) {
2663 talloc_free(mem_ctx
);
2667 blob
= ndr_push_blob(push
);
2668 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32
)blob
.length
)) {
2669 talloc_free(mem_ctx
);
2673 talloc_free(mem_ctx
);
2678 static BOOL
api_svcctl_QueryServiceConfig2A(pipes_struct
*p
)
2680 struct ndr_pull
*pull
;
2681 struct ndr_push
*push
;
2684 struct svcctl_QueryServiceConfig2A r
;
2685 TALLOC_CTX
*mem_ctx
= talloc_init("api_svcctl_QueryServiceConfig2A");
2687 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
2688 talloc_free(mem_ctx
);
2692 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
2694 talloc_free(mem_ctx
);
2698 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2699 status
= ndr_pull_svcctl_QueryServiceConfig2A(pull
, NDR_IN
, &r
);
2700 if (NT_STATUS_IS_ERR(status
)) {
2701 talloc_free(mem_ctx
);
2705 if (DEBUGLEVEL
>= 10)
2706 NDR_PRINT_IN_DEBUG(svcctl_QueryServiceConfig2A
, &r
);
2709 r
.out
.buffer
= talloc_zero_array(mem_ctx
, uint8_t, r
.in
.buf_size
);
2710 if (r
.out
.buffer
== NULL
) {
2711 talloc_free(mem_ctx
);
2715 r
.out
.bytes_needed
= talloc_zero(mem_ctx
, uint32_t);
2716 if (r
.out
.bytes_needed
== NULL
) {
2717 talloc_free(mem_ctx
);
2721 r
.out
.result
= _svcctl_QueryServiceConfig2A(p
, &r
);
2723 if (p
->rng_fault_state
) {
2724 talloc_free(mem_ctx
);
2725 /* Return True here, srv_pipe_hnd.c will take care */
2729 if (DEBUGLEVEL
>= 10)
2730 NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceConfig2A
, &r
);
2732 push
= ndr_push_init_ctx(mem_ctx
);
2734 talloc_free(mem_ctx
);
2738 status
= ndr_push_svcctl_QueryServiceConfig2A(push
, NDR_OUT
, &r
);
2739 if (NT_STATUS_IS_ERR(status
)) {
2740 talloc_free(mem_ctx
);
2744 blob
= ndr_push_blob(push
);
2745 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32
)blob
.length
)) {
2746 talloc_free(mem_ctx
);
2750 talloc_free(mem_ctx
);
2755 static BOOL
api_svcctl_QueryServiceConfig2W(pipes_struct
*p
)
2757 struct ndr_pull
*pull
;
2758 struct ndr_push
*push
;
2761 struct svcctl_QueryServiceConfig2W r
;
2762 TALLOC_CTX
*mem_ctx
= talloc_init("api_svcctl_QueryServiceConfig2W");
2764 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
2765 talloc_free(mem_ctx
);
2769 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
2771 talloc_free(mem_ctx
);
2775 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2776 status
= ndr_pull_svcctl_QueryServiceConfig2W(pull
, NDR_IN
, &r
);
2777 if (NT_STATUS_IS_ERR(status
)) {
2778 talloc_free(mem_ctx
);
2782 if (DEBUGLEVEL
>= 10)
2783 NDR_PRINT_IN_DEBUG(svcctl_QueryServiceConfig2W
, &r
);
2786 r
.out
.buffer
= talloc_zero_array(mem_ctx
, uint8_t, r
.in
.buf_size
);
2787 if (r
.out
.buffer
== NULL
) {
2788 talloc_free(mem_ctx
);
2792 r
.out
.bytes_needed
= talloc_zero(mem_ctx
, uint32_t);
2793 if (r
.out
.bytes_needed
== NULL
) {
2794 talloc_free(mem_ctx
);
2798 r
.out
.result
= _svcctl_QueryServiceConfig2W(p
, &r
);
2800 if (p
->rng_fault_state
) {
2801 talloc_free(mem_ctx
);
2802 /* Return True here, srv_pipe_hnd.c will take care */
2806 if (DEBUGLEVEL
>= 10)
2807 NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceConfig2W
, &r
);
2809 push
= ndr_push_init_ctx(mem_ctx
);
2811 talloc_free(mem_ctx
);
2815 status
= ndr_push_svcctl_QueryServiceConfig2W(push
, NDR_OUT
, &r
);
2816 if (NT_STATUS_IS_ERR(status
)) {
2817 talloc_free(mem_ctx
);
2821 blob
= ndr_push_blob(push
);
2822 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32
)blob
.length
)) {
2823 talloc_free(mem_ctx
);
2827 talloc_free(mem_ctx
);
2832 static BOOL
api_svcctl_QueryServiceStatusEx(pipes_struct
*p
)
2834 struct ndr_pull
*pull
;
2835 struct ndr_push
*push
;
2838 struct svcctl_QueryServiceStatusEx r
;
2839 TALLOC_CTX
*mem_ctx
= talloc_init("api_svcctl_QueryServiceStatusEx");
2841 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
2842 talloc_free(mem_ctx
);
2846 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
2848 talloc_free(mem_ctx
);
2852 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2853 status
= ndr_pull_svcctl_QueryServiceStatusEx(pull
, NDR_IN
, &r
);
2854 if (NT_STATUS_IS_ERR(status
)) {
2855 talloc_free(mem_ctx
);
2859 if (DEBUGLEVEL
>= 10)
2860 NDR_PRINT_IN_DEBUG(svcctl_QueryServiceStatusEx
, &r
);
2863 r
.out
.buffer
= talloc_zero_array(mem_ctx
, uint8_t, r
.in
.buf_size
);
2864 if (r
.out
.buffer
== NULL
) {
2865 talloc_free(mem_ctx
);
2869 r
.out
.bytes_needed
= talloc_zero(mem_ctx
, uint32_t);
2870 if (r
.out
.bytes_needed
== NULL
) {
2871 talloc_free(mem_ctx
);
2875 r
.out
.result
= _svcctl_QueryServiceStatusEx(p
, &r
);
2877 if (p
->rng_fault_state
) {
2878 talloc_free(mem_ctx
);
2879 /* Return True here, srv_pipe_hnd.c will take care */
2883 if (DEBUGLEVEL
>= 10)
2884 NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceStatusEx
, &r
);
2886 push
= ndr_push_init_ctx(mem_ctx
);
2888 talloc_free(mem_ctx
);
2892 status
= ndr_push_svcctl_QueryServiceStatusEx(push
, NDR_OUT
, &r
);
2893 if (NT_STATUS_IS_ERR(status
)) {
2894 talloc_free(mem_ctx
);
2898 blob
= ndr_push_blob(push
);
2899 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32
)blob
.length
)) {
2900 talloc_free(mem_ctx
);
2904 talloc_free(mem_ctx
);
2909 static BOOL
api_EnumServicesStatusExA(pipes_struct
*p
)
2911 struct ndr_pull
*pull
;
2912 struct ndr_push
*push
;
2915 struct EnumServicesStatusExA r
;
2916 TALLOC_CTX
*mem_ctx
= talloc_init("api_EnumServicesStatusExA");
2918 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
2919 talloc_free(mem_ctx
);
2923 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
2925 talloc_free(mem_ctx
);
2929 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2930 status
= ndr_pull_EnumServicesStatusExA(pull
, NDR_IN
, &r
);
2931 if (NT_STATUS_IS_ERR(status
)) {
2932 talloc_free(mem_ctx
);
2936 if (DEBUGLEVEL
>= 10)
2937 NDR_PRINT_IN_DEBUG(EnumServicesStatusExA
, &r
);
2940 r
.out
.services
= talloc_zero_array(mem_ctx
, uint8_t, r
.in
.buf_size
);
2941 if (r
.out
.services
== NULL
) {
2942 talloc_free(mem_ctx
);
2946 r
.out
.bytes_needed
= talloc_zero(mem_ctx
, uint32_t);
2947 if (r
.out
.bytes_needed
== NULL
) {
2948 talloc_free(mem_ctx
);
2952 r
.out
.service_returned
= talloc_zero(mem_ctx
, uint32_t);
2953 if (r
.out
.service_returned
== NULL
) {
2954 talloc_free(mem_ctx
);
2958 r
.out
.resume_handle
= r
.in
.resume_handle
;
2959 r
.out
.group_name
= talloc_zero(mem_ctx
, const char *);
2960 if (r
.out
.group_name
== NULL
) {
2961 talloc_free(mem_ctx
);
2965 r
.out
.result
= _EnumServicesStatusExA(p
, &r
);
2967 if (p
->rng_fault_state
) {
2968 talloc_free(mem_ctx
);
2969 /* Return True here, srv_pipe_hnd.c will take care */
2973 if (DEBUGLEVEL
>= 10)
2974 NDR_PRINT_OUT_DEBUG(EnumServicesStatusExA
, &r
);
2976 push
= ndr_push_init_ctx(mem_ctx
);
2978 talloc_free(mem_ctx
);
2982 status
= ndr_push_EnumServicesStatusExA(push
, NDR_OUT
, &r
);
2983 if (NT_STATUS_IS_ERR(status
)) {
2984 talloc_free(mem_ctx
);
2988 blob
= ndr_push_blob(push
);
2989 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32
)blob
.length
)) {
2990 talloc_free(mem_ctx
);
2994 talloc_free(mem_ctx
);
2999 static BOOL
api_EnumServicesStatusExW(pipes_struct
*p
)
3001 struct ndr_pull
*pull
;
3002 struct ndr_push
*push
;
3005 struct EnumServicesStatusExW r
;
3006 TALLOC_CTX
*mem_ctx
= talloc_init("api_EnumServicesStatusExW");
3008 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
3009 talloc_free(mem_ctx
);
3013 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
3015 talloc_free(mem_ctx
);
3019 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
3020 status
= ndr_pull_EnumServicesStatusExW(pull
, NDR_IN
, &r
);
3021 if (NT_STATUS_IS_ERR(status
)) {
3022 talloc_free(mem_ctx
);
3026 if (DEBUGLEVEL
>= 10)
3027 NDR_PRINT_IN_DEBUG(EnumServicesStatusExW
, &r
);
3030 r
.out
.services
= talloc_zero_array(mem_ctx
, uint8_t, r
.in
.buf_size
);
3031 if (r
.out
.services
== NULL
) {
3032 talloc_free(mem_ctx
);
3036 r
.out
.bytes_needed
= talloc_zero(mem_ctx
, uint32_t);
3037 if (r
.out
.bytes_needed
== NULL
) {
3038 talloc_free(mem_ctx
);
3042 r
.out
.service_returned
= talloc_zero(mem_ctx
, uint32_t);
3043 if (r
.out
.service_returned
== NULL
) {
3044 talloc_free(mem_ctx
);
3048 r
.out
.resume_handle
= r
.in
.resume_handle
;
3049 r
.out
.group_name
= talloc_zero(mem_ctx
, const char *);
3050 if (r
.out
.group_name
== NULL
) {
3051 talloc_free(mem_ctx
);
3055 r
.out
.result
= _EnumServicesStatusExW(p
, &r
);
3057 if (p
->rng_fault_state
) {
3058 talloc_free(mem_ctx
);
3059 /* Return True here, srv_pipe_hnd.c will take care */
3063 if (DEBUGLEVEL
>= 10)
3064 NDR_PRINT_OUT_DEBUG(EnumServicesStatusExW
, &r
);
3066 push
= ndr_push_init_ctx(mem_ctx
);
3068 talloc_free(mem_ctx
);
3072 status
= ndr_push_EnumServicesStatusExW(push
, NDR_OUT
, &r
);
3073 if (NT_STATUS_IS_ERR(status
)) {
3074 talloc_free(mem_ctx
);
3078 blob
= ndr_push_blob(push
);
3079 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32
)blob
.length
)) {
3080 talloc_free(mem_ctx
);
3084 talloc_free(mem_ctx
);
3089 static BOOL
api_svcctl_SCSendTSMessage(pipes_struct
*p
)
3091 struct ndr_pull
*pull
;
3092 struct ndr_push
*push
;
3095 struct svcctl_SCSendTSMessage r
;
3096 TALLOC_CTX
*mem_ctx
= talloc_init("api_svcctl_SCSendTSMessage");
3098 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
3099 talloc_free(mem_ctx
);
3103 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
3105 talloc_free(mem_ctx
);
3109 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
3110 status
= ndr_pull_svcctl_SCSendTSMessage(pull
, NDR_IN
, &r
);
3111 if (NT_STATUS_IS_ERR(status
)) {
3112 talloc_free(mem_ctx
);
3116 if (DEBUGLEVEL
>= 10)
3117 NDR_PRINT_IN_DEBUG(svcctl_SCSendTSMessage
, &r
);
3119 r
.out
.result
= _svcctl_SCSendTSMessage(p
, &r
);
3121 if (p
->rng_fault_state
) {
3122 talloc_free(mem_ctx
);
3123 /* Return True here, srv_pipe_hnd.c will take care */
3127 if (DEBUGLEVEL
>= 10)
3128 NDR_PRINT_OUT_DEBUG(svcctl_SCSendTSMessage
, &r
);
3130 push
= ndr_push_init_ctx(mem_ctx
);
3132 talloc_free(mem_ctx
);
3136 status
= ndr_push_svcctl_SCSendTSMessage(push
, NDR_OUT
, &r
);
3137 if (NT_STATUS_IS_ERR(status
)) {
3138 talloc_free(mem_ctx
);
3142 blob
= ndr_push_blob(push
);
3143 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32
)blob
.length
)) {
3144 talloc_free(mem_ctx
);
3148 talloc_free(mem_ctx
);
3155 static struct api_struct api_svcctl_cmds
[] =
3157 {"SVCCTL_CLOSESERVICEHANDLE", DCERPC_SVCCTL_CLOSESERVICEHANDLE
, api_svcctl_CloseServiceHandle
},
3158 {"SVCCTL_CONTROLSERVICE", DCERPC_SVCCTL_CONTROLSERVICE
, api_svcctl_ControlService
},
3159 {"SVCCTL_DELETESERVICE", DCERPC_SVCCTL_DELETESERVICE
, api_svcctl_DeleteService
},
3160 {"SVCCTL_LOCKSERVICEDATABASE", DCERPC_SVCCTL_LOCKSERVICEDATABASE
, api_svcctl_LockServiceDatabase
},
3161 {"SVCCTL_QUERYSERVICEOBJECTSECURITY", DCERPC_SVCCTL_QUERYSERVICEOBJECTSECURITY
, api_svcctl_QueryServiceObjectSecurity
},
3162 {"SVCCTL_SETSERVICEOBJECTSECURITY", DCERPC_SVCCTL_SETSERVICEOBJECTSECURITY
, api_svcctl_SetServiceObjectSecurity
},
3163 {"SVCCTL_QUERYSERVICESTATUS", DCERPC_SVCCTL_QUERYSERVICESTATUS
, api_svcctl_QueryServiceStatus
},
3164 {"SVCCTL_SETSERVICESTATUS", DCERPC_SVCCTL_SETSERVICESTATUS
, api_svcctl_SetServiceStatus
},
3165 {"SVCCTL_UNLOCKSERVICEDATABASE", DCERPC_SVCCTL_UNLOCKSERVICEDATABASE
, api_svcctl_UnlockServiceDatabase
},
3166 {"SVCCTL_NOTIFYBOOTCONFIGSTATUS", DCERPC_SVCCTL_NOTIFYBOOTCONFIGSTATUS
, api_svcctl_NotifyBootConfigStatus
},
3167 {"SVCCTL_SCSETSERVICEBITSW", DCERPC_SVCCTL_SCSETSERVICEBITSW
, api_svcctl_SCSetServiceBitsW
},
3168 {"SVCCTL_CHANGESERVICECONFIGW", DCERPC_SVCCTL_CHANGESERVICECONFIGW
, api_svcctl_ChangeServiceConfigW
},
3169 {"SVCCTL_CREATESERVICEW", DCERPC_SVCCTL_CREATESERVICEW
, api_svcctl_CreateServiceW
},
3170 {"SVCCTL_ENUMDEPENDENTSERVICESW", DCERPC_SVCCTL_ENUMDEPENDENTSERVICESW
, api_svcctl_EnumDependentServicesW
},
3171 {"SVCCTL_ENUMSERVICESSTATUSW", DCERPC_SVCCTL_ENUMSERVICESSTATUSW
, api_svcctl_EnumServicesStatusW
},
3172 {"SVCCTL_OPENSCMANAGERW", DCERPC_SVCCTL_OPENSCMANAGERW
, api_svcctl_OpenSCManagerW
},
3173 {"SVCCTL_OPENSERVICEW", DCERPC_SVCCTL_OPENSERVICEW
, api_svcctl_OpenServiceW
},
3174 {"SVCCTL_QUERYSERVICECONFIGW", DCERPC_SVCCTL_QUERYSERVICECONFIGW
, api_svcctl_QueryServiceConfigW
},
3175 {"SVCCTL_QUERYSERVICELOCKSTATUSW", DCERPC_SVCCTL_QUERYSERVICELOCKSTATUSW
, api_svcctl_QueryServiceLockStatusW
},
3176 {"SVCCTL_STARTSERVICEW", DCERPC_SVCCTL_STARTSERVICEW
, api_svcctl_StartServiceW
},
3177 {"SVCCTL_GETSERVICEDISPLAYNAMEW", DCERPC_SVCCTL_GETSERVICEDISPLAYNAMEW
, api_svcctl_GetServiceDisplayNameW
},
3178 {"SVCCTL_GETSERVICEKEYNAMEW", DCERPC_SVCCTL_GETSERVICEKEYNAMEW
, api_svcctl_GetServiceKeyNameW
},
3179 {"SVCCTL_SCSETSERVICEBITSA", DCERPC_SVCCTL_SCSETSERVICEBITSA
, api_svcctl_SCSetServiceBitsA
},
3180 {"SVCCTL_CHANGESERVICECONFIGA", DCERPC_SVCCTL_CHANGESERVICECONFIGA
, api_svcctl_ChangeServiceConfigA
},
3181 {"SVCCTL_CREATESERVICEA", DCERPC_SVCCTL_CREATESERVICEA
, api_svcctl_CreateServiceA
},
3182 {"SVCCTL_ENUMDEPENDENTSERVICESA", DCERPC_SVCCTL_ENUMDEPENDENTSERVICESA
, api_svcctl_EnumDependentServicesA
},
3183 {"SVCCTL_ENUMSERVICESSTATUSA", DCERPC_SVCCTL_ENUMSERVICESSTATUSA
, api_svcctl_EnumServicesStatusA
},
3184 {"SVCCTL_OPENSCMANAGERA", DCERPC_SVCCTL_OPENSCMANAGERA
, api_svcctl_OpenSCManagerA
},
3185 {"SVCCTL_OPENSERVICEA", DCERPC_SVCCTL_OPENSERVICEA
, api_svcctl_OpenServiceA
},
3186 {"SVCCTL_QUERYSERVICECONFIGA", DCERPC_SVCCTL_QUERYSERVICECONFIGA
, api_svcctl_QueryServiceConfigA
},
3187 {"SVCCTL_QUERYSERVICELOCKSTATUSA", DCERPC_SVCCTL_QUERYSERVICELOCKSTATUSA
, api_svcctl_QueryServiceLockStatusA
},
3188 {"SVCCTL_STARTSERVICEA", DCERPC_SVCCTL_STARTSERVICEA
, api_svcctl_StartServiceA
},
3189 {"SVCCTL_GETSERVICEDISPLAYNAMEA", DCERPC_SVCCTL_GETSERVICEDISPLAYNAMEA
, api_svcctl_GetServiceDisplayNameA
},
3190 {"SVCCTL_GETSERVICEKEYNAMEA", DCERPC_SVCCTL_GETSERVICEKEYNAMEA
, api_svcctl_GetServiceKeyNameA
},
3191 {"SVCCTL_GETCURRENTGROUPESTATEW", DCERPC_SVCCTL_GETCURRENTGROUPESTATEW
, api_svcctl_GetCurrentGroupeStateW
},
3192 {"SVCCTL_ENUMSERVICEGROUPW", DCERPC_SVCCTL_ENUMSERVICEGROUPW
, api_svcctl_EnumServiceGroupW
},
3193 {"SVCCTL_CHANGESERVICECONFIG2A", DCERPC_SVCCTL_CHANGESERVICECONFIG2A
, api_svcctl_ChangeServiceConfig2A
},
3194 {"SVCCTL_CHANGESERVICECONFIG2W", DCERPC_SVCCTL_CHANGESERVICECONFIG2W
, api_svcctl_ChangeServiceConfig2W
},
3195 {"SVCCTL_QUERYSERVICECONFIG2A", DCERPC_SVCCTL_QUERYSERVICECONFIG2A
, api_svcctl_QueryServiceConfig2A
},
3196 {"SVCCTL_QUERYSERVICECONFIG2W", DCERPC_SVCCTL_QUERYSERVICECONFIG2W
, api_svcctl_QueryServiceConfig2W
},
3197 {"SVCCTL_QUERYSERVICESTATUSEX", DCERPC_SVCCTL_QUERYSERVICESTATUSEX
, api_svcctl_QueryServiceStatusEx
},
3198 {"ENUMSERVICESSTATUSEXA", DCERPC_ENUMSERVICESSTATUSEXA
, api_EnumServicesStatusExA
},
3199 {"ENUMSERVICESSTATUSEXW", DCERPC_ENUMSERVICESSTATUSEXW
, api_EnumServicesStatusExW
},
3200 {"SVCCTL_SCSENDTSMESSAGE", DCERPC_SVCCTL_SCSENDTSMESSAGE
, api_svcctl_SCSendTSMessage
},
3203 void svcctl_get_pipe_fns(struct api_struct
**fns
, int *n_fns
)
3205 *fns
= api_svcctl_cmds
;
3206 *n_fns
= sizeof(api_svcctl_cmds
) / sizeof(struct api_struct
);
3209 NTSTATUS
rpc_svcctl_init(void)
3211 return rpc_pipe_register_commands(SMB_RPC_INTERFACE_VERSION
, "svcctl", "svcctl", api_svcctl_cmds
, sizeof(api_svcctl_cmds
) / sizeof(struct api_struct
));