From 66c089acaab90569a0b9597fa320d1b8fc944155 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Wed, 20 Sep 2006 16:32:29 +0000 Subject: r18713: Autogenerate srvsvc and svcctl interfaces (This used to be commit a8aa312b7e597c4fc922a6d1783d5b6d43bceecb) --- source3/librpc/gen_ndr/srv_svcctl.c | 2860 +++++++++++++++++++++++++++++++++++ 1 file changed, 2860 insertions(+) create mode 100644 source3/librpc/gen_ndr/srv_svcctl.c (limited to 'source3/librpc/gen_ndr/srv_svcctl.c') diff --git a/source3/librpc/gen_ndr/srv_svcctl.c b/source3/librpc/gen_ndr/srv_svcctl.c new file mode 100644 index 0000000000..9d2ad44219 --- /dev/null +++ b/source3/librpc/gen_ndr/srv_svcctl.c @@ -0,0 +1,2860 @@ +/* + * Unix SMB/CIFS implementation. + * server auto-generated by pidl. DO NOT MODIFY! + */ + +#include "includes.h" +#include "librpc/gen_ndr/srv_svcctl.h" + +static BOOL api_svcctl_CloseServiceHandle(pipes_struct *p) +{ + struct ndr_pull *pull; + struct ndr_push *push; + NTSTATUS status; + DATA_BLOB blob; + struct svcctl_CloseServiceHandle r; + TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_CloseServiceHandle"); + + if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + pull = ndr_pull_init_blob(&blob, mem_ctx); + if (pull == NULL) + return False; + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + status = ndr_pull_svcctl_CloseServiceHandle(pull, NDR_IN, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + if (DEBUGLEVEL >= 10) + NDR_PRINT_IN_DEBUG(svcctl_CloseServiceHandle, &r); + + ZERO_STRUCT(r.out); + r.out.handle = r.in.handle; + r.out.result = _svcctl_CloseServiceHandle(p, r.in.handle); + + if (DEBUGLEVEL >= 10) + NDR_PRINT_OUT_DEBUG(svcctl_CloseServiceHandle, &r); + + push = ndr_push_init_ctx(mem_ctx); + if (push == NULL) { + talloc_free(mem_ctx); + return False; + } + + status = ndr_push_svcctl_CloseServiceHandle(push, NDR_OUT, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + blob = ndr_push_blob(push); + if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + talloc_free(mem_ctx); + + return True; +} + +static BOOL api_svcctl_ControlService(pipes_struct *p) +{ + struct ndr_pull *pull; + struct ndr_push *push; + NTSTATUS status; + DATA_BLOB blob; + struct svcctl_ControlService r; + TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_ControlService"); + + if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + pull = ndr_pull_init_blob(&blob, mem_ctx); + if (pull == NULL) + return False; + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + status = ndr_pull_svcctl_ControlService(pull, NDR_IN, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + if (DEBUGLEVEL >= 10) + NDR_PRINT_IN_DEBUG(svcctl_ControlService, &r); + + ZERO_STRUCT(r.out); + r.out.status = talloc_zero_size(mem_ctx, sizeof(*r.out.status)); + if (r.out.status == NULL) { + talloc_free(mem_ctx); + return False; + } + + r.out.result = _svcctl_ControlService(p, r.in.handle, r.in.control, r.out.status); + + if (DEBUGLEVEL >= 10) + NDR_PRINT_OUT_DEBUG(svcctl_ControlService, &r); + + push = ndr_push_init_ctx(mem_ctx); + if (push == NULL) { + talloc_free(mem_ctx); + return False; + } + + status = ndr_push_svcctl_ControlService(push, NDR_OUT, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + blob = ndr_push_blob(push); + if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + talloc_free(mem_ctx); + + return True; +} + +static BOOL api_svcctl_DeleteService(pipes_struct *p) +{ + struct ndr_pull *pull; + struct ndr_push *push; + NTSTATUS status; + DATA_BLOB blob; + struct svcctl_DeleteService r; + TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_DeleteService"); + + if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + pull = ndr_pull_init_blob(&blob, mem_ctx); + if (pull == NULL) + return False; + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + status = ndr_pull_svcctl_DeleteService(pull, NDR_IN, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + if (DEBUGLEVEL >= 10) + NDR_PRINT_IN_DEBUG(svcctl_DeleteService, &r); + + r.out.result = _svcctl_DeleteService(p, r.in.handle); + + if (DEBUGLEVEL >= 10) + NDR_PRINT_OUT_DEBUG(svcctl_DeleteService, &r); + + push = ndr_push_init_ctx(mem_ctx); + if (push == NULL) { + talloc_free(mem_ctx); + return False; + } + + status = ndr_push_svcctl_DeleteService(push, NDR_OUT, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + blob = ndr_push_blob(push); + if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + talloc_free(mem_ctx); + + return True; +} + +static BOOL api_svcctl_LockServiceDatabase(pipes_struct *p) +{ + struct ndr_pull *pull; + struct ndr_push *push; + NTSTATUS status; + DATA_BLOB blob; + struct svcctl_LockServiceDatabase r; + TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_LockServiceDatabase"); + + if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + pull = ndr_pull_init_blob(&blob, mem_ctx); + if (pull == NULL) + return False; + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + status = ndr_pull_svcctl_LockServiceDatabase(pull, NDR_IN, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + if (DEBUGLEVEL >= 10) + NDR_PRINT_IN_DEBUG(svcctl_LockServiceDatabase, &r); + + ZERO_STRUCT(r.out); + r.out.lock = talloc_zero_size(mem_ctx, sizeof(*r.out.lock)); + if (r.out.lock == NULL) { + talloc_free(mem_ctx); + return False; + } + + r.out.result = _svcctl_LockServiceDatabase(p, r.in.handle, r.out.lock); + + if (DEBUGLEVEL >= 10) + NDR_PRINT_OUT_DEBUG(svcctl_LockServiceDatabase, &r); + + push = ndr_push_init_ctx(mem_ctx); + if (push == NULL) { + talloc_free(mem_ctx); + return False; + } + + status = ndr_push_svcctl_LockServiceDatabase(push, NDR_OUT, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + blob = ndr_push_blob(push); + if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + talloc_free(mem_ctx); + + return True; +} + +static BOOL api_svcctl_QueryServiceObjectSecurity(pipes_struct *p) +{ + struct ndr_pull *pull; + struct ndr_push *push; + NTSTATUS status; + DATA_BLOB blob; + struct svcctl_QueryServiceObjectSecurity r; + TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_QueryServiceObjectSecurity"); + + if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + pull = ndr_pull_init_blob(&blob, mem_ctx); + if (pull == NULL) + return False; + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + status = ndr_pull_svcctl_QueryServiceObjectSecurity(pull, NDR_IN, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + if (DEBUGLEVEL >= 10) + NDR_PRINT_IN_DEBUG(svcctl_QueryServiceObjectSecurity, &r); + + r.out.result = _svcctl_QueryServiceObjectSecurity(p); + + if (DEBUGLEVEL >= 10) + NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceObjectSecurity, &r); + + push = ndr_push_init_ctx(mem_ctx); + if (push == NULL) { + talloc_free(mem_ctx); + return False; + } + + status = ndr_push_svcctl_QueryServiceObjectSecurity(push, NDR_OUT, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + blob = ndr_push_blob(push); + if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + talloc_free(mem_ctx); + + return True; +} + +static BOOL api_svcctl_SetServiceObjectSecurity(pipes_struct *p) +{ + struct ndr_pull *pull; + struct ndr_push *push; + NTSTATUS status; + DATA_BLOB blob; + struct svcctl_SetServiceObjectSecurity r; + TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_SetServiceObjectSecurity"); + + if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + pull = ndr_pull_init_blob(&blob, mem_ctx); + if (pull == NULL) + return False; + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + status = ndr_pull_svcctl_SetServiceObjectSecurity(pull, NDR_IN, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + if (DEBUGLEVEL >= 10) + NDR_PRINT_IN_DEBUG(svcctl_SetServiceObjectSecurity, &r); + + r.out.result = _svcctl_SetServiceObjectSecurity(p); + + if (DEBUGLEVEL >= 10) + NDR_PRINT_OUT_DEBUG(svcctl_SetServiceObjectSecurity, &r); + + push = ndr_push_init_ctx(mem_ctx); + if (push == NULL) { + talloc_free(mem_ctx); + return False; + } + + status = ndr_push_svcctl_SetServiceObjectSecurity(push, NDR_OUT, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + blob = ndr_push_blob(push); + if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + talloc_free(mem_ctx); + + return True; +} + +static BOOL api_svcctl_QueryServiceStatus(pipes_struct *p) +{ + struct ndr_pull *pull; + struct ndr_push *push; + NTSTATUS status; + DATA_BLOB blob; + struct svcctl_QueryServiceStatus r; + TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_QueryServiceStatus"); + + if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + pull = ndr_pull_init_blob(&blob, mem_ctx); + if (pull == NULL) + return False; + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + status = ndr_pull_svcctl_QueryServiceStatus(pull, NDR_IN, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + if (DEBUGLEVEL >= 10) + NDR_PRINT_IN_DEBUG(svcctl_QueryServiceStatus, &r); + + ZERO_STRUCT(r.out); + r.out.status = talloc_zero_size(mem_ctx, sizeof(*r.out.status)); + if (r.out.status == NULL) { + talloc_free(mem_ctx); + return False; + } + + r.out.result = _svcctl_QueryServiceStatus(p, r.in.handle, r.out.status); + + if (DEBUGLEVEL >= 10) + NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceStatus, &r); + + push = ndr_push_init_ctx(mem_ctx); + if (push == NULL) { + talloc_free(mem_ctx); + return False; + } + + status = ndr_push_svcctl_QueryServiceStatus(push, NDR_OUT, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + blob = ndr_push_blob(push); + if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + talloc_free(mem_ctx); + + return True; +} + +static BOOL api_svcctl_SetServiceStatus(pipes_struct *p) +{ + struct ndr_pull *pull; + struct ndr_push *push; + NTSTATUS status; + DATA_BLOB blob; + struct svcctl_SetServiceStatus r; + TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_SetServiceStatus"); + + if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + pull = ndr_pull_init_blob(&blob, mem_ctx); + if (pull == NULL) + return False; + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + status = ndr_pull_svcctl_SetServiceStatus(pull, NDR_IN, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + if (DEBUGLEVEL >= 10) + NDR_PRINT_IN_DEBUG(svcctl_SetServiceStatus, &r); + + r.out.result = _svcctl_SetServiceStatus(p); + + if (DEBUGLEVEL >= 10) + NDR_PRINT_OUT_DEBUG(svcctl_SetServiceStatus, &r); + + push = ndr_push_init_ctx(mem_ctx); + if (push == NULL) { + talloc_free(mem_ctx); + return False; + } + + status = ndr_push_svcctl_SetServiceStatus(push, NDR_OUT, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + blob = ndr_push_blob(push); + if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + talloc_free(mem_ctx); + + return True; +} + +static BOOL api_svcctl_UnlockServiceDatabase(pipes_struct *p) +{ + struct ndr_pull *pull; + struct ndr_push *push; + NTSTATUS status; + DATA_BLOB blob; + struct svcctl_UnlockServiceDatabase r; + TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_UnlockServiceDatabase"); + + if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + pull = ndr_pull_init_blob(&blob, mem_ctx); + if (pull == NULL) + return False; + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + status = ndr_pull_svcctl_UnlockServiceDatabase(pull, NDR_IN, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + if (DEBUGLEVEL >= 10) + NDR_PRINT_IN_DEBUG(svcctl_UnlockServiceDatabase, &r); + + ZERO_STRUCT(r.out); + r.out.lock = r.in.lock; + r.out.result = _svcctl_UnlockServiceDatabase(p, r.in.lock); + + if (DEBUGLEVEL >= 10) + NDR_PRINT_OUT_DEBUG(svcctl_UnlockServiceDatabase, &r); + + push = ndr_push_init_ctx(mem_ctx); + if (push == NULL) { + talloc_free(mem_ctx); + return False; + } + + status = ndr_push_svcctl_UnlockServiceDatabase(push, NDR_OUT, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + blob = ndr_push_blob(push); + if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + talloc_free(mem_ctx); + + return True; +} + +static BOOL api_svcctl_NotifyBootConfigStatus(pipes_struct *p) +{ + struct ndr_pull *pull; + struct ndr_push *push; + NTSTATUS status; + DATA_BLOB blob; + struct svcctl_NotifyBootConfigStatus r; + TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_NotifyBootConfigStatus"); + + if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + pull = ndr_pull_init_blob(&blob, mem_ctx); + if (pull == NULL) + return False; + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + status = ndr_pull_svcctl_NotifyBootConfigStatus(pull, NDR_IN, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + if (DEBUGLEVEL >= 10) + NDR_PRINT_IN_DEBUG(svcctl_NotifyBootConfigStatus, &r); + + r.out.result = _svcctl_NotifyBootConfigStatus(p); + + if (DEBUGLEVEL >= 10) + NDR_PRINT_OUT_DEBUG(svcctl_NotifyBootConfigStatus, &r); + + push = ndr_push_init_ctx(mem_ctx); + if (push == NULL) { + talloc_free(mem_ctx); + return False; + } + + status = ndr_push_svcctl_NotifyBootConfigStatus(push, NDR_OUT, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + blob = ndr_push_blob(push); + if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + talloc_free(mem_ctx); + + return True; +} + +static BOOL api_svcctl_SCSetServiceBitsW(pipes_struct *p) +{ + struct ndr_pull *pull; + struct ndr_push *push; + NTSTATUS status; + DATA_BLOB blob; + struct svcctl_SCSetServiceBitsW r; + TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_SCSetServiceBitsW"); + + if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + pull = ndr_pull_init_blob(&blob, mem_ctx); + if (pull == NULL) + return False; + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + status = ndr_pull_svcctl_SCSetServiceBitsW(pull, NDR_IN, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + if (DEBUGLEVEL >= 10) + NDR_PRINT_IN_DEBUG(svcctl_SCSetServiceBitsW, &r); + + r.out.result = _svcctl_SCSetServiceBitsW(p, r.in.handle, r.in.bits, r.in.bitson, r.in.immediate); + + if (DEBUGLEVEL >= 10) + NDR_PRINT_OUT_DEBUG(svcctl_SCSetServiceBitsW, &r); + + push = ndr_push_init_ctx(mem_ctx); + if (push == NULL) { + talloc_free(mem_ctx); + return False; + } + + status = ndr_push_svcctl_SCSetServiceBitsW(push, NDR_OUT, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + blob = ndr_push_blob(push); + if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + talloc_free(mem_ctx); + + return True; +} + +static BOOL api_svcctl_ChangeServiceConfigW(pipes_struct *p) +{ + struct ndr_pull *pull; + struct ndr_push *push; + NTSTATUS status; + DATA_BLOB blob; + struct svcctl_ChangeServiceConfigW r; + TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_ChangeServiceConfigW"); + + if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + pull = ndr_pull_init_blob(&blob, mem_ctx); + if (pull == NULL) + return False; + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + status = ndr_pull_svcctl_ChangeServiceConfigW(pull, NDR_IN, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + if (DEBUGLEVEL >= 10) + NDR_PRINT_IN_DEBUG(svcctl_ChangeServiceConfigW, &r); + + ZERO_STRUCT(r.out); + r.out.tag_id = talloc_zero_size(mem_ctx, sizeof(*r.out.tag_id)); + if (r.out.tag_id == NULL) { + talloc_free(mem_ctx); + return False; + } + + r.out.result = _svcctl_ChangeServiceConfigW(p, r.in.handle, r.in.type, r.in.start, r.in.error, r.in.binary_path, r.in.load_order_group, r.out.tag_id, r.in.dependencies, r.in.service_start_name, r.in.password, r.in.display_name); + + if (DEBUGLEVEL >= 10) + NDR_PRINT_OUT_DEBUG(svcctl_ChangeServiceConfigW, &r); + + push = ndr_push_init_ctx(mem_ctx); + if (push == NULL) { + talloc_free(mem_ctx); + return False; + } + + status = ndr_push_svcctl_ChangeServiceConfigW(push, NDR_OUT, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + blob = ndr_push_blob(push); + if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + talloc_free(mem_ctx); + + return True; +} + +static BOOL api_svcctl_CreateServiceW(pipes_struct *p) +{ + struct ndr_pull *pull; + struct ndr_push *push; + NTSTATUS status; + DATA_BLOB blob; + struct svcctl_CreateServiceW r; + TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_CreateServiceW"); + + if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + pull = ndr_pull_init_blob(&blob, mem_ctx); + if (pull == NULL) + return False; + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + status = ndr_pull_svcctl_CreateServiceW(pull, NDR_IN, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + if (DEBUGLEVEL >= 10) + NDR_PRINT_IN_DEBUG(svcctl_CreateServiceW, &r); + + ZERO_STRUCT(r.out); + r.out.TagId = r.in.TagId; + r.out.handle = talloc_zero_size(mem_ctx, sizeof(*r.out.handle)); + if (r.out.handle == NULL) { + talloc_free(mem_ctx); + return False; + } + + r.out.result = _svcctl_CreateServiceW(p, r.in.scmanager_handle, r.in.ServiceName, r.in.DisplayName, r.in.desired_access, r.in.type, r.in.start_type, r.in.error_control, r.in.binary_path, r.in.LoadOrderGroupKey, r.in.TagId, r.in.dependencies, r.in.dependencies_size, r.in.service_start_name, r.in.password, r.in.password_size, r.out.handle); + + if (DEBUGLEVEL >= 10) + NDR_PRINT_OUT_DEBUG(svcctl_CreateServiceW, &r); + + push = ndr_push_init_ctx(mem_ctx); + if (push == NULL) { + talloc_free(mem_ctx); + return False; + } + + status = ndr_push_svcctl_CreateServiceW(push, NDR_OUT, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + blob = ndr_push_blob(push); + if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + talloc_free(mem_ctx); + + return True; +} + +static BOOL api_svcctl_EnumDependentServicesW(pipes_struct *p) +{ + struct ndr_pull *pull; + struct ndr_push *push; + NTSTATUS status; + DATA_BLOB blob; + struct svcctl_EnumDependentServicesW r; + TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_EnumDependentServicesW"); + + if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + pull = ndr_pull_init_blob(&blob, mem_ctx); + if (pull == NULL) + return False; + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + status = ndr_pull_svcctl_EnumDependentServicesW(pull, NDR_IN, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + if (DEBUGLEVEL >= 10) + NDR_PRINT_IN_DEBUG(svcctl_EnumDependentServicesW, &r); + + ZERO_STRUCT(r.out); + r.out.status = talloc_zero_size(mem_ctx, sizeof(*r.out.status)); + if (r.out.status == NULL) { + talloc_free(mem_ctx); + return False; + } + + r.out.bytes_needed = talloc_zero_size(mem_ctx, sizeof(*r.out.bytes_needed)); + if (r.out.bytes_needed == NULL) { + talloc_free(mem_ctx); + return False; + } + + r.out.services_returned = talloc_zero_size(mem_ctx, sizeof(*r.out.services_returned)); + if (r.out.services_returned == NULL) { + talloc_free(mem_ctx); + return False; + } + + r.out.result = _svcctl_EnumDependentServicesW(p, r.in.service, r.in.state, r.out.status, r.in.buf_size, r.out.bytes_needed, r.out.services_returned); + + if (DEBUGLEVEL >= 10) + NDR_PRINT_OUT_DEBUG(svcctl_EnumDependentServicesW, &r); + + push = ndr_push_init_ctx(mem_ctx); + if (push == NULL) { + talloc_free(mem_ctx); + return False; + } + + status = ndr_push_svcctl_EnumDependentServicesW(push, NDR_OUT, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + blob = ndr_push_blob(push); + if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + talloc_free(mem_ctx); + + return True; +} + +static BOOL api_svcctl_EnumServicesStatusW(pipes_struct *p) +{ + struct ndr_pull *pull; + struct ndr_push *push; + NTSTATUS status; + DATA_BLOB blob; + struct svcctl_EnumServicesStatusW r; + TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_EnumServicesStatusW"); + + if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + pull = ndr_pull_init_blob(&blob, mem_ctx); + if (pull == NULL) + return False; + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + status = ndr_pull_svcctl_EnumServicesStatusW(pull, NDR_IN, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + if (DEBUGLEVEL >= 10) + NDR_PRINT_IN_DEBUG(svcctl_EnumServicesStatusW, &r); + + ZERO_STRUCT(r.out); + r.out.service = talloc_zero_size(mem_ctx, sizeof(*r.out.service) * r.in.buf_size); + if (r.out.service == NULL) { + talloc_free(mem_ctx); + return False; + } + + r.out.bytes_needed = talloc_zero_size(mem_ctx, sizeof(*r.out.bytes_needed)); + if (r.out.bytes_needed == NULL) { + talloc_free(mem_ctx); + return False; + } + + r.out.services_returned = talloc_zero_size(mem_ctx, sizeof(*r.out.services_returned)); + if (r.out.services_returned == NULL) { + talloc_free(mem_ctx); + return False; + } + + r.out.resume_handle = r.in.resume_handle; + r.out.result = _svcctl_EnumServicesStatusW(p, r.in.handle, r.in.type, r.in.state, r.in.buf_size, r.out.service, r.out.bytes_needed, r.out.services_returned, r.in.resume_handle); + + if (DEBUGLEVEL >= 10) + NDR_PRINT_OUT_DEBUG(svcctl_EnumServicesStatusW, &r); + + push = ndr_push_init_ctx(mem_ctx); + if (push == NULL) { + talloc_free(mem_ctx); + return False; + } + + status = ndr_push_svcctl_EnumServicesStatusW(push, NDR_OUT, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + blob = ndr_push_blob(push); + if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + talloc_free(mem_ctx); + + return True; +} + +static BOOL api_svcctl_OpenSCManagerW(pipes_struct *p) +{ + struct ndr_pull *pull; + struct ndr_push *push; + NTSTATUS status; + DATA_BLOB blob; + struct svcctl_OpenSCManagerW r; + TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_OpenSCManagerW"); + + if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + pull = ndr_pull_init_blob(&blob, mem_ctx); + if (pull == NULL) + return False; + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + status = ndr_pull_svcctl_OpenSCManagerW(pull, NDR_IN, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + if (DEBUGLEVEL >= 10) + NDR_PRINT_IN_DEBUG(svcctl_OpenSCManagerW, &r); + + ZERO_STRUCT(r.out); + r.out.handle = talloc_zero_size(mem_ctx, sizeof(*r.out.handle)); + if (r.out.handle == NULL) { + talloc_free(mem_ctx); + return False; + } + + r.out.result = _svcctl_OpenSCManagerW(p, r.in.MachineName, r.in.DatabaseName, r.in.access_mask, r.out.handle); + + if (DEBUGLEVEL >= 10) + NDR_PRINT_OUT_DEBUG(svcctl_OpenSCManagerW, &r); + + push = ndr_push_init_ctx(mem_ctx); + if (push == NULL) { + talloc_free(mem_ctx); + return False; + } + + status = ndr_push_svcctl_OpenSCManagerW(push, NDR_OUT, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + blob = ndr_push_blob(push); + if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + talloc_free(mem_ctx); + + return True; +} + +static BOOL api_svcctl_OpenServiceW(pipes_struct *p) +{ + struct ndr_pull *pull; + struct ndr_push *push; + NTSTATUS status; + DATA_BLOB blob; + struct svcctl_OpenServiceW r; + TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_OpenServiceW"); + + if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + pull = ndr_pull_init_blob(&blob, mem_ctx); + if (pull == NULL) + return False; + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + status = ndr_pull_svcctl_OpenServiceW(pull, NDR_IN, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + if (DEBUGLEVEL >= 10) + NDR_PRINT_IN_DEBUG(svcctl_OpenServiceW, &r); + + ZERO_STRUCT(r.out); + r.out.handle = talloc_zero_size(mem_ctx, sizeof(*r.out.handle)); + if (r.out.handle == NULL) { + talloc_free(mem_ctx); + return False; + } + + r.out.result = _svcctl_OpenServiceW(p, r.in.scmanager_handle, r.in.ServiceName, r.in.access_mask, r.out.handle); + + if (DEBUGLEVEL >= 10) + NDR_PRINT_OUT_DEBUG(svcctl_OpenServiceW, &r); + + push = ndr_push_init_ctx(mem_ctx); + if (push == NULL) { + talloc_free(mem_ctx); + return False; + } + + status = ndr_push_svcctl_OpenServiceW(push, NDR_OUT, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + blob = ndr_push_blob(push); + if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + talloc_free(mem_ctx); + + return True; +} + +static BOOL api_svcctl_QueryServiceConfigW(pipes_struct *p) +{ + struct ndr_pull *pull; + struct ndr_push *push; + NTSTATUS status; + DATA_BLOB blob; + struct svcctl_QueryServiceConfigW r; + TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_QueryServiceConfigW"); + + if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + pull = ndr_pull_init_blob(&blob, mem_ctx); + if (pull == NULL) + return False; + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + status = ndr_pull_svcctl_QueryServiceConfigW(pull, NDR_IN, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + if (DEBUGLEVEL >= 10) + NDR_PRINT_IN_DEBUG(svcctl_QueryServiceConfigW, &r); + + ZERO_STRUCT(r.out); + r.out.query = talloc_zero_size(mem_ctx, sizeof(*r.out.query) * r.in.buf_size); + if (r.out.query == NULL) { + talloc_free(mem_ctx); + return False; + } + + r.out.bytes_needed = talloc_zero_size(mem_ctx, sizeof(*r.out.bytes_needed)); + if (r.out.bytes_needed == NULL) { + talloc_free(mem_ctx); + return False; + } + + r.out.result = _svcctl_QueryServiceConfigW(p, r.in.handle, r.out.query, r.in.buf_size, r.out.bytes_needed); + + if (DEBUGLEVEL >= 10) + NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceConfigW, &r); + + push = ndr_push_init_ctx(mem_ctx); + if (push == NULL) { + talloc_free(mem_ctx); + return False; + } + + status = ndr_push_svcctl_QueryServiceConfigW(push, NDR_OUT, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + blob = ndr_push_blob(push); + if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + talloc_free(mem_ctx); + + return True; +} + +static BOOL api_svcctl_QueryServiceLockStatusW(pipes_struct *p) +{ + struct ndr_pull *pull; + struct ndr_push *push; + NTSTATUS status; + DATA_BLOB blob; + struct svcctl_QueryServiceLockStatusW r; + TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_QueryServiceLockStatusW"); + + if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + pull = ndr_pull_init_blob(&blob, mem_ctx); + if (pull == NULL) + return False; + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + status = ndr_pull_svcctl_QueryServiceLockStatusW(pull, NDR_IN, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + if (DEBUGLEVEL >= 10) + NDR_PRINT_IN_DEBUG(svcctl_QueryServiceLockStatusW, &r); + + ZERO_STRUCT(r.out); + r.out.status = talloc_zero_size(mem_ctx, sizeof(*r.out.status)); + if (r.out.status == NULL) { + talloc_free(mem_ctx); + return False; + } + + r.out.required_buf_size = talloc_zero_size(mem_ctx, sizeof(*r.out.required_buf_size)); + if (r.out.required_buf_size == NULL) { + talloc_free(mem_ctx); + return False; + } + + r.out.result = _svcctl_QueryServiceLockStatusW(p, r.in.handle, r.in.buf_size, r.out.status, r.out.required_buf_size); + + if (DEBUGLEVEL >= 10) + NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceLockStatusW, &r); + + push = ndr_push_init_ctx(mem_ctx); + if (push == NULL) { + talloc_free(mem_ctx); + return False; + } + + status = ndr_push_svcctl_QueryServiceLockStatusW(push, NDR_OUT, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + blob = ndr_push_blob(push); + if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + talloc_free(mem_ctx); + + return True; +} + +static BOOL api_svcctl_StartServiceW(pipes_struct *p) +{ + struct ndr_pull *pull; + struct ndr_push *push; + NTSTATUS status; + DATA_BLOB blob; + struct svcctl_StartServiceW r; + TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_StartServiceW"); + + if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + pull = ndr_pull_init_blob(&blob, mem_ctx); + if (pull == NULL) + return False; + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + status = ndr_pull_svcctl_StartServiceW(pull, NDR_IN, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + if (DEBUGLEVEL >= 10) + NDR_PRINT_IN_DEBUG(svcctl_StartServiceW, &r); + + r.out.result = _svcctl_StartServiceW(p, r.in.handle, r.in.NumArgs, r.in.Arguments); + + if (DEBUGLEVEL >= 10) + NDR_PRINT_OUT_DEBUG(svcctl_StartServiceW, &r); + + push = ndr_push_init_ctx(mem_ctx); + if (push == NULL) { + talloc_free(mem_ctx); + return False; + } + + status = ndr_push_svcctl_StartServiceW(push, NDR_OUT, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + blob = ndr_push_blob(push); + if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + talloc_free(mem_ctx); + + return True; +} + +static BOOL api_svcctl_GetServiceDisplayNameW(pipes_struct *p) +{ + struct ndr_pull *pull; + struct ndr_push *push; + NTSTATUS status; + DATA_BLOB blob; + struct svcctl_GetServiceDisplayNameW r; + TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_GetServiceDisplayNameW"); + + if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + pull = ndr_pull_init_blob(&blob, mem_ctx); + if (pull == NULL) + return False; + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + status = ndr_pull_svcctl_GetServiceDisplayNameW(pull, NDR_IN, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + if (DEBUGLEVEL >= 10) + NDR_PRINT_IN_DEBUG(svcctl_GetServiceDisplayNameW, &r); + + ZERO_STRUCT(r.out); + r.out.display_name = talloc_zero_size(mem_ctx, sizeof(*r.out.display_name)); + if (r.out.display_name == NULL) { + talloc_free(mem_ctx); + return False; + } + + r.out.display_name_length = r.in.display_name_length; + r.out.result = _svcctl_GetServiceDisplayNameW(p, r.in.handle, r.in.service_name, r.out.display_name, r.in.display_name_length); + + if (DEBUGLEVEL >= 10) + NDR_PRINT_OUT_DEBUG(svcctl_GetServiceDisplayNameW, &r); + + push = ndr_push_init_ctx(mem_ctx); + if (push == NULL) { + talloc_free(mem_ctx); + return False; + } + + status = ndr_push_svcctl_GetServiceDisplayNameW(push, NDR_OUT, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + blob = ndr_push_blob(push); + if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + talloc_free(mem_ctx); + + return True; +} + +static BOOL api_svcctl_GetServiceKeyNameW(pipes_struct *p) +{ + struct ndr_pull *pull; + struct ndr_push *push; + NTSTATUS status; + DATA_BLOB blob; + struct svcctl_GetServiceKeyNameW r; + TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_GetServiceKeyNameW"); + + if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + pull = ndr_pull_init_blob(&blob, mem_ctx); + if (pull == NULL) + return False; + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + status = ndr_pull_svcctl_GetServiceKeyNameW(pull, NDR_IN, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + if (DEBUGLEVEL >= 10) + NDR_PRINT_IN_DEBUG(svcctl_GetServiceKeyNameW, &r); + + ZERO_STRUCT(r.out); + r.out.key_name = talloc_zero_size(mem_ctx, sizeof(*r.out.key_name)); + if (r.out.key_name == NULL) { + talloc_free(mem_ctx); + return False; + } + + r.out.display_name_length = r.in.display_name_length; + r.out.result = _svcctl_GetServiceKeyNameW(p, r.in.handle, r.in.service_name, r.out.key_name, r.in.display_name_length); + + if (DEBUGLEVEL >= 10) + NDR_PRINT_OUT_DEBUG(svcctl_GetServiceKeyNameW, &r); + + push = ndr_push_init_ctx(mem_ctx); + if (push == NULL) { + talloc_free(mem_ctx); + return False; + } + + status = ndr_push_svcctl_GetServiceKeyNameW(push, NDR_OUT, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + blob = ndr_push_blob(push); + if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + talloc_free(mem_ctx); + + return True; +} + +static BOOL api_svcctl_SCSetServiceBitsA(pipes_struct *p) +{ + struct ndr_pull *pull; + struct ndr_push *push; + NTSTATUS status; + DATA_BLOB blob; + struct svcctl_SCSetServiceBitsA r; + TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_SCSetServiceBitsA"); + + if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + pull = ndr_pull_init_blob(&blob, mem_ctx); + if (pull == NULL) + return False; + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + status = ndr_pull_svcctl_SCSetServiceBitsA(pull, NDR_IN, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + if (DEBUGLEVEL >= 10) + NDR_PRINT_IN_DEBUG(svcctl_SCSetServiceBitsA, &r); + + r.out.result = _svcctl_SCSetServiceBitsA(p, r.in.handle, r.in.bits, r.in.bitson, r.in.immediate); + + if (DEBUGLEVEL >= 10) + NDR_PRINT_OUT_DEBUG(svcctl_SCSetServiceBitsA, &r); + + push = ndr_push_init_ctx(mem_ctx); + if (push == NULL) { + talloc_free(mem_ctx); + return False; + } + + status = ndr_push_svcctl_SCSetServiceBitsA(push, NDR_OUT, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + blob = ndr_push_blob(push); + if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + talloc_free(mem_ctx); + + return True; +} + +static BOOL api_svcctl_ChangeServiceConfigA(pipes_struct *p) +{ + struct ndr_pull *pull; + struct ndr_push *push; + NTSTATUS status; + DATA_BLOB blob; + struct svcctl_ChangeServiceConfigA r; + TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_ChangeServiceConfigA"); + + if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + pull = ndr_pull_init_blob(&blob, mem_ctx); + if (pull == NULL) + return False; + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + status = ndr_pull_svcctl_ChangeServiceConfigA(pull, NDR_IN, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + if (DEBUGLEVEL >= 10) + NDR_PRINT_IN_DEBUG(svcctl_ChangeServiceConfigA, &r); + + ZERO_STRUCT(r.out); + r.out.tag_id = talloc_zero_size(mem_ctx, sizeof(*r.out.tag_id)); + if (r.out.tag_id == NULL) { + talloc_free(mem_ctx); + return False; + } + + r.out.result = _svcctl_ChangeServiceConfigA(p, r.in.handle, r.in.type, r.in.start, r.in.error, r.in.binary_path, r.in.load_order_group, r.out.tag_id, r.in.dependencies, r.in.service_start_name, r.in.password, r.in.display_name); + + if (DEBUGLEVEL >= 10) + NDR_PRINT_OUT_DEBUG(svcctl_ChangeServiceConfigA, &r); + + push = ndr_push_init_ctx(mem_ctx); + if (push == NULL) { + talloc_free(mem_ctx); + return False; + } + + status = ndr_push_svcctl_ChangeServiceConfigA(push, NDR_OUT, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + blob = ndr_push_blob(push); + if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + talloc_free(mem_ctx); + + return True; +} + +static BOOL api_svcctl_CreateServiceA(pipes_struct *p) +{ + struct ndr_pull *pull; + struct ndr_push *push; + NTSTATUS status; + DATA_BLOB blob; + struct svcctl_CreateServiceA r; + TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_CreateServiceA"); + + if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + pull = ndr_pull_init_blob(&blob, mem_ctx); + if (pull == NULL) + return False; + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + status = ndr_pull_svcctl_CreateServiceA(pull, NDR_IN, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + if (DEBUGLEVEL >= 10) + NDR_PRINT_IN_DEBUG(svcctl_CreateServiceA, &r); + + ZERO_STRUCT(r.out); + r.out.TagId = talloc_zero_size(mem_ctx, sizeof(*r.out.TagId)); + if (r.out.TagId == NULL) { + talloc_free(mem_ctx); + return False; + } + + r.out.result = _svcctl_CreateServiceA(p, r.in.handle, r.in.ServiceName, r.in.DisplayName, r.in.desired_access, r.in.type, r.in.start_type, r.in.error_control, r.in.binary_path, r.in.LoadOrderGroupKey, r.out.TagId, r.in.dependencies, r.in.service_start_name, r.in.password); + + if (DEBUGLEVEL >= 10) + NDR_PRINT_OUT_DEBUG(svcctl_CreateServiceA, &r); + + push = ndr_push_init_ctx(mem_ctx); + if (push == NULL) { + talloc_free(mem_ctx); + return False; + } + + status = ndr_push_svcctl_CreateServiceA(push, NDR_OUT, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + blob = ndr_push_blob(push); + if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + talloc_free(mem_ctx); + + return True; +} + +static BOOL api_svcctl_EnumDependentServicesA(pipes_struct *p) +{ + struct ndr_pull *pull; + struct ndr_push *push; + NTSTATUS status; + DATA_BLOB blob; + struct svcctl_EnumDependentServicesA r; + TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_EnumDependentServicesA"); + + if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + pull = ndr_pull_init_blob(&blob, mem_ctx); + if (pull == NULL) + return False; + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + status = ndr_pull_svcctl_EnumDependentServicesA(pull, NDR_IN, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + if (DEBUGLEVEL >= 10) + NDR_PRINT_IN_DEBUG(svcctl_EnumDependentServicesA, &r); + + ZERO_STRUCT(r.out); + r.out.status = talloc_zero_size(mem_ctx, sizeof(*r.out.status)); + if (r.out.status == NULL) { + talloc_free(mem_ctx); + return False; + } + + r.out.bytes_needed = talloc_zero_size(mem_ctx, sizeof(*r.out.bytes_needed)); + if (r.out.bytes_needed == NULL) { + talloc_free(mem_ctx); + return False; + } + + r.out.services_returned = talloc_zero_size(mem_ctx, sizeof(*r.out.services_returned)); + if (r.out.services_returned == NULL) { + talloc_free(mem_ctx); + return False; + } + + r.out.result = _svcctl_EnumDependentServicesA(p, r.in.service, r.in.state, r.out.status, r.in.buf_size, r.out.bytes_needed, r.out.services_returned); + + if (DEBUGLEVEL >= 10) + NDR_PRINT_OUT_DEBUG(svcctl_EnumDependentServicesA, &r); + + push = ndr_push_init_ctx(mem_ctx); + if (push == NULL) { + talloc_free(mem_ctx); + return False; + } + + status = ndr_push_svcctl_EnumDependentServicesA(push, NDR_OUT, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + blob = ndr_push_blob(push); + if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + talloc_free(mem_ctx); + + return True; +} + +static BOOL api_svcctl_EnumServicesStatusA(pipes_struct *p) +{ + struct ndr_pull *pull; + struct ndr_push *push; + NTSTATUS status; + DATA_BLOB blob; + struct svcctl_EnumServicesStatusA r; + TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_EnumServicesStatusA"); + + if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + pull = ndr_pull_init_blob(&blob, mem_ctx); + if (pull == NULL) + return False; + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + status = ndr_pull_svcctl_EnumServicesStatusA(pull, NDR_IN, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + if (DEBUGLEVEL >= 10) + NDR_PRINT_IN_DEBUG(svcctl_EnumServicesStatusA, &r); + + ZERO_STRUCT(r.out); + r.out.service = talloc_zero_size(mem_ctx, sizeof(*r.out.service) * r.in.buf_size); + if (r.out.service == NULL) { + talloc_free(mem_ctx); + return False; + } + + r.out.bytes_needed = talloc_zero_size(mem_ctx, sizeof(*r.out.bytes_needed)); + if (r.out.bytes_needed == NULL) { + talloc_free(mem_ctx); + return False; + } + + r.out.services_returned = talloc_zero_size(mem_ctx, sizeof(*r.out.services_returned)); + if (r.out.services_returned == NULL) { + talloc_free(mem_ctx); + return False; + } + + r.out.resume_handle = r.in.resume_handle; + r.out.result = _svcctl_EnumServicesStatusA(p, r.in.handle, r.in.type, r.in.state, r.in.buf_size, r.out.service, r.out.bytes_needed, r.out.services_returned, r.in.resume_handle); + + if (DEBUGLEVEL >= 10) + NDR_PRINT_OUT_DEBUG(svcctl_EnumServicesStatusA, &r); + + push = ndr_push_init_ctx(mem_ctx); + if (push == NULL) { + talloc_free(mem_ctx); + return False; + } + + status = ndr_push_svcctl_EnumServicesStatusA(push, NDR_OUT, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + blob = ndr_push_blob(push); + if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + talloc_free(mem_ctx); + + return True; +} + +static BOOL api_svcctl_OpenSCManagerA(pipes_struct *p) +{ + struct ndr_pull *pull; + struct ndr_push *push; + NTSTATUS status; + DATA_BLOB blob; + struct svcctl_OpenSCManagerA r; + TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_OpenSCManagerA"); + + if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + pull = ndr_pull_init_blob(&blob, mem_ctx); + if (pull == NULL) + return False; + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + status = ndr_pull_svcctl_OpenSCManagerA(pull, NDR_IN, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + if (DEBUGLEVEL >= 10) + NDR_PRINT_IN_DEBUG(svcctl_OpenSCManagerA, &r); + + ZERO_STRUCT(r.out); + r.out.handle = talloc_zero_size(mem_ctx, sizeof(*r.out.handle)); + if (r.out.handle == NULL) { + talloc_free(mem_ctx); + return False; + } + + r.out.result = _svcctl_OpenSCManagerA(p, r.in.MachineName, r.in.DatabaseName, r.in.access_mask, r.out.handle); + + if (DEBUGLEVEL >= 10) + NDR_PRINT_OUT_DEBUG(svcctl_OpenSCManagerA, &r); + + push = ndr_push_init_ctx(mem_ctx); + if (push == NULL) { + talloc_free(mem_ctx); + return False; + } + + status = ndr_push_svcctl_OpenSCManagerA(push, NDR_OUT, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + blob = ndr_push_blob(push); + if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + talloc_free(mem_ctx); + + return True; +} + +static BOOL api_svcctl_OpenServiceA(pipes_struct *p) +{ + struct ndr_pull *pull; + struct ndr_push *push; + NTSTATUS status; + DATA_BLOB blob; + struct svcctl_OpenServiceA r; + TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_OpenServiceA"); + + if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + pull = ndr_pull_init_blob(&blob, mem_ctx); + if (pull == NULL) + return False; + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + status = ndr_pull_svcctl_OpenServiceA(pull, NDR_IN, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + if (DEBUGLEVEL >= 10) + NDR_PRINT_IN_DEBUG(svcctl_OpenServiceA, &r); + + r.out.result = _svcctl_OpenServiceA(p, r.in.scmanager_handle, r.in.ServiceName, r.in.access_mask); + + if (DEBUGLEVEL >= 10) + NDR_PRINT_OUT_DEBUG(svcctl_OpenServiceA, &r); + + push = ndr_push_init_ctx(mem_ctx); + if (push == NULL) { + talloc_free(mem_ctx); + return False; + } + + status = ndr_push_svcctl_OpenServiceA(push, NDR_OUT, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + blob = ndr_push_blob(push); + if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + talloc_free(mem_ctx); + + return True; +} + +static BOOL api_svcctl_QueryServiceConfigA(pipes_struct *p) +{ + struct ndr_pull *pull; + struct ndr_push *push; + NTSTATUS status; + DATA_BLOB blob; + struct svcctl_QueryServiceConfigA r; + TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_QueryServiceConfigA"); + + if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + pull = ndr_pull_init_blob(&blob, mem_ctx); + if (pull == NULL) + return False; + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + status = ndr_pull_svcctl_QueryServiceConfigA(pull, NDR_IN, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + if (DEBUGLEVEL >= 10) + NDR_PRINT_IN_DEBUG(svcctl_QueryServiceConfigA, &r); + + ZERO_STRUCT(r.out); + r.out.query = talloc_zero_size(mem_ctx, sizeof(*r.out.query) * r.in.buf_size); + if (r.out.query == NULL) { + talloc_free(mem_ctx); + return False; + } + + r.out.bytes_needed = talloc_zero_size(mem_ctx, sizeof(*r.out.bytes_needed)); + if (r.out.bytes_needed == NULL) { + talloc_free(mem_ctx); + return False; + } + + r.out.result = _svcctl_QueryServiceConfigA(p, r.in.handle, r.out.query, r.in.buf_size, r.out.bytes_needed); + + if (DEBUGLEVEL >= 10) + NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceConfigA, &r); + + push = ndr_push_init_ctx(mem_ctx); + if (push == NULL) { + talloc_free(mem_ctx); + return False; + } + + status = ndr_push_svcctl_QueryServiceConfigA(push, NDR_OUT, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + blob = ndr_push_blob(push); + if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + talloc_free(mem_ctx); + + return True; +} + +static BOOL api_svcctl_QueryServiceLockStatusA(pipes_struct *p) +{ + struct ndr_pull *pull; + struct ndr_push *push; + NTSTATUS status; + DATA_BLOB blob; + struct svcctl_QueryServiceLockStatusA r; + TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_QueryServiceLockStatusA"); + + if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + pull = ndr_pull_init_blob(&blob, mem_ctx); + if (pull == NULL) + return False; + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + status = ndr_pull_svcctl_QueryServiceLockStatusA(pull, NDR_IN, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + if (DEBUGLEVEL >= 10) + NDR_PRINT_IN_DEBUG(svcctl_QueryServiceLockStatusA, &r); + + ZERO_STRUCT(r.out); + r.out.status = talloc_zero_size(mem_ctx, sizeof(*r.out.status)); + if (r.out.status == NULL) { + talloc_free(mem_ctx); + return False; + } + + r.out.required_buf_size = talloc_zero_size(mem_ctx, sizeof(*r.out.required_buf_size)); + if (r.out.required_buf_size == NULL) { + talloc_free(mem_ctx); + return False; + } + + r.out.result = _svcctl_QueryServiceLockStatusA(p, r.in.handle, r.in.buf_size, r.out.status, r.out.required_buf_size); + + if (DEBUGLEVEL >= 10) + NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceLockStatusA, &r); + + push = ndr_push_init_ctx(mem_ctx); + if (push == NULL) { + talloc_free(mem_ctx); + return False; + } + + status = ndr_push_svcctl_QueryServiceLockStatusA(push, NDR_OUT, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + blob = ndr_push_blob(push); + if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + talloc_free(mem_ctx); + + return True; +} + +static BOOL api_svcctl_StartServiceA(pipes_struct *p) +{ + struct ndr_pull *pull; + struct ndr_push *push; + NTSTATUS status; + DATA_BLOB blob; + struct svcctl_StartServiceA r; + TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_StartServiceA"); + + if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + pull = ndr_pull_init_blob(&blob, mem_ctx); + if (pull == NULL) + return False; + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + status = ndr_pull_svcctl_StartServiceA(pull, NDR_IN, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + if (DEBUGLEVEL >= 10) + NDR_PRINT_IN_DEBUG(svcctl_StartServiceA, &r); + + r.out.result = _svcctl_StartServiceA(p, r.in.handle, r.in.NumArgs, r.in.Arguments); + + if (DEBUGLEVEL >= 10) + NDR_PRINT_OUT_DEBUG(svcctl_StartServiceA, &r); + + push = ndr_push_init_ctx(mem_ctx); + if (push == NULL) { + talloc_free(mem_ctx); + return False; + } + + status = ndr_push_svcctl_StartServiceA(push, NDR_OUT, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + blob = ndr_push_blob(push); + if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + talloc_free(mem_ctx); + + return True; +} + +static BOOL api_svcctl_GetServiceDisplayNameA(pipes_struct *p) +{ + struct ndr_pull *pull; + struct ndr_push *push; + NTSTATUS status; + DATA_BLOB blob; + struct svcctl_GetServiceDisplayNameA r; + TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_GetServiceDisplayNameA"); + + if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + pull = ndr_pull_init_blob(&blob, mem_ctx); + if (pull == NULL) + return False; + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + status = ndr_pull_svcctl_GetServiceDisplayNameA(pull, NDR_IN, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + if (DEBUGLEVEL >= 10) + NDR_PRINT_IN_DEBUG(svcctl_GetServiceDisplayNameA, &r); + + ZERO_STRUCT(r.out); + r.out.display_name = talloc_zero_size(mem_ctx, sizeof(*r.out.display_name)); + if (r.out.display_name == NULL) { + talloc_free(mem_ctx); + return False; + } + + r.out.display_name_length = r.in.display_name_length; + r.out.result = _svcctl_GetServiceDisplayNameA(p, r.in.handle, r.in.service_name, r.out.display_name, r.in.display_name_length); + + if (DEBUGLEVEL >= 10) + NDR_PRINT_OUT_DEBUG(svcctl_GetServiceDisplayNameA, &r); + + push = ndr_push_init_ctx(mem_ctx); + if (push == NULL) { + talloc_free(mem_ctx); + return False; + } + + status = ndr_push_svcctl_GetServiceDisplayNameA(push, NDR_OUT, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + blob = ndr_push_blob(push); + if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + talloc_free(mem_ctx); + + return True; +} + +static BOOL api_svcctl_GetServiceKeyNameA(pipes_struct *p) +{ + struct ndr_pull *pull; + struct ndr_push *push; + NTSTATUS status; + DATA_BLOB blob; + struct svcctl_GetServiceKeyNameA r; + TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_GetServiceKeyNameA"); + + if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + pull = ndr_pull_init_blob(&blob, mem_ctx); + if (pull == NULL) + return False; + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + status = ndr_pull_svcctl_GetServiceKeyNameA(pull, NDR_IN, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + if (DEBUGLEVEL >= 10) + NDR_PRINT_IN_DEBUG(svcctl_GetServiceKeyNameA, &r); + + ZERO_STRUCT(r.out); + r.out.key_name = talloc_zero_size(mem_ctx, sizeof(*r.out.key_name)); + if (r.out.key_name == NULL) { + talloc_free(mem_ctx); + return False; + } + + r.out.display_name_length = r.in.display_name_length; + r.out.result = _svcctl_GetServiceKeyNameA(p, r.in.handle, r.in.service_name, r.out.key_name, r.in.display_name_length); + + if (DEBUGLEVEL >= 10) + NDR_PRINT_OUT_DEBUG(svcctl_GetServiceKeyNameA, &r); + + push = ndr_push_init_ctx(mem_ctx); + if (push == NULL) { + talloc_free(mem_ctx); + return False; + } + + status = ndr_push_svcctl_GetServiceKeyNameA(push, NDR_OUT, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + blob = ndr_push_blob(push); + if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + talloc_free(mem_ctx); + + return True; +} + +static BOOL api_svcctl_GetCurrentGroupeStateW(pipes_struct *p) +{ + struct ndr_pull *pull; + struct ndr_push *push; + NTSTATUS status; + DATA_BLOB blob; + struct svcctl_GetCurrentGroupeStateW r; + TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_GetCurrentGroupeStateW"); + + if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + pull = ndr_pull_init_blob(&blob, mem_ctx); + if (pull == NULL) + return False; + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + status = ndr_pull_svcctl_GetCurrentGroupeStateW(pull, NDR_IN, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + if (DEBUGLEVEL >= 10) + NDR_PRINT_IN_DEBUG(svcctl_GetCurrentGroupeStateW, &r); + + r.out.result = _svcctl_GetCurrentGroupeStateW(p); + + if (DEBUGLEVEL >= 10) + NDR_PRINT_OUT_DEBUG(svcctl_GetCurrentGroupeStateW, &r); + + push = ndr_push_init_ctx(mem_ctx); + if (push == NULL) { + talloc_free(mem_ctx); + return False; + } + + status = ndr_push_svcctl_GetCurrentGroupeStateW(push, NDR_OUT, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + blob = ndr_push_blob(push); + if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + talloc_free(mem_ctx); + + return True; +} + +static BOOL api_svcctl_EnumServiceGroupW(pipes_struct *p) +{ + struct ndr_pull *pull; + struct ndr_push *push; + NTSTATUS status; + DATA_BLOB blob; + struct svcctl_EnumServiceGroupW r; + TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_EnumServiceGroupW"); + + if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + pull = ndr_pull_init_blob(&blob, mem_ctx); + if (pull == NULL) + return False; + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + status = ndr_pull_svcctl_EnumServiceGroupW(pull, NDR_IN, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + if (DEBUGLEVEL >= 10) + NDR_PRINT_IN_DEBUG(svcctl_EnumServiceGroupW, &r); + + r.out.result = _svcctl_EnumServiceGroupW(p); + + if (DEBUGLEVEL >= 10) + NDR_PRINT_OUT_DEBUG(svcctl_EnumServiceGroupW, &r); + + push = ndr_push_init_ctx(mem_ctx); + if (push == NULL) { + talloc_free(mem_ctx); + return False; + } + + status = ndr_push_svcctl_EnumServiceGroupW(push, NDR_OUT, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + blob = ndr_push_blob(push); + if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + talloc_free(mem_ctx); + + return True; +} + +static BOOL api_svcctl_ChangeServiceConfig2A(pipes_struct *p) +{ + struct ndr_pull *pull; + struct ndr_push *push; + NTSTATUS status; + DATA_BLOB blob; + struct svcctl_ChangeServiceConfig2A r; + TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_ChangeServiceConfig2A"); + + if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + pull = ndr_pull_init_blob(&blob, mem_ctx); + if (pull == NULL) + return False; + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + status = ndr_pull_svcctl_ChangeServiceConfig2A(pull, NDR_IN, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + if (DEBUGLEVEL >= 10) + NDR_PRINT_IN_DEBUG(svcctl_ChangeServiceConfig2A, &r); + + r.out.result = _svcctl_ChangeServiceConfig2A(p, r.in.handle, r.in.info_level, r.in.info); + + if (DEBUGLEVEL >= 10) + NDR_PRINT_OUT_DEBUG(svcctl_ChangeServiceConfig2A, &r); + + push = ndr_push_init_ctx(mem_ctx); + if (push == NULL) { + talloc_free(mem_ctx); + return False; + } + + status = ndr_push_svcctl_ChangeServiceConfig2A(push, NDR_OUT, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + blob = ndr_push_blob(push); + if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + talloc_free(mem_ctx); + + return True; +} + +static BOOL api_svcctl_ChangeServiceConfig2W(pipes_struct *p) +{ + struct ndr_pull *pull; + struct ndr_push *push; + NTSTATUS status; + DATA_BLOB blob; + struct svcctl_ChangeServiceConfig2W r; + TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_ChangeServiceConfig2W"); + + if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + pull = ndr_pull_init_blob(&blob, mem_ctx); + if (pull == NULL) + return False; + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + status = ndr_pull_svcctl_ChangeServiceConfig2W(pull, NDR_IN, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + if (DEBUGLEVEL >= 10) + NDR_PRINT_IN_DEBUG(svcctl_ChangeServiceConfig2W, &r); + + r.out.result = _svcctl_ChangeServiceConfig2W(p, r.in.handle, r.in.info_level, r.in.info); + + if (DEBUGLEVEL >= 10) + NDR_PRINT_OUT_DEBUG(svcctl_ChangeServiceConfig2W, &r); + + push = ndr_push_init_ctx(mem_ctx); + if (push == NULL) { + talloc_free(mem_ctx); + return False; + } + + status = ndr_push_svcctl_ChangeServiceConfig2W(push, NDR_OUT, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + blob = ndr_push_blob(push); + if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + talloc_free(mem_ctx); + + return True; +} + +static BOOL api_svcctl_QueryServiceConfig2A(pipes_struct *p) +{ + struct ndr_pull *pull; + struct ndr_push *push; + NTSTATUS status; + DATA_BLOB blob; + struct svcctl_QueryServiceConfig2A r; + TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_QueryServiceConfig2A"); + + if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + pull = ndr_pull_init_blob(&blob, mem_ctx); + if (pull == NULL) + return False; + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + status = ndr_pull_svcctl_QueryServiceConfig2A(pull, NDR_IN, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + if (DEBUGLEVEL >= 10) + NDR_PRINT_IN_DEBUG(svcctl_QueryServiceConfig2A, &r); + + ZERO_STRUCT(r.out); + r.out.buffer = talloc_zero_size(mem_ctx, sizeof(*r.out.buffer) * r.in.buf_size); + if (r.out.buffer == NULL) { + talloc_free(mem_ctx); + return False; + } + + r.out.bytes_needed = talloc_zero_size(mem_ctx, sizeof(*r.out.bytes_needed)); + if (r.out.bytes_needed == NULL) { + talloc_free(mem_ctx); + return False; + } + + r.out.result = _svcctl_QueryServiceConfig2A(p, r.in.handle, r.in.info_level, r.out.buffer, r.in.buf_size, r.out.bytes_needed); + + if (DEBUGLEVEL >= 10) + NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceConfig2A, &r); + + push = ndr_push_init_ctx(mem_ctx); + if (push == NULL) { + talloc_free(mem_ctx); + return False; + } + + status = ndr_push_svcctl_QueryServiceConfig2A(push, NDR_OUT, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + blob = ndr_push_blob(push); + if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + talloc_free(mem_ctx); + + return True; +} + +static BOOL api_svcctl_QueryServiceConfig2W(pipes_struct *p) +{ + struct ndr_pull *pull; + struct ndr_push *push; + NTSTATUS status; + DATA_BLOB blob; + struct svcctl_QueryServiceConfig2W r; + TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_QueryServiceConfig2W"); + + if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + pull = ndr_pull_init_blob(&blob, mem_ctx); + if (pull == NULL) + return False; + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + status = ndr_pull_svcctl_QueryServiceConfig2W(pull, NDR_IN, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + if (DEBUGLEVEL >= 10) + NDR_PRINT_IN_DEBUG(svcctl_QueryServiceConfig2W, &r); + + ZERO_STRUCT(r.out); + r.out.buffer = talloc_zero_size(mem_ctx, sizeof(*r.out.buffer) * r.in.buf_size); + if (r.out.buffer == NULL) { + talloc_free(mem_ctx); + return False; + } + + r.out.bytes_needed = talloc_zero_size(mem_ctx, sizeof(*r.out.bytes_needed)); + if (r.out.bytes_needed == NULL) { + talloc_free(mem_ctx); + return False; + } + + r.out.result = _svcctl_QueryServiceConfig2W(p, r.in.handle, r.in.info_level, r.out.buffer, r.in.buf_size, r.out.bytes_needed); + + if (DEBUGLEVEL >= 10) + NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceConfig2W, &r); + + push = ndr_push_init_ctx(mem_ctx); + if (push == NULL) { + talloc_free(mem_ctx); + return False; + } + + status = ndr_push_svcctl_QueryServiceConfig2W(push, NDR_OUT, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + blob = ndr_push_blob(push); + if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + talloc_free(mem_ctx); + + return True; +} + +static BOOL api_svcctl_QueryServiceStatusEx(pipes_struct *p) +{ + struct ndr_pull *pull; + struct ndr_push *push; + NTSTATUS status; + DATA_BLOB blob; + struct svcctl_QueryServiceStatusEx r; + TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_QueryServiceStatusEx"); + + if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + pull = ndr_pull_init_blob(&blob, mem_ctx); + if (pull == NULL) + return False; + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + status = ndr_pull_svcctl_QueryServiceStatusEx(pull, NDR_IN, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + if (DEBUGLEVEL >= 10) + NDR_PRINT_IN_DEBUG(svcctl_QueryServiceStatusEx, &r); + + ZERO_STRUCT(r.out); + r.out.buffer = talloc_zero_size(mem_ctx, sizeof(*r.out.buffer) * r.in.buf_size); + if (r.out.buffer == NULL) { + talloc_free(mem_ctx); + return False; + } + + r.out.bytes_needed = talloc_zero_size(mem_ctx, sizeof(*r.out.bytes_needed)); + if (r.out.bytes_needed == NULL) { + talloc_free(mem_ctx); + return False; + } + + r.out.result = _svcctl_QueryServiceStatusEx(p, r.in.handle, r.in.info_level, r.out.buffer, r.in.buf_size, r.out.bytes_needed); + + if (DEBUGLEVEL >= 10) + NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceStatusEx, &r); + + push = ndr_push_init_ctx(mem_ctx); + if (push == NULL) { + talloc_free(mem_ctx); + return False; + } + + status = ndr_push_svcctl_QueryServiceStatusEx(push, NDR_OUT, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + blob = ndr_push_blob(push); + if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + talloc_free(mem_ctx); + + return True; +} + +static BOOL api_EnumServicesStatusExA(pipes_struct *p) +{ + struct ndr_pull *pull; + struct ndr_push *push; + NTSTATUS status; + DATA_BLOB blob; + struct EnumServicesStatusExA r; + TALLOC_CTX *mem_ctx = talloc_init("api_EnumServicesStatusExA"); + + if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + pull = ndr_pull_init_blob(&blob, mem_ctx); + if (pull == NULL) + return False; + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + status = ndr_pull_EnumServicesStatusExA(pull, NDR_IN, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + if (DEBUGLEVEL >= 10) + NDR_PRINT_IN_DEBUG(EnumServicesStatusExA, &r); + + ZERO_STRUCT(r.out); + r.out.services = talloc_zero_size(mem_ctx, sizeof(*r.out.services) * r.in.buf_size); + if (r.out.services == NULL) { + talloc_free(mem_ctx); + return False; + } + + r.out.bytes_needed = talloc_zero_size(mem_ctx, sizeof(*r.out.bytes_needed)); + if (r.out.bytes_needed == NULL) { + talloc_free(mem_ctx); + return False; + } + + r.out.service_returned = talloc_zero_size(mem_ctx, sizeof(*r.out.service_returned)); + if (r.out.service_returned == NULL) { + talloc_free(mem_ctx); + return False; + } + + r.out.resume_handle = r.in.resume_handle; + r.out.group_name = talloc_zero_size(mem_ctx, sizeof(*r.out.group_name)); + if (r.out.group_name == NULL) { + talloc_free(mem_ctx); + return False; + } + + r.out.result = _EnumServicesStatusExA(p, r.in.scmanager, r.in.info_level, r.in.type, r.in.state, r.out.services, r.in.buf_size, r.out.bytes_needed, r.out.service_returned, r.in.resume_handle, r.out.group_name); + + if (DEBUGLEVEL >= 10) + NDR_PRINT_OUT_DEBUG(EnumServicesStatusExA, &r); + + push = ndr_push_init_ctx(mem_ctx); + if (push == NULL) { + talloc_free(mem_ctx); + return False; + } + + status = ndr_push_EnumServicesStatusExA(push, NDR_OUT, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + blob = ndr_push_blob(push); + if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + talloc_free(mem_ctx); + + return True; +} + +static BOOL api_EnumServicesStatusExW(pipes_struct *p) +{ + struct ndr_pull *pull; + struct ndr_push *push; + NTSTATUS status; + DATA_BLOB blob; + struct EnumServicesStatusExW r; + TALLOC_CTX *mem_ctx = talloc_init("api_EnumServicesStatusExW"); + + if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + pull = ndr_pull_init_blob(&blob, mem_ctx); + if (pull == NULL) + return False; + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + status = ndr_pull_EnumServicesStatusExW(pull, NDR_IN, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + if (DEBUGLEVEL >= 10) + NDR_PRINT_IN_DEBUG(EnumServicesStatusExW, &r); + + ZERO_STRUCT(r.out); + r.out.services = talloc_zero_size(mem_ctx, sizeof(*r.out.services) * r.in.buf_size); + if (r.out.services == NULL) { + talloc_free(mem_ctx); + return False; + } + + r.out.bytes_needed = talloc_zero_size(mem_ctx, sizeof(*r.out.bytes_needed)); + if (r.out.bytes_needed == NULL) { + talloc_free(mem_ctx); + return False; + } + + r.out.service_returned = talloc_zero_size(mem_ctx, sizeof(*r.out.service_returned)); + if (r.out.service_returned == NULL) { + talloc_free(mem_ctx); + return False; + } + + r.out.resume_handle = r.in.resume_handle; + r.out.group_name = talloc_zero_size(mem_ctx, sizeof(*r.out.group_name)); + if (r.out.group_name == NULL) { + talloc_free(mem_ctx); + return False; + } + + r.out.result = _EnumServicesStatusExW(p, r.in.scmanager, r.in.info_level, r.in.type, r.in.state, r.out.services, r.in.buf_size, r.out.bytes_needed, r.out.service_returned, r.in.resume_handle, r.out.group_name); + + if (DEBUGLEVEL >= 10) + NDR_PRINT_OUT_DEBUG(EnumServicesStatusExW, &r); + + push = ndr_push_init_ctx(mem_ctx); + if (push == NULL) { + talloc_free(mem_ctx); + return False; + } + + status = ndr_push_EnumServicesStatusExW(push, NDR_OUT, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + blob = ndr_push_blob(push); + if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + talloc_free(mem_ctx); + + return True; +} + +static BOOL api_svcctl_SCSendTSMessage(pipes_struct *p) +{ + struct ndr_pull *pull; + struct ndr_push *push; + NTSTATUS status; + DATA_BLOB blob; + struct svcctl_SCSendTSMessage r; + TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_SCSendTSMessage"); + + if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + pull = ndr_pull_init_blob(&blob, mem_ctx); + if (pull == NULL) + return False; + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + status = ndr_pull_svcctl_SCSendTSMessage(pull, NDR_IN, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + if (DEBUGLEVEL >= 10) + NDR_PRINT_IN_DEBUG(svcctl_SCSendTSMessage, &r); + + r.out.result = _svcctl_SCSendTSMessage(p); + + if (DEBUGLEVEL >= 10) + NDR_PRINT_OUT_DEBUG(svcctl_SCSendTSMessage, &r); + + push = ndr_push_init_ctx(mem_ctx); + if (push == NULL) { + talloc_free(mem_ctx); + return False; + } + + status = ndr_push_svcctl_SCSendTSMessage(push, NDR_OUT, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + blob = ndr_push_blob(push); + if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + talloc_free(mem_ctx); + + return True; +} + + +/* Tables */ +static struct api_struct api_svcctl_cmds[] = +{ + {"SVCCTL_CLOSESERVICEHANDLE", DCERPC_SVCCTL_CLOSESERVICEHANDLE, api_svcctl_CloseServiceHandle}, + {"SVCCTL_CONTROLSERVICE", DCERPC_SVCCTL_CONTROLSERVICE, api_svcctl_ControlService}, + {"SVCCTL_DELETESERVICE", DCERPC_SVCCTL_DELETESERVICE, api_svcctl_DeleteService}, + {"SVCCTL_LOCKSERVICEDATABASE", DCERPC_SVCCTL_LOCKSERVICEDATABASE, api_svcctl_LockServiceDatabase}, + {"SVCCTL_QUERYSERVICEOBJECTSECURITY", DCERPC_SVCCTL_QUERYSERVICEOBJECTSECURITY, api_svcctl_QueryServiceObjectSecurity}, + {"SVCCTL_SETSERVICEOBJECTSECURITY", DCERPC_SVCCTL_SETSERVICEOBJECTSECURITY, api_svcctl_SetServiceObjectSecurity}, + {"SVCCTL_QUERYSERVICESTATUS", DCERPC_SVCCTL_QUERYSERVICESTATUS, api_svcctl_QueryServiceStatus}, + {"SVCCTL_SETSERVICESTATUS", DCERPC_SVCCTL_SETSERVICESTATUS, api_svcctl_SetServiceStatus}, + {"SVCCTL_UNLOCKSERVICEDATABASE", DCERPC_SVCCTL_UNLOCKSERVICEDATABASE, api_svcctl_UnlockServiceDatabase}, + {"SVCCTL_NOTIFYBOOTCONFIGSTATUS", DCERPC_SVCCTL_NOTIFYBOOTCONFIGSTATUS, api_svcctl_NotifyBootConfigStatus}, + {"SVCCTL_SCSETSERVICEBITSW", DCERPC_SVCCTL_SCSETSERVICEBITSW, api_svcctl_SCSetServiceBitsW}, + {"SVCCTL_CHANGESERVICECONFIGW", DCERPC_SVCCTL_CHANGESERVICECONFIGW, api_svcctl_ChangeServiceConfigW}, + {"SVCCTL_CREATESERVICEW", DCERPC_SVCCTL_CREATESERVICEW, api_svcctl_CreateServiceW}, + {"SVCCTL_ENUMDEPENDENTSERVICESW", DCERPC_SVCCTL_ENUMDEPENDENTSERVICESW, api_svcctl_EnumDependentServicesW}, + {"SVCCTL_ENUMSERVICESSTATUSW", DCERPC_SVCCTL_ENUMSERVICESSTATUSW, api_svcctl_EnumServicesStatusW}, + {"SVCCTL_OPENSCMANAGERW", DCERPC_SVCCTL_OPENSCMANAGERW, api_svcctl_OpenSCManagerW}, + {"SVCCTL_OPENSERVICEW", DCERPC_SVCCTL_OPENSERVICEW, api_svcctl_OpenServiceW}, + {"SVCCTL_QUERYSERVICECONFIGW", DCERPC_SVCCTL_QUERYSERVICECONFIGW, api_svcctl_QueryServiceConfigW}, + {"SVCCTL_QUERYSERVICELOCKSTATUSW", DCERPC_SVCCTL_QUERYSERVICELOCKSTATUSW, api_svcctl_QueryServiceLockStatusW}, + {"SVCCTL_STARTSERVICEW", DCERPC_SVCCTL_STARTSERVICEW, api_svcctl_StartServiceW}, + {"SVCCTL_GETSERVICEDISPLAYNAMEW", DCERPC_SVCCTL_GETSERVICEDISPLAYNAMEW, api_svcctl_GetServiceDisplayNameW}, + {"SVCCTL_GETSERVICEKEYNAMEW", DCERPC_SVCCTL_GETSERVICEKEYNAMEW, api_svcctl_GetServiceKeyNameW}, + {"SVCCTL_SCSETSERVICEBITSA", DCERPC_SVCCTL_SCSETSERVICEBITSA, api_svcctl_SCSetServiceBitsA}, + {"SVCCTL_CHANGESERVICECONFIGA", DCERPC_SVCCTL_CHANGESERVICECONFIGA, api_svcctl_ChangeServiceConfigA}, + {"SVCCTL_CREATESERVICEA", DCERPC_SVCCTL_CREATESERVICEA, api_svcctl_CreateServiceA}, + {"SVCCTL_ENUMDEPENDENTSERVICESA", DCERPC_SVCCTL_ENUMDEPENDENTSERVICESA, api_svcctl_EnumDependentServicesA}, + {"SVCCTL_ENUMSERVICESSTATUSA", DCERPC_SVCCTL_ENUMSERVICESSTATUSA, api_svcctl_EnumServicesStatusA}, + {"SVCCTL_OPENSCMANAGERA", DCERPC_SVCCTL_OPENSCMANAGERA, api_svcctl_OpenSCManagerA}, + {"SVCCTL_OPENSERVICEA", DCERPC_SVCCTL_OPENSERVICEA, api_svcctl_OpenServiceA}, + {"SVCCTL_QUERYSERVICECONFIGA", DCERPC_SVCCTL_QUERYSERVICECONFIGA, api_svcctl_QueryServiceConfigA}, + {"SVCCTL_QUERYSERVICELOCKSTATUSA", DCERPC_SVCCTL_QUERYSERVICELOCKSTATUSA, api_svcctl_QueryServiceLockStatusA}, + {"SVCCTL_STARTSERVICEA", DCERPC_SVCCTL_STARTSERVICEA, api_svcctl_StartServiceA}, + {"SVCCTL_GETSERVICEDISPLAYNAMEA", DCERPC_SVCCTL_GETSERVICEDISPLAYNAMEA, api_svcctl_GetServiceDisplayNameA}, + {"SVCCTL_GETSERVICEKEYNAMEA", DCERPC_SVCCTL_GETSERVICEKEYNAMEA, api_svcctl_GetServiceKeyNameA}, + {"SVCCTL_GETCURRENTGROUPESTATEW", DCERPC_SVCCTL_GETCURRENTGROUPESTATEW, api_svcctl_GetCurrentGroupeStateW}, + {"SVCCTL_ENUMSERVICEGROUPW", DCERPC_SVCCTL_ENUMSERVICEGROUPW, api_svcctl_EnumServiceGroupW}, + {"SVCCTL_CHANGESERVICECONFIG2A", DCERPC_SVCCTL_CHANGESERVICECONFIG2A, api_svcctl_ChangeServiceConfig2A}, + {"SVCCTL_CHANGESERVICECONFIG2W", DCERPC_SVCCTL_CHANGESERVICECONFIG2W, api_svcctl_ChangeServiceConfig2W}, + {"SVCCTL_QUERYSERVICECONFIG2A", DCERPC_SVCCTL_QUERYSERVICECONFIG2A, api_svcctl_QueryServiceConfig2A}, + {"SVCCTL_QUERYSERVICECONFIG2W", DCERPC_SVCCTL_QUERYSERVICECONFIG2W, api_svcctl_QueryServiceConfig2W}, + {"SVCCTL_QUERYSERVICESTATUSEX", DCERPC_SVCCTL_QUERYSERVICESTATUSEX, api_svcctl_QueryServiceStatusEx}, + {"ENUMSERVICESSTATUSEXA", DCERPC_ENUMSERVICESSTATUSEXA, api_EnumServicesStatusExA}, + {"ENUMSERVICESSTATUSEXW", DCERPC_ENUMSERVICESSTATUSEXW, api_EnumServicesStatusExW}, + {"SVCCTL_SCSENDTSMESSAGE", DCERPC_SVCCTL_SCSENDTSMESSAGE, api_svcctl_SCSendTSMessage}, +}; + +void svcctl_get_pipe_fns(struct api_struct **fns, int *n_fns) +{ + *fns = api_svcctl_cmds; + *n_fns = sizeof(api_svcctl_cmds) / sizeof(struct api_struct); +} + +NTSTATUS rpc_svcctl_init(void) +{ + return rpc_pipe_register_commands(SMB_RPC_INTERFACE_VERSION, "svcctl", "svcctl", api_svcctl_cmds, sizeof(api_svcctl_cmds) / sizeof(struct api_struct)); +} -- cgit From 6b0b563fa43ad4c7de3573dc7962a2698e140f72 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Tue, 10 Oct 2006 07:55:46 +0000 Subject: r19221: Monster-Checkin after "make idl" (This used to be commit 416466a16f58ac644baacaa2522c4e98176d0e70) --- source3/librpc/gen_ndr/srv_svcctl.c | 528 ++++++++++++++++++++++++++++++------ 1 file changed, 440 insertions(+), 88 deletions(-) (limited to 'source3/librpc/gen_ndr/srv_svcctl.c') diff --git a/source3/librpc/gen_ndr/srv_svcctl.c b/source3/librpc/gen_ndr/srv_svcctl.c index 9d2ad44219..efedf1ef3c 100644 --- a/source3/librpc/gen_ndr/srv_svcctl.c +++ b/source3/librpc/gen_ndr/srv_svcctl.c @@ -21,8 +21,10 @@ static BOOL api_svcctl_CloseServiceHandle(pipes_struct *p) } pull = ndr_pull_init_blob(&blob, mem_ctx); - if (pull == NULL) + if (pull == NULL) { + talloc_free(mem_ctx); return False; + } pull->flags |= LIBNDR_FLAG_REF_ALLOC; status = ndr_pull_svcctl_CloseServiceHandle(pull, NDR_IN, &r); @@ -38,6 +40,12 @@ static BOOL api_svcctl_CloseServiceHandle(pipes_struct *p) r.out.handle = r.in.handle; r.out.result = _svcctl_CloseServiceHandle(p, r.in.handle); + if (p->rng_fault_state) { + talloc_free(mem_ctx); + /* Return True here, srv_pipe_hnd.c will take care */ + return True; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(svcctl_CloseServiceHandle, &r); @@ -54,7 +62,7 @@ static BOOL api_svcctl_CloseServiceHandle(pipes_struct *p) } blob = ndr_push_blob(push); - if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { talloc_free(mem_ctx); return False; } @@ -79,8 +87,10 @@ static BOOL api_svcctl_ControlService(pipes_struct *p) } pull = ndr_pull_init_blob(&blob, mem_ctx); - if (pull == NULL) + if (pull == NULL) { + talloc_free(mem_ctx); return False; + } pull->flags |= LIBNDR_FLAG_REF_ALLOC; status = ndr_pull_svcctl_ControlService(pull, NDR_IN, &r); @@ -101,6 +111,12 @@ static BOOL api_svcctl_ControlService(pipes_struct *p) r.out.result = _svcctl_ControlService(p, r.in.handle, r.in.control, r.out.status); + if (p->rng_fault_state) { + talloc_free(mem_ctx); + /* Return True here, srv_pipe_hnd.c will take care */ + return True; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(svcctl_ControlService, &r); @@ -117,7 +133,7 @@ static BOOL api_svcctl_ControlService(pipes_struct *p) } blob = ndr_push_blob(push); - if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { talloc_free(mem_ctx); return False; } @@ -142,8 +158,10 @@ static BOOL api_svcctl_DeleteService(pipes_struct *p) } pull = ndr_pull_init_blob(&blob, mem_ctx); - if (pull == NULL) + if (pull == NULL) { + talloc_free(mem_ctx); return False; + } pull->flags |= LIBNDR_FLAG_REF_ALLOC; status = ndr_pull_svcctl_DeleteService(pull, NDR_IN, &r); @@ -157,6 +175,12 @@ static BOOL api_svcctl_DeleteService(pipes_struct *p) r.out.result = _svcctl_DeleteService(p, r.in.handle); + if (p->rng_fault_state) { + talloc_free(mem_ctx); + /* Return True here, srv_pipe_hnd.c will take care */ + return True; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(svcctl_DeleteService, &r); @@ -173,7 +197,7 @@ static BOOL api_svcctl_DeleteService(pipes_struct *p) } blob = ndr_push_blob(push); - if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { talloc_free(mem_ctx); return False; } @@ -198,8 +222,10 @@ static BOOL api_svcctl_LockServiceDatabase(pipes_struct *p) } pull = ndr_pull_init_blob(&blob, mem_ctx); - if (pull == NULL) + if (pull == NULL) { + talloc_free(mem_ctx); return False; + } pull->flags |= LIBNDR_FLAG_REF_ALLOC; status = ndr_pull_svcctl_LockServiceDatabase(pull, NDR_IN, &r); @@ -220,6 +246,12 @@ static BOOL api_svcctl_LockServiceDatabase(pipes_struct *p) r.out.result = _svcctl_LockServiceDatabase(p, r.in.handle, r.out.lock); + if (p->rng_fault_state) { + talloc_free(mem_ctx); + /* Return True here, srv_pipe_hnd.c will take care */ + return True; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(svcctl_LockServiceDatabase, &r); @@ -236,7 +268,7 @@ static BOOL api_svcctl_LockServiceDatabase(pipes_struct *p) } blob = ndr_push_blob(push); - if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { talloc_free(mem_ctx); return False; } @@ -261,8 +293,10 @@ static BOOL api_svcctl_QueryServiceObjectSecurity(pipes_struct *p) } pull = ndr_pull_init_blob(&blob, mem_ctx); - if (pull == NULL) + if (pull == NULL) { + talloc_free(mem_ctx); return False; + } pull->flags |= LIBNDR_FLAG_REF_ALLOC; status = ndr_pull_svcctl_QueryServiceObjectSecurity(pull, NDR_IN, &r); @@ -276,6 +310,12 @@ static BOOL api_svcctl_QueryServiceObjectSecurity(pipes_struct *p) r.out.result = _svcctl_QueryServiceObjectSecurity(p); + if (p->rng_fault_state) { + talloc_free(mem_ctx); + /* Return True here, srv_pipe_hnd.c will take care */ + return True; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceObjectSecurity, &r); @@ -292,7 +332,7 @@ static BOOL api_svcctl_QueryServiceObjectSecurity(pipes_struct *p) } blob = ndr_push_blob(push); - if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { talloc_free(mem_ctx); return False; } @@ -317,8 +357,10 @@ static BOOL api_svcctl_SetServiceObjectSecurity(pipes_struct *p) } pull = ndr_pull_init_blob(&blob, mem_ctx); - if (pull == NULL) + if (pull == NULL) { + talloc_free(mem_ctx); return False; + } pull->flags |= LIBNDR_FLAG_REF_ALLOC; status = ndr_pull_svcctl_SetServiceObjectSecurity(pull, NDR_IN, &r); @@ -332,6 +374,12 @@ static BOOL api_svcctl_SetServiceObjectSecurity(pipes_struct *p) r.out.result = _svcctl_SetServiceObjectSecurity(p); + if (p->rng_fault_state) { + talloc_free(mem_ctx); + /* Return True here, srv_pipe_hnd.c will take care */ + return True; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(svcctl_SetServiceObjectSecurity, &r); @@ -348,7 +396,7 @@ static BOOL api_svcctl_SetServiceObjectSecurity(pipes_struct *p) } blob = ndr_push_blob(push); - if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { talloc_free(mem_ctx); return False; } @@ -373,8 +421,10 @@ static BOOL api_svcctl_QueryServiceStatus(pipes_struct *p) } pull = ndr_pull_init_blob(&blob, mem_ctx); - if (pull == NULL) + if (pull == NULL) { + talloc_free(mem_ctx); return False; + } pull->flags |= LIBNDR_FLAG_REF_ALLOC; status = ndr_pull_svcctl_QueryServiceStatus(pull, NDR_IN, &r); @@ -395,6 +445,12 @@ static BOOL api_svcctl_QueryServiceStatus(pipes_struct *p) r.out.result = _svcctl_QueryServiceStatus(p, r.in.handle, r.out.status); + if (p->rng_fault_state) { + talloc_free(mem_ctx); + /* Return True here, srv_pipe_hnd.c will take care */ + return True; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceStatus, &r); @@ -411,7 +467,7 @@ static BOOL api_svcctl_QueryServiceStatus(pipes_struct *p) } blob = ndr_push_blob(push); - if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { talloc_free(mem_ctx); return False; } @@ -436,8 +492,10 @@ static BOOL api_svcctl_SetServiceStatus(pipes_struct *p) } pull = ndr_pull_init_blob(&blob, mem_ctx); - if (pull == NULL) + if (pull == NULL) { + talloc_free(mem_ctx); return False; + } pull->flags |= LIBNDR_FLAG_REF_ALLOC; status = ndr_pull_svcctl_SetServiceStatus(pull, NDR_IN, &r); @@ -451,6 +509,12 @@ static BOOL api_svcctl_SetServiceStatus(pipes_struct *p) r.out.result = _svcctl_SetServiceStatus(p); + if (p->rng_fault_state) { + talloc_free(mem_ctx); + /* Return True here, srv_pipe_hnd.c will take care */ + return True; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(svcctl_SetServiceStatus, &r); @@ -467,7 +531,7 @@ static BOOL api_svcctl_SetServiceStatus(pipes_struct *p) } blob = ndr_push_blob(push); - if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { talloc_free(mem_ctx); return False; } @@ -492,8 +556,10 @@ static BOOL api_svcctl_UnlockServiceDatabase(pipes_struct *p) } pull = ndr_pull_init_blob(&blob, mem_ctx); - if (pull == NULL) + if (pull == NULL) { + talloc_free(mem_ctx); return False; + } pull->flags |= LIBNDR_FLAG_REF_ALLOC; status = ndr_pull_svcctl_UnlockServiceDatabase(pull, NDR_IN, &r); @@ -509,6 +575,12 @@ static BOOL api_svcctl_UnlockServiceDatabase(pipes_struct *p) r.out.lock = r.in.lock; r.out.result = _svcctl_UnlockServiceDatabase(p, r.in.lock); + if (p->rng_fault_state) { + talloc_free(mem_ctx); + /* Return True here, srv_pipe_hnd.c will take care */ + return True; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(svcctl_UnlockServiceDatabase, &r); @@ -525,7 +597,7 @@ static BOOL api_svcctl_UnlockServiceDatabase(pipes_struct *p) } blob = ndr_push_blob(push); - if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { talloc_free(mem_ctx); return False; } @@ -550,8 +622,10 @@ static BOOL api_svcctl_NotifyBootConfigStatus(pipes_struct *p) } pull = ndr_pull_init_blob(&blob, mem_ctx); - if (pull == NULL) + if (pull == NULL) { + talloc_free(mem_ctx); return False; + } pull->flags |= LIBNDR_FLAG_REF_ALLOC; status = ndr_pull_svcctl_NotifyBootConfigStatus(pull, NDR_IN, &r); @@ -565,6 +639,12 @@ static BOOL api_svcctl_NotifyBootConfigStatus(pipes_struct *p) r.out.result = _svcctl_NotifyBootConfigStatus(p); + if (p->rng_fault_state) { + talloc_free(mem_ctx); + /* Return True here, srv_pipe_hnd.c will take care */ + return True; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(svcctl_NotifyBootConfigStatus, &r); @@ -581,7 +661,7 @@ static BOOL api_svcctl_NotifyBootConfigStatus(pipes_struct *p) } blob = ndr_push_blob(push); - if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { talloc_free(mem_ctx); return False; } @@ -606,8 +686,10 @@ static BOOL api_svcctl_SCSetServiceBitsW(pipes_struct *p) } pull = ndr_pull_init_blob(&blob, mem_ctx); - if (pull == NULL) + if (pull == NULL) { + talloc_free(mem_ctx); return False; + } pull->flags |= LIBNDR_FLAG_REF_ALLOC; status = ndr_pull_svcctl_SCSetServiceBitsW(pull, NDR_IN, &r); @@ -621,6 +703,12 @@ static BOOL api_svcctl_SCSetServiceBitsW(pipes_struct *p) r.out.result = _svcctl_SCSetServiceBitsW(p, r.in.handle, r.in.bits, r.in.bitson, r.in.immediate); + if (p->rng_fault_state) { + talloc_free(mem_ctx); + /* Return True here, srv_pipe_hnd.c will take care */ + return True; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(svcctl_SCSetServiceBitsW, &r); @@ -637,7 +725,7 @@ static BOOL api_svcctl_SCSetServiceBitsW(pipes_struct *p) } blob = ndr_push_blob(push); - if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { talloc_free(mem_ctx); return False; } @@ -662,8 +750,10 @@ static BOOL api_svcctl_ChangeServiceConfigW(pipes_struct *p) } pull = ndr_pull_init_blob(&blob, mem_ctx); - if (pull == NULL) + if (pull == NULL) { + talloc_free(mem_ctx); return False; + } pull->flags |= LIBNDR_FLAG_REF_ALLOC; status = ndr_pull_svcctl_ChangeServiceConfigW(pull, NDR_IN, &r); @@ -684,6 +774,12 @@ static BOOL api_svcctl_ChangeServiceConfigW(pipes_struct *p) r.out.result = _svcctl_ChangeServiceConfigW(p, r.in.handle, r.in.type, r.in.start, r.in.error, r.in.binary_path, r.in.load_order_group, r.out.tag_id, r.in.dependencies, r.in.service_start_name, r.in.password, r.in.display_name); + if (p->rng_fault_state) { + talloc_free(mem_ctx); + /* Return True here, srv_pipe_hnd.c will take care */ + return True; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(svcctl_ChangeServiceConfigW, &r); @@ -700,7 +796,7 @@ static BOOL api_svcctl_ChangeServiceConfigW(pipes_struct *p) } blob = ndr_push_blob(push); - if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { talloc_free(mem_ctx); return False; } @@ -725,8 +821,10 @@ static BOOL api_svcctl_CreateServiceW(pipes_struct *p) } pull = ndr_pull_init_blob(&blob, mem_ctx); - if (pull == NULL) + if (pull == NULL) { + talloc_free(mem_ctx); return False; + } pull->flags |= LIBNDR_FLAG_REF_ALLOC; status = ndr_pull_svcctl_CreateServiceW(pull, NDR_IN, &r); @@ -748,6 +846,12 @@ static BOOL api_svcctl_CreateServiceW(pipes_struct *p) r.out.result = _svcctl_CreateServiceW(p, r.in.scmanager_handle, r.in.ServiceName, r.in.DisplayName, r.in.desired_access, r.in.type, r.in.start_type, r.in.error_control, r.in.binary_path, r.in.LoadOrderGroupKey, r.in.TagId, r.in.dependencies, r.in.dependencies_size, r.in.service_start_name, r.in.password, r.in.password_size, r.out.handle); + if (p->rng_fault_state) { + talloc_free(mem_ctx); + /* Return True here, srv_pipe_hnd.c will take care */ + return True; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(svcctl_CreateServiceW, &r); @@ -764,7 +868,7 @@ static BOOL api_svcctl_CreateServiceW(pipes_struct *p) } blob = ndr_push_blob(push); - if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { talloc_free(mem_ctx); return False; } @@ -789,8 +893,10 @@ static BOOL api_svcctl_EnumDependentServicesW(pipes_struct *p) } pull = ndr_pull_init_blob(&blob, mem_ctx); - if (pull == NULL) + if (pull == NULL) { + talloc_free(mem_ctx); return False; + } pull->flags |= LIBNDR_FLAG_REF_ALLOC; status = ndr_pull_svcctl_EnumDependentServicesW(pull, NDR_IN, &r); @@ -823,6 +929,12 @@ static BOOL api_svcctl_EnumDependentServicesW(pipes_struct *p) r.out.result = _svcctl_EnumDependentServicesW(p, r.in.service, r.in.state, r.out.status, r.in.buf_size, r.out.bytes_needed, r.out.services_returned); + if (p->rng_fault_state) { + talloc_free(mem_ctx); + /* Return True here, srv_pipe_hnd.c will take care */ + return True; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(svcctl_EnumDependentServicesW, &r); @@ -839,7 +951,7 @@ static BOOL api_svcctl_EnumDependentServicesW(pipes_struct *p) } blob = ndr_push_blob(push); - if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { talloc_free(mem_ctx); return False; } @@ -864,8 +976,10 @@ static BOOL api_svcctl_EnumServicesStatusW(pipes_struct *p) } pull = ndr_pull_init_blob(&blob, mem_ctx); - if (pull == NULL) + if (pull == NULL) { + talloc_free(mem_ctx); return False; + } pull->flags |= LIBNDR_FLAG_REF_ALLOC; status = ndr_pull_svcctl_EnumServicesStatusW(pull, NDR_IN, &r); @@ -899,6 +1013,12 @@ static BOOL api_svcctl_EnumServicesStatusW(pipes_struct *p) r.out.resume_handle = r.in.resume_handle; r.out.result = _svcctl_EnumServicesStatusW(p, r.in.handle, r.in.type, r.in.state, r.in.buf_size, r.out.service, r.out.bytes_needed, r.out.services_returned, r.in.resume_handle); + if (p->rng_fault_state) { + talloc_free(mem_ctx); + /* Return True here, srv_pipe_hnd.c will take care */ + return True; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(svcctl_EnumServicesStatusW, &r); @@ -915,7 +1035,7 @@ static BOOL api_svcctl_EnumServicesStatusW(pipes_struct *p) } blob = ndr_push_blob(push); - if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { talloc_free(mem_ctx); return False; } @@ -940,8 +1060,10 @@ static BOOL api_svcctl_OpenSCManagerW(pipes_struct *p) } pull = ndr_pull_init_blob(&blob, mem_ctx); - if (pull == NULL) + if (pull == NULL) { + talloc_free(mem_ctx); return False; + } pull->flags |= LIBNDR_FLAG_REF_ALLOC; status = ndr_pull_svcctl_OpenSCManagerW(pull, NDR_IN, &r); @@ -962,6 +1084,12 @@ static BOOL api_svcctl_OpenSCManagerW(pipes_struct *p) r.out.result = _svcctl_OpenSCManagerW(p, r.in.MachineName, r.in.DatabaseName, r.in.access_mask, r.out.handle); + if (p->rng_fault_state) { + talloc_free(mem_ctx); + /* Return True here, srv_pipe_hnd.c will take care */ + return True; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(svcctl_OpenSCManagerW, &r); @@ -978,7 +1106,7 @@ static BOOL api_svcctl_OpenSCManagerW(pipes_struct *p) } blob = ndr_push_blob(push); - if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { talloc_free(mem_ctx); return False; } @@ -1003,8 +1131,10 @@ static BOOL api_svcctl_OpenServiceW(pipes_struct *p) } pull = ndr_pull_init_blob(&blob, mem_ctx); - if (pull == NULL) + if (pull == NULL) { + talloc_free(mem_ctx); return False; + } pull->flags |= LIBNDR_FLAG_REF_ALLOC; status = ndr_pull_svcctl_OpenServiceW(pull, NDR_IN, &r); @@ -1025,6 +1155,12 @@ static BOOL api_svcctl_OpenServiceW(pipes_struct *p) r.out.result = _svcctl_OpenServiceW(p, r.in.scmanager_handle, r.in.ServiceName, r.in.access_mask, r.out.handle); + if (p->rng_fault_state) { + talloc_free(mem_ctx); + /* Return True here, srv_pipe_hnd.c will take care */ + return True; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(svcctl_OpenServiceW, &r); @@ -1041,7 +1177,7 @@ static BOOL api_svcctl_OpenServiceW(pipes_struct *p) } blob = ndr_push_blob(push); - if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { talloc_free(mem_ctx); return False; } @@ -1066,8 +1202,10 @@ static BOOL api_svcctl_QueryServiceConfigW(pipes_struct *p) } pull = ndr_pull_init_blob(&blob, mem_ctx); - if (pull == NULL) + if (pull == NULL) { + talloc_free(mem_ctx); return False; + } pull->flags |= LIBNDR_FLAG_REF_ALLOC; status = ndr_pull_svcctl_QueryServiceConfigW(pull, NDR_IN, &r); @@ -1094,6 +1232,12 @@ static BOOL api_svcctl_QueryServiceConfigW(pipes_struct *p) r.out.result = _svcctl_QueryServiceConfigW(p, r.in.handle, r.out.query, r.in.buf_size, r.out.bytes_needed); + if (p->rng_fault_state) { + talloc_free(mem_ctx); + /* Return True here, srv_pipe_hnd.c will take care */ + return True; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceConfigW, &r); @@ -1110,7 +1254,7 @@ static BOOL api_svcctl_QueryServiceConfigW(pipes_struct *p) } blob = ndr_push_blob(push); - if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { talloc_free(mem_ctx); return False; } @@ -1135,8 +1279,10 @@ static BOOL api_svcctl_QueryServiceLockStatusW(pipes_struct *p) } pull = ndr_pull_init_blob(&blob, mem_ctx); - if (pull == NULL) + if (pull == NULL) { + talloc_free(mem_ctx); return False; + } pull->flags |= LIBNDR_FLAG_REF_ALLOC; status = ndr_pull_svcctl_QueryServiceLockStatusW(pull, NDR_IN, &r); @@ -1163,6 +1309,12 @@ static BOOL api_svcctl_QueryServiceLockStatusW(pipes_struct *p) r.out.result = _svcctl_QueryServiceLockStatusW(p, r.in.handle, r.in.buf_size, r.out.status, r.out.required_buf_size); + if (p->rng_fault_state) { + talloc_free(mem_ctx); + /* Return True here, srv_pipe_hnd.c will take care */ + return True; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceLockStatusW, &r); @@ -1179,7 +1331,7 @@ static BOOL api_svcctl_QueryServiceLockStatusW(pipes_struct *p) } blob = ndr_push_blob(push); - if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { talloc_free(mem_ctx); return False; } @@ -1204,8 +1356,10 @@ static BOOL api_svcctl_StartServiceW(pipes_struct *p) } pull = ndr_pull_init_blob(&blob, mem_ctx); - if (pull == NULL) + if (pull == NULL) { + talloc_free(mem_ctx); return False; + } pull->flags |= LIBNDR_FLAG_REF_ALLOC; status = ndr_pull_svcctl_StartServiceW(pull, NDR_IN, &r); @@ -1219,6 +1373,12 @@ static BOOL api_svcctl_StartServiceW(pipes_struct *p) r.out.result = _svcctl_StartServiceW(p, r.in.handle, r.in.NumArgs, r.in.Arguments); + if (p->rng_fault_state) { + talloc_free(mem_ctx); + /* Return True here, srv_pipe_hnd.c will take care */ + return True; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(svcctl_StartServiceW, &r); @@ -1235,7 +1395,7 @@ static BOOL api_svcctl_StartServiceW(pipes_struct *p) } blob = ndr_push_blob(push); - if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { talloc_free(mem_ctx); return False; } @@ -1260,8 +1420,10 @@ static BOOL api_svcctl_GetServiceDisplayNameW(pipes_struct *p) } pull = ndr_pull_init_blob(&blob, mem_ctx); - if (pull == NULL) + if (pull == NULL) { + talloc_free(mem_ctx); return False; + } pull->flags |= LIBNDR_FLAG_REF_ALLOC; status = ndr_pull_svcctl_GetServiceDisplayNameW(pull, NDR_IN, &r); @@ -1283,6 +1445,12 @@ static BOOL api_svcctl_GetServiceDisplayNameW(pipes_struct *p) r.out.display_name_length = r.in.display_name_length; r.out.result = _svcctl_GetServiceDisplayNameW(p, r.in.handle, r.in.service_name, r.out.display_name, r.in.display_name_length); + if (p->rng_fault_state) { + talloc_free(mem_ctx); + /* Return True here, srv_pipe_hnd.c will take care */ + return True; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(svcctl_GetServiceDisplayNameW, &r); @@ -1299,7 +1467,7 @@ static BOOL api_svcctl_GetServiceDisplayNameW(pipes_struct *p) } blob = ndr_push_blob(push); - if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { talloc_free(mem_ctx); return False; } @@ -1324,8 +1492,10 @@ static BOOL api_svcctl_GetServiceKeyNameW(pipes_struct *p) } pull = ndr_pull_init_blob(&blob, mem_ctx); - if (pull == NULL) + if (pull == NULL) { + talloc_free(mem_ctx); return False; + } pull->flags |= LIBNDR_FLAG_REF_ALLOC; status = ndr_pull_svcctl_GetServiceKeyNameW(pull, NDR_IN, &r); @@ -1347,6 +1517,12 @@ static BOOL api_svcctl_GetServiceKeyNameW(pipes_struct *p) r.out.display_name_length = r.in.display_name_length; r.out.result = _svcctl_GetServiceKeyNameW(p, r.in.handle, r.in.service_name, r.out.key_name, r.in.display_name_length); + if (p->rng_fault_state) { + talloc_free(mem_ctx); + /* Return True here, srv_pipe_hnd.c will take care */ + return True; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(svcctl_GetServiceKeyNameW, &r); @@ -1363,7 +1539,7 @@ static BOOL api_svcctl_GetServiceKeyNameW(pipes_struct *p) } blob = ndr_push_blob(push); - if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { talloc_free(mem_ctx); return False; } @@ -1388,8 +1564,10 @@ static BOOL api_svcctl_SCSetServiceBitsA(pipes_struct *p) } pull = ndr_pull_init_blob(&blob, mem_ctx); - if (pull == NULL) + if (pull == NULL) { + talloc_free(mem_ctx); return False; + } pull->flags |= LIBNDR_FLAG_REF_ALLOC; status = ndr_pull_svcctl_SCSetServiceBitsA(pull, NDR_IN, &r); @@ -1403,6 +1581,12 @@ static BOOL api_svcctl_SCSetServiceBitsA(pipes_struct *p) r.out.result = _svcctl_SCSetServiceBitsA(p, r.in.handle, r.in.bits, r.in.bitson, r.in.immediate); + if (p->rng_fault_state) { + talloc_free(mem_ctx); + /* Return True here, srv_pipe_hnd.c will take care */ + return True; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(svcctl_SCSetServiceBitsA, &r); @@ -1419,7 +1603,7 @@ static BOOL api_svcctl_SCSetServiceBitsA(pipes_struct *p) } blob = ndr_push_blob(push); - if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { talloc_free(mem_ctx); return False; } @@ -1444,8 +1628,10 @@ static BOOL api_svcctl_ChangeServiceConfigA(pipes_struct *p) } pull = ndr_pull_init_blob(&blob, mem_ctx); - if (pull == NULL) + if (pull == NULL) { + talloc_free(mem_ctx); return False; + } pull->flags |= LIBNDR_FLAG_REF_ALLOC; status = ndr_pull_svcctl_ChangeServiceConfigA(pull, NDR_IN, &r); @@ -1466,6 +1652,12 @@ static BOOL api_svcctl_ChangeServiceConfigA(pipes_struct *p) r.out.result = _svcctl_ChangeServiceConfigA(p, r.in.handle, r.in.type, r.in.start, r.in.error, r.in.binary_path, r.in.load_order_group, r.out.tag_id, r.in.dependencies, r.in.service_start_name, r.in.password, r.in.display_name); + if (p->rng_fault_state) { + talloc_free(mem_ctx); + /* Return True here, srv_pipe_hnd.c will take care */ + return True; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(svcctl_ChangeServiceConfigA, &r); @@ -1482,7 +1674,7 @@ static BOOL api_svcctl_ChangeServiceConfigA(pipes_struct *p) } blob = ndr_push_blob(push); - if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { talloc_free(mem_ctx); return False; } @@ -1507,8 +1699,10 @@ static BOOL api_svcctl_CreateServiceA(pipes_struct *p) } pull = ndr_pull_init_blob(&blob, mem_ctx); - if (pull == NULL) + if (pull == NULL) { + talloc_free(mem_ctx); return False; + } pull->flags |= LIBNDR_FLAG_REF_ALLOC; status = ndr_pull_svcctl_CreateServiceA(pull, NDR_IN, &r); @@ -1529,6 +1723,12 @@ static BOOL api_svcctl_CreateServiceA(pipes_struct *p) r.out.result = _svcctl_CreateServiceA(p, r.in.handle, r.in.ServiceName, r.in.DisplayName, r.in.desired_access, r.in.type, r.in.start_type, r.in.error_control, r.in.binary_path, r.in.LoadOrderGroupKey, r.out.TagId, r.in.dependencies, r.in.service_start_name, r.in.password); + if (p->rng_fault_state) { + talloc_free(mem_ctx); + /* Return True here, srv_pipe_hnd.c will take care */ + return True; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(svcctl_CreateServiceA, &r); @@ -1545,7 +1745,7 @@ static BOOL api_svcctl_CreateServiceA(pipes_struct *p) } blob = ndr_push_blob(push); - if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { talloc_free(mem_ctx); return False; } @@ -1570,8 +1770,10 @@ static BOOL api_svcctl_EnumDependentServicesA(pipes_struct *p) } pull = ndr_pull_init_blob(&blob, mem_ctx); - if (pull == NULL) + if (pull == NULL) { + talloc_free(mem_ctx); return False; + } pull->flags |= LIBNDR_FLAG_REF_ALLOC; status = ndr_pull_svcctl_EnumDependentServicesA(pull, NDR_IN, &r); @@ -1604,6 +1806,12 @@ static BOOL api_svcctl_EnumDependentServicesA(pipes_struct *p) r.out.result = _svcctl_EnumDependentServicesA(p, r.in.service, r.in.state, r.out.status, r.in.buf_size, r.out.bytes_needed, r.out.services_returned); + if (p->rng_fault_state) { + talloc_free(mem_ctx); + /* Return True here, srv_pipe_hnd.c will take care */ + return True; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(svcctl_EnumDependentServicesA, &r); @@ -1620,7 +1828,7 @@ static BOOL api_svcctl_EnumDependentServicesA(pipes_struct *p) } blob = ndr_push_blob(push); - if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { talloc_free(mem_ctx); return False; } @@ -1645,8 +1853,10 @@ static BOOL api_svcctl_EnumServicesStatusA(pipes_struct *p) } pull = ndr_pull_init_blob(&blob, mem_ctx); - if (pull == NULL) + if (pull == NULL) { + talloc_free(mem_ctx); return False; + } pull->flags |= LIBNDR_FLAG_REF_ALLOC; status = ndr_pull_svcctl_EnumServicesStatusA(pull, NDR_IN, &r); @@ -1680,6 +1890,12 @@ static BOOL api_svcctl_EnumServicesStatusA(pipes_struct *p) r.out.resume_handle = r.in.resume_handle; r.out.result = _svcctl_EnumServicesStatusA(p, r.in.handle, r.in.type, r.in.state, r.in.buf_size, r.out.service, r.out.bytes_needed, r.out.services_returned, r.in.resume_handle); + if (p->rng_fault_state) { + talloc_free(mem_ctx); + /* Return True here, srv_pipe_hnd.c will take care */ + return True; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(svcctl_EnumServicesStatusA, &r); @@ -1696,7 +1912,7 @@ static BOOL api_svcctl_EnumServicesStatusA(pipes_struct *p) } blob = ndr_push_blob(push); - if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { talloc_free(mem_ctx); return False; } @@ -1721,8 +1937,10 @@ static BOOL api_svcctl_OpenSCManagerA(pipes_struct *p) } pull = ndr_pull_init_blob(&blob, mem_ctx); - if (pull == NULL) + if (pull == NULL) { + talloc_free(mem_ctx); return False; + } pull->flags |= LIBNDR_FLAG_REF_ALLOC; status = ndr_pull_svcctl_OpenSCManagerA(pull, NDR_IN, &r); @@ -1743,6 +1961,12 @@ static BOOL api_svcctl_OpenSCManagerA(pipes_struct *p) r.out.result = _svcctl_OpenSCManagerA(p, r.in.MachineName, r.in.DatabaseName, r.in.access_mask, r.out.handle); + if (p->rng_fault_state) { + talloc_free(mem_ctx); + /* Return True here, srv_pipe_hnd.c will take care */ + return True; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(svcctl_OpenSCManagerA, &r); @@ -1759,7 +1983,7 @@ static BOOL api_svcctl_OpenSCManagerA(pipes_struct *p) } blob = ndr_push_blob(push); - if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { talloc_free(mem_ctx); return False; } @@ -1784,8 +2008,10 @@ static BOOL api_svcctl_OpenServiceA(pipes_struct *p) } pull = ndr_pull_init_blob(&blob, mem_ctx); - if (pull == NULL) + if (pull == NULL) { + talloc_free(mem_ctx); return False; + } pull->flags |= LIBNDR_FLAG_REF_ALLOC; status = ndr_pull_svcctl_OpenServiceA(pull, NDR_IN, &r); @@ -1799,6 +2025,12 @@ static BOOL api_svcctl_OpenServiceA(pipes_struct *p) r.out.result = _svcctl_OpenServiceA(p, r.in.scmanager_handle, r.in.ServiceName, r.in.access_mask); + if (p->rng_fault_state) { + talloc_free(mem_ctx); + /* Return True here, srv_pipe_hnd.c will take care */ + return True; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(svcctl_OpenServiceA, &r); @@ -1815,7 +2047,7 @@ static BOOL api_svcctl_OpenServiceA(pipes_struct *p) } blob = ndr_push_blob(push); - if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { talloc_free(mem_ctx); return False; } @@ -1840,8 +2072,10 @@ static BOOL api_svcctl_QueryServiceConfigA(pipes_struct *p) } pull = ndr_pull_init_blob(&blob, mem_ctx); - if (pull == NULL) + if (pull == NULL) { + talloc_free(mem_ctx); return False; + } pull->flags |= LIBNDR_FLAG_REF_ALLOC; status = ndr_pull_svcctl_QueryServiceConfigA(pull, NDR_IN, &r); @@ -1868,6 +2102,12 @@ static BOOL api_svcctl_QueryServiceConfigA(pipes_struct *p) r.out.result = _svcctl_QueryServiceConfigA(p, r.in.handle, r.out.query, r.in.buf_size, r.out.bytes_needed); + if (p->rng_fault_state) { + talloc_free(mem_ctx); + /* Return True here, srv_pipe_hnd.c will take care */ + return True; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceConfigA, &r); @@ -1884,7 +2124,7 @@ static BOOL api_svcctl_QueryServiceConfigA(pipes_struct *p) } blob = ndr_push_blob(push); - if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { talloc_free(mem_ctx); return False; } @@ -1909,8 +2149,10 @@ static BOOL api_svcctl_QueryServiceLockStatusA(pipes_struct *p) } pull = ndr_pull_init_blob(&blob, mem_ctx); - if (pull == NULL) + if (pull == NULL) { + talloc_free(mem_ctx); return False; + } pull->flags |= LIBNDR_FLAG_REF_ALLOC; status = ndr_pull_svcctl_QueryServiceLockStatusA(pull, NDR_IN, &r); @@ -1937,6 +2179,12 @@ static BOOL api_svcctl_QueryServiceLockStatusA(pipes_struct *p) r.out.result = _svcctl_QueryServiceLockStatusA(p, r.in.handle, r.in.buf_size, r.out.status, r.out.required_buf_size); + if (p->rng_fault_state) { + talloc_free(mem_ctx); + /* Return True here, srv_pipe_hnd.c will take care */ + return True; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceLockStatusA, &r); @@ -1953,7 +2201,7 @@ static BOOL api_svcctl_QueryServiceLockStatusA(pipes_struct *p) } blob = ndr_push_blob(push); - if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { talloc_free(mem_ctx); return False; } @@ -1978,8 +2226,10 @@ static BOOL api_svcctl_StartServiceA(pipes_struct *p) } pull = ndr_pull_init_blob(&blob, mem_ctx); - if (pull == NULL) + if (pull == NULL) { + talloc_free(mem_ctx); return False; + } pull->flags |= LIBNDR_FLAG_REF_ALLOC; status = ndr_pull_svcctl_StartServiceA(pull, NDR_IN, &r); @@ -1993,6 +2243,12 @@ static BOOL api_svcctl_StartServiceA(pipes_struct *p) r.out.result = _svcctl_StartServiceA(p, r.in.handle, r.in.NumArgs, r.in.Arguments); + if (p->rng_fault_state) { + talloc_free(mem_ctx); + /* Return True here, srv_pipe_hnd.c will take care */ + return True; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(svcctl_StartServiceA, &r); @@ -2009,7 +2265,7 @@ static BOOL api_svcctl_StartServiceA(pipes_struct *p) } blob = ndr_push_blob(push); - if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { talloc_free(mem_ctx); return False; } @@ -2034,8 +2290,10 @@ static BOOL api_svcctl_GetServiceDisplayNameA(pipes_struct *p) } pull = ndr_pull_init_blob(&blob, mem_ctx); - if (pull == NULL) + if (pull == NULL) { + talloc_free(mem_ctx); return False; + } pull->flags |= LIBNDR_FLAG_REF_ALLOC; status = ndr_pull_svcctl_GetServiceDisplayNameA(pull, NDR_IN, &r); @@ -2057,6 +2315,12 @@ static BOOL api_svcctl_GetServiceDisplayNameA(pipes_struct *p) r.out.display_name_length = r.in.display_name_length; r.out.result = _svcctl_GetServiceDisplayNameA(p, r.in.handle, r.in.service_name, r.out.display_name, r.in.display_name_length); + if (p->rng_fault_state) { + talloc_free(mem_ctx); + /* Return True here, srv_pipe_hnd.c will take care */ + return True; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(svcctl_GetServiceDisplayNameA, &r); @@ -2073,7 +2337,7 @@ static BOOL api_svcctl_GetServiceDisplayNameA(pipes_struct *p) } blob = ndr_push_blob(push); - if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { talloc_free(mem_ctx); return False; } @@ -2098,8 +2362,10 @@ static BOOL api_svcctl_GetServiceKeyNameA(pipes_struct *p) } pull = ndr_pull_init_blob(&blob, mem_ctx); - if (pull == NULL) + if (pull == NULL) { + talloc_free(mem_ctx); return False; + } pull->flags |= LIBNDR_FLAG_REF_ALLOC; status = ndr_pull_svcctl_GetServiceKeyNameA(pull, NDR_IN, &r); @@ -2121,6 +2387,12 @@ static BOOL api_svcctl_GetServiceKeyNameA(pipes_struct *p) r.out.display_name_length = r.in.display_name_length; r.out.result = _svcctl_GetServiceKeyNameA(p, r.in.handle, r.in.service_name, r.out.key_name, r.in.display_name_length); + if (p->rng_fault_state) { + talloc_free(mem_ctx); + /* Return True here, srv_pipe_hnd.c will take care */ + return True; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(svcctl_GetServiceKeyNameA, &r); @@ -2137,7 +2409,7 @@ static BOOL api_svcctl_GetServiceKeyNameA(pipes_struct *p) } blob = ndr_push_blob(push); - if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { talloc_free(mem_ctx); return False; } @@ -2162,8 +2434,10 @@ static BOOL api_svcctl_GetCurrentGroupeStateW(pipes_struct *p) } pull = ndr_pull_init_blob(&blob, mem_ctx); - if (pull == NULL) + if (pull == NULL) { + talloc_free(mem_ctx); return False; + } pull->flags |= LIBNDR_FLAG_REF_ALLOC; status = ndr_pull_svcctl_GetCurrentGroupeStateW(pull, NDR_IN, &r); @@ -2177,6 +2451,12 @@ static BOOL api_svcctl_GetCurrentGroupeStateW(pipes_struct *p) r.out.result = _svcctl_GetCurrentGroupeStateW(p); + if (p->rng_fault_state) { + talloc_free(mem_ctx); + /* Return True here, srv_pipe_hnd.c will take care */ + return True; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(svcctl_GetCurrentGroupeStateW, &r); @@ -2193,7 +2473,7 @@ static BOOL api_svcctl_GetCurrentGroupeStateW(pipes_struct *p) } blob = ndr_push_blob(push); - if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { talloc_free(mem_ctx); return False; } @@ -2218,8 +2498,10 @@ static BOOL api_svcctl_EnumServiceGroupW(pipes_struct *p) } pull = ndr_pull_init_blob(&blob, mem_ctx); - if (pull == NULL) + if (pull == NULL) { + talloc_free(mem_ctx); return False; + } pull->flags |= LIBNDR_FLAG_REF_ALLOC; status = ndr_pull_svcctl_EnumServiceGroupW(pull, NDR_IN, &r); @@ -2233,6 +2515,12 @@ static BOOL api_svcctl_EnumServiceGroupW(pipes_struct *p) r.out.result = _svcctl_EnumServiceGroupW(p); + if (p->rng_fault_state) { + talloc_free(mem_ctx); + /* Return True here, srv_pipe_hnd.c will take care */ + return True; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(svcctl_EnumServiceGroupW, &r); @@ -2249,7 +2537,7 @@ static BOOL api_svcctl_EnumServiceGroupW(pipes_struct *p) } blob = ndr_push_blob(push); - if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { talloc_free(mem_ctx); return False; } @@ -2274,8 +2562,10 @@ static BOOL api_svcctl_ChangeServiceConfig2A(pipes_struct *p) } pull = ndr_pull_init_blob(&blob, mem_ctx); - if (pull == NULL) + if (pull == NULL) { + talloc_free(mem_ctx); return False; + } pull->flags |= LIBNDR_FLAG_REF_ALLOC; status = ndr_pull_svcctl_ChangeServiceConfig2A(pull, NDR_IN, &r); @@ -2289,6 +2579,12 @@ static BOOL api_svcctl_ChangeServiceConfig2A(pipes_struct *p) r.out.result = _svcctl_ChangeServiceConfig2A(p, r.in.handle, r.in.info_level, r.in.info); + if (p->rng_fault_state) { + talloc_free(mem_ctx); + /* Return True here, srv_pipe_hnd.c will take care */ + return True; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(svcctl_ChangeServiceConfig2A, &r); @@ -2305,7 +2601,7 @@ static BOOL api_svcctl_ChangeServiceConfig2A(pipes_struct *p) } blob = ndr_push_blob(push); - if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { talloc_free(mem_ctx); return False; } @@ -2330,8 +2626,10 @@ static BOOL api_svcctl_ChangeServiceConfig2W(pipes_struct *p) } pull = ndr_pull_init_blob(&blob, mem_ctx); - if (pull == NULL) + if (pull == NULL) { + talloc_free(mem_ctx); return False; + } pull->flags |= LIBNDR_FLAG_REF_ALLOC; status = ndr_pull_svcctl_ChangeServiceConfig2W(pull, NDR_IN, &r); @@ -2345,6 +2643,12 @@ static BOOL api_svcctl_ChangeServiceConfig2W(pipes_struct *p) r.out.result = _svcctl_ChangeServiceConfig2W(p, r.in.handle, r.in.info_level, r.in.info); + if (p->rng_fault_state) { + talloc_free(mem_ctx); + /* Return True here, srv_pipe_hnd.c will take care */ + return True; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(svcctl_ChangeServiceConfig2W, &r); @@ -2361,7 +2665,7 @@ static BOOL api_svcctl_ChangeServiceConfig2W(pipes_struct *p) } blob = ndr_push_blob(push); - if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { talloc_free(mem_ctx); return False; } @@ -2386,8 +2690,10 @@ static BOOL api_svcctl_QueryServiceConfig2A(pipes_struct *p) } pull = ndr_pull_init_blob(&blob, mem_ctx); - if (pull == NULL) + if (pull == NULL) { + talloc_free(mem_ctx); return False; + } pull->flags |= LIBNDR_FLAG_REF_ALLOC; status = ndr_pull_svcctl_QueryServiceConfig2A(pull, NDR_IN, &r); @@ -2414,6 +2720,12 @@ static BOOL api_svcctl_QueryServiceConfig2A(pipes_struct *p) r.out.result = _svcctl_QueryServiceConfig2A(p, r.in.handle, r.in.info_level, r.out.buffer, r.in.buf_size, r.out.bytes_needed); + if (p->rng_fault_state) { + talloc_free(mem_ctx); + /* Return True here, srv_pipe_hnd.c will take care */ + return True; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceConfig2A, &r); @@ -2430,7 +2742,7 @@ static BOOL api_svcctl_QueryServiceConfig2A(pipes_struct *p) } blob = ndr_push_blob(push); - if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { talloc_free(mem_ctx); return False; } @@ -2455,8 +2767,10 @@ static BOOL api_svcctl_QueryServiceConfig2W(pipes_struct *p) } pull = ndr_pull_init_blob(&blob, mem_ctx); - if (pull == NULL) + if (pull == NULL) { + talloc_free(mem_ctx); return False; + } pull->flags |= LIBNDR_FLAG_REF_ALLOC; status = ndr_pull_svcctl_QueryServiceConfig2W(pull, NDR_IN, &r); @@ -2483,6 +2797,12 @@ static BOOL api_svcctl_QueryServiceConfig2W(pipes_struct *p) r.out.result = _svcctl_QueryServiceConfig2W(p, r.in.handle, r.in.info_level, r.out.buffer, r.in.buf_size, r.out.bytes_needed); + if (p->rng_fault_state) { + talloc_free(mem_ctx); + /* Return True here, srv_pipe_hnd.c will take care */ + return True; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceConfig2W, &r); @@ -2499,7 +2819,7 @@ static BOOL api_svcctl_QueryServiceConfig2W(pipes_struct *p) } blob = ndr_push_blob(push); - if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { talloc_free(mem_ctx); return False; } @@ -2524,8 +2844,10 @@ static BOOL api_svcctl_QueryServiceStatusEx(pipes_struct *p) } pull = ndr_pull_init_blob(&blob, mem_ctx); - if (pull == NULL) + if (pull == NULL) { + talloc_free(mem_ctx); return False; + } pull->flags |= LIBNDR_FLAG_REF_ALLOC; status = ndr_pull_svcctl_QueryServiceStatusEx(pull, NDR_IN, &r); @@ -2552,6 +2874,12 @@ static BOOL api_svcctl_QueryServiceStatusEx(pipes_struct *p) r.out.result = _svcctl_QueryServiceStatusEx(p, r.in.handle, r.in.info_level, r.out.buffer, r.in.buf_size, r.out.bytes_needed); + if (p->rng_fault_state) { + talloc_free(mem_ctx); + /* Return True here, srv_pipe_hnd.c will take care */ + return True; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceStatusEx, &r); @@ -2568,7 +2896,7 @@ static BOOL api_svcctl_QueryServiceStatusEx(pipes_struct *p) } blob = ndr_push_blob(push); - if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { talloc_free(mem_ctx); return False; } @@ -2593,8 +2921,10 @@ static BOOL api_EnumServicesStatusExA(pipes_struct *p) } pull = ndr_pull_init_blob(&blob, mem_ctx); - if (pull == NULL) + if (pull == NULL) { + talloc_free(mem_ctx); return False; + } pull->flags |= LIBNDR_FLAG_REF_ALLOC; status = ndr_pull_EnumServicesStatusExA(pull, NDR_IN, &r); @@ -2634,6 +2964,12 @@ static BOOL api_EnumServicesStatusExA(pipes_struct *p) r.out.result = _EnumServicesStatusExA(p, r.in.scmanager, r.in.info_level, r.in.type, r.in.state, r.out.services, r.in.buf_size, r.out.bytes_needed, r.out.service_returned, r.in.resume_handle, r.out.group_name); + if (p->rng_fault_state) { + talloc_free(mem_ctx); + /* Return True here, srv_pipe_hnd.c will take care */ + return True; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(EnumServicesStatusExA, &r); @@ -2650,7 +2986,7 @@ static BOOL api_EnumServicesStatusExA(pipes_struct *p) } blob = ndr_push_blob(push); - if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { talloc_free(mem_ctx); return False; } @@ -2675,8 +3011,10 @@ static BOOL api_EnumServicesStatusExW(pipes_struct *p) } pull = ndr_pull_init_blob(&blob, mem_ctx); - if (pull == NULL) + if (pull == NULL) { + talloc_free(mem_ctx); return False; + } pull->flags |= LIBNDR_FLAG_REF_ALLOC; status = ndr_pull_EnumServicesStatusExW(pull, NDR_IN, &r); @@ -2716,6 +3054,12 @@ static BOOL api_EnumServicesStatusExW(pipes_struct *p) r.out.result = _EnumServicesStatusExW(p, r.in.scmanager, r.in.info_level, r.in.type, r.in.state, r.out.services, r.in.buf_size, r.out.bytes_needed, r.out.service_returned, r.in.resume_handle, r.out.group_name); + if (p->rng_fault_state) { + talloc_free(mem_ctx); + /* Return True here, srv_pipe_hnd.c will take care */ + return True; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(EnumServicesStatusExW, &r); @@ -2732,7 +3076,7 @@ static BOOL api_EnumServicesStatusExW(pipes_struct *p) } blob = ndr_push_blob(push); - if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { talloc_free(mem_ctx); return False; } @@ -2757,8 +3101,10 @@ static BOOL api_svcctl_SCSendTSMessage(pipes_struct *p) } pull = ndr_pull_init_blob(&blob, mem_ctx); - if (pull == NULL) + if (pull == NULL) { + talloc_free(mem_ctx); return False; + } pull->flags |= LIBNDR_FLAG_REF_ALLOC; status = ndr_pull_svcctl_SCSendTSMessage(pull, NDR_IN, &r); @@ -2772,6 +3118,12 @@ static BOOL api_svcctl_SCSendTSMessage(pipes_struct *p) r.out.result = _svcctl_SCSendTSMessage(p); + if (p->rng_fault_state) { + talloc_free(mem_ctx); + /* Return True here, srv_pipe_hnd.c will take care */ + return True; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(svcctl_SCSendTSMessage, &r); @@ -2788,7 +3140,7 @@ static BOOL api_svcctl_SCSendTSMessage(pipes_struct *p) } blob = ndr_push_blob(push); - if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { talloc_free(mem_ctx); return False; } -- cgit From e2e7ad91a9aa3b8a1270e1148550fee9e3fedc79 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 16 Jan 2007 17:48:59 +0000 Subject: r20837: Use real type name, to fix compilation with -WC++-compat (This used to be commit 840485686d2b3765bd01fbe442f712803d1f4c0f) --- source3/librpc/gen_ndr/srv_svcctl.c | 96 ++++++++++++++++++------------------- 1 file changed, 48 insertions(+), 48 deletions(-) (limited to 'source3/librpc/gen_ndr/srv_svcctl.c') diff --git a/source3/librpc/gen_ndr/srv_svcctl.c b/source3/librpc/gen_ndr/srv_svcctl.c index efedf1ef3c..92b91d2fae 100644 --- a/source3/librpc/gen_ndr/srv_svcctl.c +++ b/source3/librpc/gen_ndr/srv_svcctl.c @@ -103,7 +103,7 @@ static BOOL api_svcctl_ControlService(pipes_struct *p) NDR_PRINT_IN_DEBUG(svcctl_ControlService, &r); ZERO_STRUCT(r.out); - r.out.status = talloc_zero_size(mem_ctx, sizeof(*r.out.status)); + r.out.status = talloc_zero(mem_ctx, struct SERVICE_STATUS); if (r.out.status == NULL) { talloc_free(mem_ctx); return False; @@ -238,7 +238,7 @@ static BOOL api_svcctl_LockServiceDatabase(pipes_struct *p) NDR_PRINT_IN_DEBUG(svcctl_LockServiceDatabase, &r); ZERO_STRUCT(r.out); - r.out.lock = talloc_zero_size(mem_ctx, sizeof(*r.out.lock)); + r.out.lock = talloc_zero(mem_ctx, struct policy_handle); if (r.out.lock == NULL) { talloc_free(mem_ctx); return False; @@ -437,7 +437,7 @@ static BOOL api_svcctl_QueryServiceStatus(pipes_struct *p) NDR_PRINT_IN_DEBUG(svcctl_QueryServiceStatus, &r); ZERO_STRUCT(r.out); - r.out.status = talloc_zero_size(mem_ctx, sizeof(*r.out.status)); + r.out.status = talloc_zero(mem_ctx, struct SERVICE_STATUS); if (r.out.status == NULL) { talloc_free(mem_ctx); return False; @@ -766,7 +766,7 @@ static BOOL api_svcctl_ChangeServiceConfigW(pipes_struct *p) NDR_PRINT_IN_DEBUG(svcctl_ChangeServiceConfigW, &r); ZERO_STRUCT(r.out); - r.out.tag_id = talloc_zero_size(mem_ctx, sizeof(*r.out.tag_id)); + r.out.tag_id = talloc_zero(mem_ctx, uint32_t); if (r.out.tag_id == NULL) { talloc_free(mem_ctx); return False; @@ -838,7 +838,7 @@ static BOOL api_svcctl_CreateServiceW(pipes_struct *p) ZERO_STRUCT(r.out); r.out.TagId = r.in.TagId; - r.out.handle = talloc_zero_size(mem_ctx, sizeof(*r.out.handle)); + r.out.handle = talloc_zero(mem_ctx, struct policy_handle); if (r.out.handle == NULL) { talloc_free(mem_ctx); return False; @@ -909,19 +909,19 @@ static BOOL api_svcctl_EnumDependentServicesW(pipes_struct *p) NDR_PRINT_IN_DEBUG(svcctl_EnumDependentServicesW, &r); ZERO_STRUCT(r.out); - r.out.status = talloc_zero_size(mem_ctx, sizeof(*r.out.status)); + r.out.status = talloc_zero(mem_ctx, struct ENUM_SERVICE_STATUS); if (r.out.status == NULL) { talloc_free(mem_ctx); return False; } - r.out.bytes_needed = talloc_zero_size(mem_ctx, sizeof(*r.out.bytes_needed)); + r.out.bytes_needed = talloc_zero(mem_ctx, uint32_t); if (r.out.bytes_needed == NULL) { talloc_free(mem_ctx); return False; } - r.out.services_returned = talloc_zero_size(mem_ctx, sizeof(*r.out.services_returned)); + r.out.services_returned = talloc_zero(mem_ctx, uint32_t); if (r.out.services_returned == NULL) { talloc_free(mem_ctx); return False; @@ -992,19 +992,19 @@ static BOOL api_svcctl_EnumServicesStatusW(pipes_struct *p) NDR_PRINT_IN_DEBUG(svcctl_EnumServicesStatusW, &r); ZERO_STRUCT(r.out); - r.out.service = talloc_zero_size(mem_ctx, sizeof(*r.out.service) * r.in.buf_size); + r.out.service = talloc_zero_array(mem_ctx, uint8_t, r.in.buf_size); if (r.out.service == NULL) { talloc_free(mem_ctx); return False; } - r.out.bytes_needed = talloc_zero_size(mem_ctx, sizeof(*r.out.bytes_needed)); + r.out.bytes_needed = talloc_zero(mem_ctx, uint32_t); if (r.out.bytes_needed == NULL) { talloc_free(mem_ctx); return False; } - r.out.services_returned = talloc_zero_size(mem_ctx, sizeof(*r.out.services_returned)); + r.out.services_returned = talloc_zero(mem_ctx, uint32_t); if (r.out.services_returned == NULL) { talloc_free(mem_ctx); return False; @@ -1076,7 +1076,7 @@ static BOOL api_svcctl_OpenSCManagerW(pipes_struct *p) NDR_PRINT_IN_DEBUG(svcctl_OpenSCManagerW, &r); ZERO_STRUCT(r.out); - r.out.handle = talloc_zero_size(mem_ctx, sizeof(*r.out.handle)); + r.out.handle = talloc_zero(mem_ctx, struct policy_handle); if (r.out.handle == NULL) { talloc_free(mem_ctx); return False; @@ -1147,7 +1147,7 @@ static BOOL api_svcctl_OpenServiceW(pipes_struct *p) NDR_PRINT_IN_DEBUG(svcctl_OpenServiceW, &r); ZERO_STRUCT(r.out); - r.out.handle = talloc_zero_size(mem_ctx, sizeof(*r.out.handle)); + r.out.handle = talloc_zero(mem_ctx, struct policy_handle); if (r.out.handle == NULL) { talloc_free(mem_ctx); return False; @@ -1218,13 +1218,13 @@ static BOOL api_svcctl_QueryServiceConfigW(pipes_struct *p) NDR_PRINT_IN_DEBUG(svcctl_QueryServiceConfigW, &r); ZERO_STRUCT(r.out); - r.out.query = talloc_zero_size(mem_ctx, sizeof(*r.out.query) * r.in.buf_size); + r.out.query = talloc_zero_array(mem_ctx, uint8_t, r.in.buf_size); if (r.out.query == NULL) { talloc_free(mem_ctx); return False; } - r.out.bytes_needed = talloc_zero_size(mem_ctx, sizeof(*r.out.bytes_needed)); + r.out.bytes_needed = talloc_zero(mem_ctx, uint32_t); if (r.out.bytes_needed == NULL) { talloc_free(mem_ctx); return False; @@ -1295,13 +1295,13 @@ static BOOL api_svcctl_QueryServiceLockStatusW(pipes_struct *p) NDR_PRINT_IN_DEBUG(svcctl_QueryServiceLockStatusW, &r); ZERO_STRUCT(r.out); - r.out.status = talloc_zero_size(mem_ctx, sizeof(*r.out.status)); + r.out.status = talloc_zero(mem_ctx, struct SERVICE_LOCK_STATUS); if (r.out.status == NULL) { talloc_free(mem_ctx); return False; } - r.out.required_buf_size = talloc_zero_size(mem_ctx, sizeof(*r.out.required_buf_size)); + r.out.required_buf_size = talloc_zero(mem_ctx, uint32_t); if (r.out.required_buf_size == NULL) { talloc_free(mem_ctx); return False; @@ -1436,7 +1436,7 @@ static BOOL api_svcctl_GetServiceDisplayNameW(pipes_struct *p) NDR_PRINT_IN_DEBUG(svcctl_GetServiceDisplayNameW, &r); ZERO_STRUCT(r.out); - r.out.display_name = talloc_zero_size(mem_ctx, sizeof(*r.out.display_name)); + r.out.display_name = talloc_zero(mem_ctx, const char *); if (r.out.display_name == NULL) { talloc_free(mem_ctx); return False; @@ -1508,7 +1508,7 @@ static BOOL api_svcctl_GetServiceKeyNameW(pipes_struct *p) NDR_PRINT_IN_DEBUG(svcctl_GetServiceKeyNameW, &r); ZERO_STRUCT(r.out); - r.out.key_name = talloc_zero_size(mem_ctx, sizeof(*r.out.key_name)); + r.out.key_name = talloc_zero(mem_ctx, const char *); if (r.out.key_name == NULL) { talloc_free(mem_ctx); return False; @@ -1644,7 +1644,7 @@ static BOOL api_svcctl_ChangeServiceConfigA(pipes_struct *p) NDR_PRINT_IN_DEBUG(svcctl_ChangeServiceConfigA, &r); ZERO_STRUCT(r.out); - r.out.tag_id = talloc_zero_size(mem_ctx, sizeof(*r.out.tag_id)); + r.out.tag_id = talloc_zero(mem_ctx, uint32_t); if (r.out.tag_id == NULL) { talloc_free(mem_ctx); return False; @@ -1715,7 +1715,7 @@ static BOOL api_svcctl_CreateServiceA(pipes_struct *p) NDR_PRINT_IN_DEBUG(svcctl_CreateServiceA, &r); ZERO_STRUCT(r.out); - r.out.TagId = talloc_zero_size(mem_ctx, sizeof(*r.out.TagId)); + r.out.TagId = talloc_zero(mem_ctx, uint32_t); if (r.out.TagId == NULL) { talloc_free(mem_ctx); return False; @@ -1786,19 +1786,19 @@ static BOOL api_svcctl_EnumDependentServicesA(pipes_struct *p) NDR_PRINT_IN_DEBUG(svcctl_EnumDependentServicesA, &r); ZERO_STRUCT(r.out); - r.out.status = talloc_zero_size(mem_ctx, sizeof(*r.out.status)); + r.out.status = talloc_zero(mem_ctx, struct ENUM_SERVICE_STATUS); if (r.out.status == NULL) { talloc_free(mem_ctx); return False; } - r.out.bytes_needed = talloc_zero_size(mem_ctx, sizeof(*r.out.bytes_needed)); + r.out.bytes_needed = talloc_zero(mem_ctx, uint32_t); if (r.out.bytes_needed == NULL) { talloc_free(mem_ctx); return False; } - r.out.services_returned = talloc_zero_size(mem_ctx, sizeof(*r.out.services_returned)); + r.out.services_returned = talloc_zero(mem_ctx, uint32_t); if (r.out.services_returned == NULL) { talloc_free(mem_ctx); return False; @@ -1869,19 +1869,19 @@ static BOOL api_svcctl_EnumServicesStatusA(pipes_struct *p) NDR_PRINT_IN_DEBUG(svcctl_EnumServicesStatusA, &r); ZERO_STRUCT(r.out); - r.out.service = talloc_zero_size(mem_ctx, sizeof(*r.out.service) * r.in.buf_size); + r.out.service = talloc_zero_array(mem_ctx, uint8_t, r.in.buf_size); if (r.out.service == NULL) { talloc_free(mem_ctx); return False; } - r.out.bytes_needed = talloc_zero_size(mem_ctx, sizeof(*r.out.bytes_needed)); + r.out.bytes_needed = talloc_zero(mem_ctx, uint32_t); if (r.out.bytes_needed == NULL) { talloc_free(mem_ctx); return False; } - r.out.services_returned = talloc_zero_size(mem_ctx, sizeof(*r.out.services_returned)); + r.out.services_returned = talloc_zero(mem_ctx, uint32_t); if (r.out.services_returned == NULL) { talloc_free(mem_ctx); return False; @@ -1953,7 +1953,7 @@ static BOOL api_svcctl_OpenSCManagerA(pipes_struct *p) NDR_PRINT_IN_DEBUG(svcctl_OpenSCManagerA, &r); ZERO_STRUCT(r.out); - r.out.handle = talloc_zero_size(mem_ctx, sizeof(*r.out.handle)); + r.out.handle = talloc_zero(mem_ctx, struct policy_handle); if (r.out.handle == NULL) { talloc_free(mem_ctx); return False; @@ -2088,13 +2088,13 @@ static BOOL api_svcctl_QueryServiceConfigA(pipes_struct *p) NDR_PRINT_IN_DEBUG(svcctl_QueryServiceConfigA, &r); ZERO_STRUCT(r.out); - r.out.query = talloc_zero_size(mem_ctx, sizeof(*r.out.query) * r.in.buf_size); + r.out.query = talloc_zero_array(mem_ctx, uint8_t, r.in.buf_size); if (r.out.query == NULL) { talloc_free(mem_ctx); return False; } - r.out.bytes_needed = talloc_zero_size(mem_ctx, sizeof(*r.out.bytes_needed)); + r.out.bytes_needed = talloc_zero(mem_ctx, uint32_t); if (r.out.bytes_needed == NULL) { talloc_free(mem_ctx); return False; @@ -2165,13 +2165,13 @@ static BOOL api_svcctl_QueryServiceLockStatusA(pipes_struct *p) NDR_PRINT_IN_DEBUG(svcctl_QueryServiceLockStatusA, &r); ZERO_STRUCT(r.out); - r.out.status = talloc_zero_size(mem_ctx, sizeof(*r.out.status)); + r.out.status = talloc_zero(mem_ctx, struct SERVICE_LOCK_STATUS); if (r.out.status == NULL) { talloc_free(mem_ctx); return False; } - r.out.required_buf_size = talloc_zero_size(mem_ctx, sizeof(*r.out.required_buf_size)); + r.out.required_buf_size = talloc_zero(mem_ctx, uint32_t); if (r.out.required_buf_size == NULL) { talloc_free(mem_ctx); return False; @@ -2306,7 +2306,7 @@ static BOOL api_svcctl_GetServiceDisplayNameA(pipes_struct *p) NDR_PRINT_IN_DEBUG(svcctl_GetServiceDisplayNameA, &r); ZERO_STRUCT(r.out); - r.out.display_name = talloc_zero_size(mem_ctx, sizeof(*r.out.display_name)); + r.out.display_name = talloc_zero(mem_ctx, const char *); if (r.out.display_name == NULL) { talloc_free(mem_ctx); return False; @@ -2378,7 +2378,7 @@ static BOOL api_svcctl_GetServiceKeyNameA(pipes_struct *p) NDR_PRINT_IN_DEBUG(svcctl_GetServiceKeyNameA, &r); ZERO_STRUCT(r.out); - r.out.key_name = talloc_zero_size(mem_ctx, sizeof(*r.out.key_name)); + r.out.key_name = talloc_zero(mem_ctx, const char *); if (r.out.key_name == NULL) { talloc_free(mem_ctx); return False; @@ -2706,13 +2706,13 @@ static BOOL api_svcctl_QueryServiceConfig2A(pipes_struct *p) NDR_PRINT_IN_DEBUG(svcctl_QueryServiceConfig2A, &r); ZERO_STRUCT(r.out); - r.out.buffer = talloc_zero_size(mem_ctx, sizeof(*r.out.buffer) * r.in.buf_size); + r.out.buffer = talloc_zero_array(mem_ctx, uint8_t, r.in.buf_size); if (r.out.buffer == NULL) { talloc_free(mem_ctx); return False; } - r.out.bytes_needed = talloc_zero_size(mem_ctx, sizeof(*r.out.bytes_needed)); + r.out.bytes_needed = talloc_zero(mem_ctx, uint32_t); if (r.out.bytes_needed == NULL) { talloc_free(mem_ctx); return False; @@ -2783,13 +2783,13 @@ static BOOL api_svcctl_QueryServiceConfig2W(pipes_struct *p) NDR_PRINT_IN_DEBUG(svcctl_QueryServiceConfig2W, &r); ZERO_STRUCT(r.out); - r.out.buffer = talloc_zero_size(mem_ctx, sizeof(*r.out.buffer) * r.in.buf_size); + r.out.buffer = talloc_zero_array(mem_ctx, uint8_t, r.in.buf_size); if (r.out.buffer == NULL) { talloc_free(mem_ctx); return False; } - r.out.bytes_needed = talloc_zero_size(mem_ctx, sizeof(*r.out.bytes_needed)); + r.out.bytes_needed = talloc_zero(mem_ctx, uint32_t); if (r.out.bytes_needed == NULL) { talloc_free(mem_ctx); return False; @@ -2860,13 +2860,13 @@ static BOOL api_svcctl_QueryServiceStatusEx(pipes_struct *p) NDR_PRINT_IN_DEBUG(svcctl_QueryServiceStatusEx, &r); ZERO_STRUCT(r.out); - r.out.buffer = talloc_zero_size(mem_ctx, sizeof(*r.out.buffer) * r.in.buf_size); + r.out.buffer = talloc_zero_array(mem_ctx, uint8_t, r.in.buf_size); if (r.out.buffer == NULL) { talloc_free(mem_ctx); return False; } - r.out.bytes_needed = talloc_zero_size(mem_ctx, sizeof(*r.out.bytes_needed)); + r.out.bytes_needed = talloc_zero(mem_ctx, uint32_t); if (r.out.bytes_needed == NULL) { talloc_free(mem_ctx); return False; @@ -2937,26 +2937,26 @@ static BOOL api_EnumServicesStatusExA(pipes_struct *p) NDR_PRINT_IN_DEBUG(EnumServicesStatusExA, &r); ZERO_STRUCT(r.out); - r.out.services = talloc_zero_size(mem_ctx, sizeof(*r.out.services) * r.in.buf_size); + r.out.services = talloc_zero_array(mem_ctx, uint8_t, r.in.buf_size); if (r.out.services == NULL) { talloc_free(mem_ctx); return False; } - r.out.bytes_needed = talloc_zero_size(mem_ctx, sizeof(*r.out.bytes_needed)); + r.out.bytes_needed = talloc_zero(mem_ctx, uint32_t); if (r.out.bytes_needed == NULL) { talloc_free(mem_ctx); return False; } - r.out.service_returned = talloc_zero_size(mem_ctx, sizeof(*r.out.service_returned)); + r.out.service_returned = talloc_zero(mem_ctx, uint32_t); if (r.out.service_returned == NULL) { talloc_free(mem_ctx); return False; } r.out.resume_handle = r.in.resume_handle; - r.out.group_name = talloc_zero_size(mem_ctx, sizeof(*r.out.group_name)); + r.out.group_name = talloc_zero(mem_ctx, const char *); if (r.out.group_name == NULL) { talloc_free(mem_ctx); return False; @@ -3027,26 +3027,26 @@ static BOOL api_EnumServicesStatusExW(pipes_struct *p) NDR_PRINT_IN_DEBUG(EnumServicesStatusExW, &r); ZERO_STRUCT(r.out); - r.out.services = talloc_zero_size(mem_ctx, sizeof(*r.out.services) * r.in.buf_size); + r.out.services = talloc_zero_array(mem_ctx, uint8_t, r.in.buf_size); if (r.out.services == NULL) { talloc_free(mem_ctx); return False; } - r.out.bytes_needed = talloc_zero_size(mem_ctx, sizeof(*r.out.bytes_needed)); + r.out.bytes_needed = talloc_zero(mem_ctx, uint32_t); if (r.out.bytes_needed == NULL) { talloc_free(mem_ctx); return False; } - r.out.service_returned = talloc_zero_size(mem_ctx, sizeof(*r.out.service_returned)); + r.out.service_returned = talloc_zero(mem_ctx, uint32_t); if (r.out.service_returned == NULL) { talloc_free(mem_ctx); return False; } r.out.resume_handle = r.in.resume_handle; - r.out.group_name = talloc_zero_size(mem_ctx, sizeof(*r.out.group_name)); + r.out.group_name = talloc_zero(mem_ctx, const char *); if (r.out.group_name == NULL) { talloc_free(mem_ctx); return False; -- cgit From d6b3fce078869de35334c0805ff141dc8bcf5f65 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Thu, 18 Jan 2007 10:18:59 +0000 Subject: r20875: Pass DCE/RPC server call arguments as a struct rather than as separate arguments. This makes it a bit more similar to the Samba4 code. (This used to be commit 0596badb410a58e7a715e2b17bc0bef0489a2448) --- source3/librpc/gen_ndr/srv_svcctl.c | 88 ++++++++++++++++++------------------- 1 file changed, 44 insertions(+), 44 deletions(-) (limited to 'source3/librpc/gen_ndr/srv_svcctl.c') diff --git a/source3/librpc/gen_ndr/srv_svcctl.c b/source3/librpc/gen_ndr/srv_svcctl.c index 92b91d2fae..070a24d670 100644 --- a/source3/librpc/gen_ndr/srv_svcctl.c +++ b/source3/librpc/gen_ndr/srv_svcctl.c @@ -38,7 +38,7 @@ static BOOL api_svcctl_CloseServiceHandle(pipes_struct *p) ZERO_STRUCT(r.out); r.out.handle = r.in.handle; - r.out.result = _svcctl_CloseServiceHandle(p, r.in.handle); + r.out.result = _svcctl_CloseServiceHandle(p, &r); if (p->rng_fault_state) { talloc_free(mem_ctx); @@ -109,7 +109,7 @@ static BOOL api_svcctl_ControlService(pipes_struct *p) return False; } - r.out.result = _svcctl_ControlService(p, r.in.handle, r.in.control, r.out.status); + r.out.result = _svcctl_ControlService(p, &r); if (p->rng_fault_state) { talloc_free(mem_ctx); @@ -173,7 +173,7 @@ static BOOL api_svcctl_DeleteService(pipes_struct *p) if (DEBUGLEVEL >= 10) NDR_PRINT_IN_DEBUG(svcctl_DeleteService, &r); - r.out.result = _svcctl_DeleteService(p, r.in.handle); + r.out.result = _svcctl_DeleteService(p, &r); if (p->rng_fault_state) { talloc_free(mem_ctx); @@ -244,7 +244,7 @@ static BOOL api_svcctl_LockServiceDatabase(pipes_struct *p) return False; } - r.out.result = _svcctl_LockServiceDatabase(p, r.in.handle, r.out.lock); + r.out.result = _svcctl_LockServiceDatabase(p, &r); if (p->rng_fault_state) { talloc_free(mem_ctx); @@ -308,7 +308,7 @@ static BOOL api_svcctl_QueryServiceObjectSecurity(pipes_struct *p) if (DEBUGLEVEL >= 10) NDR_PRINT_IN_DEBUG(svcctl_QueryServiceObjectSecurity, &r); - r.out.result = _svcctl_QueryServiceObjectSecurity(p); + r.out.result = _svcctl_QueryServiceObjectSecurity(p, &r); if (p->rng_fault_state) { talloc_free(mem_ctx); @@ -372,7 +372,7 @@ static BOOL api_svcctl_SetServiceObjectSecurity(pipes_struct *p) if (DEBUGLEVEL >= 10) NDR_PRINT_IN_DEBUG(svcctl_SetServiceObjectSecurity, &r); - r.out.result = _svcctl_SetServiceObjectSecurity(p); + r.out.result = _svcctl_SetServiceObjectSecurity(p, &r); if (p->rng_fault_state) { talloc_free(mem_ctx); @@ -443,7 +443,7 @@ static BOOL api_svcctl_QueryServiceStatus(pipes_struct *p) return False; } - r.out.result = _svcctl_QueryServiceStatus(p, r.in.handle, r.out.status); + r.out.result = _svcctl_QueryServiceStatus(p, &r); if (p->rng_fault_state) { talloc_free(mem_ctx); @@ -507,7 +507,7 @@ static BOOL api_svcctl_SetServiceStatus(pipes_struct *p) if (DEBUGLEVEL >= 10) NDR_PRINT_IN_DEBUG(svcctl_SetServiceStatus, &r); - r.out.result = _svcctl_SetServiceStatus(p); + r.out.result = _svcctl_SetServiceStatus(p, &r); if (p->rng_fault_state) { talloc_free(mem_ctx); @@ -573,7 +573,7 @@ static BOOL api_svcctl_UnlockServiceDatabase(pipes_struct *p) ZERO_STRUCT(r.out); r.out.lock = r.in.lock; - r.out.result = _svcctl_UnlockServiceDatabase(p, r.in.lock); + r.out.result = _svcctl_UnlockServiceDatabase(p, &r); if (p->rng_fault_state) { talloc_free(mem_ctx); @@ -637,7 +637,7 @@ static BOOL api_svcctl_NotifyBootConfigStatus(pipes_struct *p) if (DEBUGLEVEL >= 10) NDR_PRINT_IN_DEBUG(svcctl_NotifyBootConfigStatus, &r); - r.out.result = _svcctl_NotifyBootConfigStatus(p); + r.out.result = _svcctl_NotifyBootConfigStatus(p, &r); if (p->rng_fault_state) { talloc_free(mem_ctx); @@ -701,7 +701,7 @@ static BOOL api_svcctl_SCSetServiceBitsW(pipes_struct *p) if (DEBUGLEVEL >= 10) NDR_PRINT_IN_DEBUG(svcctl_SCSetServiceBitsW, &r); - r.out.result = _svcctl_SCSetServiceBitsW(p, r.in.handle, r.in.bits, r.in.bitson, r.in.immediate); + r.out.result = _svcctl_SCSetServiceBitsW(p, &r); if (p->rng_fault_state) { talloc_free(mem_ctx); @@ -772,7 +772,7 @@ static BOOL api_svcctl_ChangeServiceConfigW(pipes_struct *p) return False; } - r.out.result = _svcctl_ChangeServiceConfigW(p, r.in.handle, r.in.type, r.in.start, r.in.error, r.in.binary_path, r.in.load_order_group, r.out.tag_id, r.in.dependencies, r.in.service_start_name, r.in.password, r.in.display_name); + r.out.result = _svcctl_ChangeServiceConfigW(p, &r); if (p->rng_fault_state) { talloc_free(mem_ctx); @@ -844,7 +844,7 @@ static BOOL api_svcctl_CreateServiceW(pipes_struct *p) return False; } - r.out.result = _svcctl_CreateServiceW(p, r.in.scmanager_handle, r.in.ServiceName, r.in.DisplayName, r.in.desired_access, r.in.type, r.in.start_type, r.in.error_control, r.in.binary_path, r.in.LoadOrderGroupKey, r.in.TagId, r.in.dependencies, r.in.dependencies_size, r.in.service_start_name, r.in.password, r.in.password_size, r.out.handle); + r.out.result = _svcctl_CreateServiceW(p, &r); if (p->rng_fault_state) { talloc_free(mem_ctx); @@ -927,7 +927,7 @@ static BOOL api_svcctl_EnumDependentServicesW(pipes_struct *p) return False; } - r.out.result = _svcctl_EnumDependentServicesW(p, r.in.service, r.in.state, r.out.status, r.in.buf_size, r.out.bytes_needed, r.out.services_returned); + r.out.result = _svcctl_EnumDependentServicesW(p, &r); if (p->rng_fault_state) { talloc_free(mem_ctx); @@ -1011,7 +1011,7 @@ static BOOL api_svcctl_EnumServicesStatusW(pipes_struct *p) } r.out.resume_handle = r.in.resume_handle; - r.out.result = _svcctl_EnumServicesStatusW(p, r.in.handle, r.in.type, r.in.state, r.in.buf_size, r.out.service, r.out.bytes_needed, r.out.services_returned, r.in.resume_handle); + r.out.result = _svcctl_EnumServicesStatusW(p, &r); if (p->rng_fault_state) { talloc_free(mem_ctx); @@ -1082,7 +1082,7 @@ static BOOL api_svcctl_OpenSCManagerW(pipes_struct *p) return False; } - r.out.result = _svcctl_OpenSCManagerW(p, r.in.MachineName, r.in.DatabaseName, r.in.access_mask, r.out.handle); + r.out.result = _svcctl_OpenSCManagerW(p, &r); if (p->rng_fault_state) { talloc_free(mem_ctx); @@ -1153,7 +1153,7 @@ static BOOL api_svcctl_OpenServiceW(pipes_struct *p) return False; } - r.out.result = _svcctl_OpenServiceW(p, r.in.scmanager_handle, r.in.ServiceName, r.in.access_mask, r.out.handle); + r.out.result = _svcctl_OpenServiceW(p, &r); if (p->rng_fault_state) { talloc_free(mem_ctx); @@ -1230,7 +1230,7 @@ static BOOL api_svcctl_QueryServiceConfigW(pipes_struct *p) return False; } - r.out.result = _svcctl_QueryServiceConfigW(p, r.in.handle, r.out.query, r.in.buf_size, r.out.bytes_needed); + r.out.result = _svcctl_QueryServiceConfigW(p, &r); if (p->rng_fault_state) { talloc_free(mem_ctx); @@ -1307,7 +1307,7 @@ static BOOL api_svcctl_QueryServiceLockStatusW(pipes_struct *p) return False; } - r.out.result = _svcctl_QueryServiceLockStatusW(p, r.in.handle, r.in.buf_size, r.out.status, r.out.required_buf_size); + r.out.result = _svcctl_QueryServiceLockStatusW(p, &r); if (p->rng_fault_state) { talloc_free(mem_ctx); @@ -1371,7 +1371,7 @@ static BOOL api_svcctl_StartServiceW(pipes_struct *p) if (DEBUGLEVEL >= 10) NDR_PRINT_IN_DEBUG(svcctl_StartServiceW, &r); - r.out.result = _svcctl_StartServiceW(p, r.in.handle, r.in.NumArgs, r.in.Arguments); + r.out.result = _svcctl_StartServiceW(p, &r); if (p->rng_fault_state) { talloc_free(mem_ctx); @@ -1443,7 +1443,7 @@ static BOOL api_svcctl_GetServiceDisplayNameW(pipes_struct *p) } r.out.display_name_length = r.in.display_name_length; - r.out.result = _svcctl_GetServiceDisplayNameW(p, r.in.handle, r.in.service_name, r.out.display_name, r.in.display_name_length); + r.out.result = _svcctl_GetServiceDisplayNameW(p, &r); if (p->rng_fault_state) { talloc_free(mem_ctx); @@ -1515,7 +1515,7 @@ static BOOL api_svcctl_GetServiceKeyNameW(pipes_struct *p) } r.out.display_name_length = r.in.display_name_length; - r.out.result = _svcctl_GetServiceKeyNameW(p, r.in.handle, r.in.service_name, r.out.key_name, r.in.display_name_length); + r.out.result = _svcctl_GetServiceKeyNameW(p, &r); if (p->rng_fault_state) { talloc_free(mem_ctx); @@ -1579,7 +1579,7 @@ static BOOL api_svcctl_SCSetServiceBitsA(pipes_struct *p) if (DEBUGLEVEL >= 10) NDR_PRINT_IN_DEBUG(svcctl_SCSetServiceBitsA, &r); - r.out.result = _svcctl_SCSetServiceBitsA(p, r.in.handle, r.in.bits, r.in.bitson, r.in.immediate); + r.out.result = _svcctl_SCSetServiceBitsA(p, &r); if (p->rng_fault_state) { talloc_free(mem_ctx); @@ -1650,7 +1650,7 @@ static BOOL api_svcctl_ChangeServiceConfigA(pipes_struct *p) return False; } - r.out.result = _svcctl_ChangeServiceConfigA(p, r.in.handle, r.in.type, r.in.start, r.in.error, r.in.binary_path, r.in.load_order_group, r.out.tag_id, r.in.dependencies, r.in.service_start_name, r.in.password, r.in.display_name); + r.out.result = _svcctl_ChangeServiceConfigA(p, &r); if (p->rng_fault_state) { talloc_free(mem_ctx); @@ -1721,7 +1721,7 @@ static BOOL api_svcctl_CreateServiceA(pipes_struct *p) return False; } - r.out.result = _svcctl_CreateServiceA(p, r.in.handle, r.in.ServiceName, r.in.DisplayName, r.in.desired_access, r.in.type, r.in.start_type, r.in.error_control, r.in.binary_path, r.in.LoadOrderGroupKey, r.out.TagId, r.in.dependencies, r.in.service_start_name, r.in.password); + r.out.result = _svcctl_CreateServiceA(p, &r); if (p->rng_fault_state) { talloc_free(mem_ctx); @@ -1804,7 +1804,7 @@ static BOOL api_svcctl_EnumDependentServicesA(pipes_struct *p) return False; } - r.out.result = _svcctl_EnumDependentServicesA(p, r.in.service, r.in.state, r.out.status, r.in.buf_size, r.out.bytes_needed, r.out.services_returned); + r.out.result = _svcctl_EnumDependentServicesA(p, &r); if (p->rng_fault_state) { talloc_free(mem_ctx); @@ -1888,7 +1888,7 @@ static BOOL api_svcctl_EnumServicesStatusA(pipes_struct *p) } r.out.resume_handle = r.in.resume_handle; - r.out.result = _svcctl_EnumServicesStatusA(p, r.in.handle, r.in.type, r.in.state, r.in.buf_size, r.out.service, r.out.bytes_needed, r.out.services_returned, r.in.resume_handle); + r.out.result = _svcctl_EnumServicesStatusA(p, &r); if (p->rng_fault_state) { talloc_free(mem_ctx); @@ -1959,7 +1959,7 @@ static BOOL api_svcctl_OpenSCManagerA(pipes_struct *p) return False; } - r.out.result = _svcctl_OpenSCManagerA(p, r.in.MachineName, r.in.DatabaseName, r.in.access_mask, r.out.handle); + r.out.result = _svcctl_OpenSCManagerA(p, &r); if (p->rng_fault_state) { talloc_free(mem_ctx); @@ -2023,7 +2023,7 @@ static BOOL api_svcctl_OpenServiceA(pipes_struct *p) if (DEBUGLEVEL >= 10) NDR_PRINT_IN_DEBUG(svcctl_OpenServiceA, &r); - r.out.result = _svcctl_OpenServiceA(p, r.in.scmanager_handle, r.in.ServiceName, r.in.access_mask); + r.out.result = _svcctl_OpenServiceA(p, &r); if (p->rng_fault_state) { talloc_free(mem_ctx); @@ -2100,7 +2100,7 @@ static BOOL api_svcctl_QueryServiceConfigA(pipes_struct *p) return False; } - r.out.result = _svcctl_QueryServiceConfigA(p, r.in.handle, r.out.query, r.in.buf_size, r.out.bytes_needed); + r.out.result = _svcctl_QueryServiceConfigA(p, &r); if (p->rng_fault_state) { talloc_free(mem_ctx); @@ -2177,7 +2177,7 @@ static BOOL api_svcctl_QueryServiceLockStatusA(pipes_struct *p) return False; } - r.out.result = _svcctl_QueryServiceLockStatusA(p, r.in.handle, r.in.buf_size, r.out.status, r.out.required_buf_size); + r.out.result = _svcctl_QueryServiceLockStatusA(p, &r); if (p->rng_fault_state) { talloc_free(mem_ctx); @@ -2241,7 +2241,7 @@ static BOOL api_svcctl_StartServiceA(pipes_struct *p) if (DEBUGLEVEL >= 10) NDR_PRINT_IN_DEBUG(svcctl_StartServiceA, &r); - r.out.result = _svcctl_StartServiceA(p, r.in.handle, r.in.NumArgs, r.in.Arguments); + r.out.result = _svcctl_StartServiceA(p, &r); if (p->rng_fault_state) { talloc_free(mem_ctx); @@ -2313,7 +2313,7 @@ static BOOL api_svcctl_GetServiceDisplayNameA(pipes_struct *p) } r.out.display_name_length = r.in.display_name_length; - r.out.result = _svcctl_GetServiceDisplayNameA(p, r.in.handle, r.in.service_name, r.out.display_name, r.in.display_name_length); + r.out.result = _svcctl_GetServiceDisplayNameA(p, &r); if (p->rng_fault_state) { talloc_free(mem_ctx); @@ -2385,7 +2385,7 @@ static BOOL api_svcctl_GetServiceKeyNameA(pipes_struct *p) } r.out.display_name_length = r.in.display_name_length; - r.out.result = _svcctl_GetServiceKeyNameA(p, r.in.handle, r.in.service_name, r.out.key_name, r.in.display_name_length); + r.out.result = _svcctl_GetServiceKeyNameA(p, &r); if (p->rng_fault_state) { talloc_free(mem_ctx); @@ -2449,7 +2449,7 @@ static BOOL api_svcctl_GetCurrentGroupeStateW(pipes_struct *p) if (DEBUGLEVEL >= 10) NDR_PRINT_IN_DEBUG(svcctl_GetCurrentGroupeStateW, &r); - r.out.result = _svcctl_GetCurrentGroupeStateW(p); + r.out.result = _svcctl_GetCurrentGroupeStateW(p, &r); if (p->rng_fault_state) { talloc_free(mem_ctx); @@ -2513,7 +2513,7 @@ static BOOL api_svcctl_EnumServiceGroupW(pipes_struct *p) if (DEBUGLEVEL >= 10) NDR_PRINT_IN_DEBUG(svcctl_EnumServiceGroupW, &r); - r.out.result = _svcctl_EnumServiceGroupW(p); + r.out.result = _svcctl_EnumServiceGroupW(p, &r); if (p->rng_fault_state) { talloc_free(mem_ctx); @@ -2577,7 +2577,7 @@ static BOOL api_svcctl_ChangeServiceConfig2A(pipes_struct *p) if (DEBUGLEVEL >= 10) NDR_PRINT_IN_DEBUG(svcctl_ChangeServiceConfig2A, &r); - r.out.result = _svcctl_ChangeServiceConfig2A(p, r.in.handle, r.in.info_level, r.in.info); + r.out.result = _svcctl_ChangeServiceConfig2A(p, &r); if (p->rng_fault_state) { talloc_free(mem_ctx); @@ -2641,7 +2641,7 @@ static BOOL api_svcctl_ChangeServiceConfig2W(pipes_struct *p) if (DEBUGLEVEL >= 10) NDR_PRINT_IN_DEBUG(svcctl_ChangeServiceConfig2W, &r); - r.out.result = _svcctl_ChangeServiceConfig2W(p, r.in.handle, r.in.info_level, r.in.info); + r.out.result = _svcctl_ChangeServiceConfig2W(p, &r); if (p->rng_fault_state) { talloc_free(mem_ctx); @@ -2718,7 +2718,7 @@ static BOOL api_svcctl_QueryServiceConfig2A(pipes_struct *p) return False; } - r.out.result = _svcctl_QueryServiceConfig2A(p, r.in.handle, r.in.info_level, r.out.buffer, r.in.buf_size, r.out.bytes_needed); + r.out.result = _svcctl_QueryServiceConfig2A(p, &r); if (p->rng_fault_state) { talloc_free(mem_ctx); @@ -2795,7 +2795,7 @@ static BOOL api_svcctl_QueryServiceConfig2W(pipes_struct *p) return False; } - r.out.result = _svcctl_QueryServiceConfig2W(p, r.in.handle, r.in.info_level, r.out.buffer, r.in.buf_size, r.out.bytes_needed); + r.out.result = _svcctl_QueryServiceConfig2W(p, &r); if (p->rng_fault_state) { talloc_free(mem_ctx); @@ -2872,7 +2872,7 @@ static BOOL api_svcctl_QueryServiceStatusEx(pipes_struct *p) return False; } - r.out.result = _svcctl_QueryServiceStatusEx(p, r.in.handle, r.in.info_level, r.out.buffer, r.in.buf_size, r.out.bytes_needed); + r.out.result = _svcctl_QueryServiceStatusEx(p, &r); if (p->rng_fault_state) { talloc_free(mem_ctx); @@ -2962,7 +2962,7 @@ static BOOL api_EnumServicesStatusExA(pipes_struct *p) return False; } - r.out.result = _EnumServicesStatusExA(p, r.in.scmanager, r.in.info_level, r.in.type, r.in.state, r.out.services, r.in.buf_size, r.out.bytes_needed, r.out.service_returned, r.in.resume_handle, r.out.group_name); + r.out.result = _EnumServicesStatusExA(p, &r); if (p->rng_fault_state) { talloc_free(mem_ctx); @@ -3052,7 +3052,7 @@ static BOOL api_EnumServicesStatusExW(pipes_struct *p) return False; } - r.out.result = _EnumServicesStatusExW(p, r.in.scmanager, r.in.info_level, r.in.type, r.in.state, r.out.services, r.in.buf_size, r.out.bytes_needed, r.out.service_returned, r.in.resume_handle, r.out.group_name); + r.out.result = _EnumServicesStatusExW(p, &r); if (p->rng_fault_state) { talloc_free(mem_ctx); @@ -3116,7 +3116,7 @@ static BOOL api_svcctl_SCSendTSMessage(pipes_struct *p) if (DEBUGLEVEL >= 10) NDR_PRINT_IN_DEBUG(svcctl_SCSendTSMessage, &r); - r.out.result = _svcctl_SCSendTSMessage(p); + r.out.result = _svcctl_SCSendTSMessage(p, &r); if (p->rng_fault_state) { talloc_free(mem_ctx); -- cgit From eec5e026adb176ad48b1ebcb0ddf71bbb609ad95 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Thu, 31 May 2007 15:46:01 +0000 Subject: r23269: Regenerate svcctl files after IDL fixes (This used to be commit 92c505bf7f15a79c6e32a38b2d218f65b0283507) --- source3/librpc/gen_ndr/srv_svcctl.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'source3/librpc/gen_ndr/srv_svcctl.c') diff --git a/source3/librpc/gen_ndr/srv_svcctl.c b/source3/librpc/gen_ndr/srv_svcctl.c index 070a24d670..0211baa583 100644 --- a/source3/librpc/gen_ndr/srv_svcctl.c +++ b/source3/librpc/gen_ndr/srv_svcctl.c @@ -103,8 +103,8 @@ static BOOL api_svcctl_ControlService(pipes_struct *p) NDR_PRINT_IN_DEBUG(svcctl_ControlService, &r); ZERO_STRUCT(r.out); - r.out.status = talloc_zero(mem_ctx, struct SERVICE_STATUS); - if (r.out.status == NULL) { + r.out.service_status = talloc_zero(mem_ctx, struct SERVICE_STATUS); + if (r.out.service_status == NULL) { talloc_free(mem_ctx); return False; } @@ -437,8 +437,8 @@ static BOOL api_svcctl_QueryServiceStatus(pipes_struct *p) NDR_PRINT_IN_DEBUG(svcctl_QueryServiceStatus, &r); ZERO_STRUCT(r.out); - r.out.status = talloc_zero(mem_ctx, struct SERVICE_STATUS); - if (r.out.status == NULL) { + r.out.service_status = talloc_zero(mem_ctx, struct SERVICE_STATUS); + if (r.out.service_status == NULL) { talloc_free(mem_ctx); return False; } @@ -909,8 +909,8 @@ static BOOL api_svcctl_EnumDependentServicesW(pipes_struct *p) NDR_PRINT_IN_DEBUG(svcctl_EnumDependentServicesW, &r); ZERO_STRUCT(r.out); - r.out.status = talloc_zero(mem_ctx, struct ENUM_SERVICE_STATUS); - if (r.out.status == NULL) { + r.out.service_status = talloc_zero(mem_ctx, struct ENUM_SERVICE_STATUS); + if (r.out.service_status == NULL) { talloc_free(mem_ctx); return False; } @@ -1295,8 +1295,8 @@ static BOOL api_svcctl_QueryServiceLockStatusW(pipes_struct *p) NDR_PRINT_IN_DEBUG(svcctl_QueryServiceLockStatusW, &r); ZERO_STRUCT(r.out); - r.out.status = talloc_zero(mem_ctx, struct SERVICE_LOCK_STATUS); - if (r.out.status == NULL) { + r.out.lock_status = talloc_zero(mem_ctx, struct SERVICE_LOCK_STATUS); + if (r.out.lock_status == NULL) { talloc_free(mem_ctx); return False; } @@ -1786,8 +1786,8 @@ static BOOL api_svcctl_EnumDependentServicesA(pipes_struct *p) NDR_PRINT_IN_DEBUG(svcctl_EnumDependentServicesA, &r); ZERO_STRUCT(r.out); - r.out.status = talloc_zero(mem_ctx, struct ENUM_SERVICE_STATUS); - if (r.out.status == NULL) { + r.out.service_status = talloc_zero(mem_ctx, struct ENUM_SERVICE_STATUS); + if (r.out.service_status == NULL) { talloc_free(mem_ctx); return False; } @@ -2165,8 +2165,8 @@ static BOOL api_svcctl_QueryServiceLockStatusA(pipes_struct *p) NDR_PRINT_IN_DEBUG(svcctl_QueryServiceLockStatusA, &r); ZERO_STRUCT(r.out); - r.out.status = talloc_zero(mem_ctx, struct SERVICE_LOCK_STATUS); - if (r.out.status == NULL) { + r.out.lock_status = talloc_zero(mem_ctx, struct SERVICE_LOCK_STATUS); + if (r.out.lock_status == NULL) { talloc_free(mem_ctx); return False; } -- cgit From 8da26d3f96ac66e3f0be8aaec209867d3f285e49 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Sun, 19 Aug 2007 22:10:11 +0000 Subject: r24561: merge from SAMBA_4_0: rename some DCERPC_ prefixes into NDR_ metze (This used to be commit 8f07b8ab658ae3d63487ca5fb20065318cdd9d0e) --- source3/librpc/gen_ndr/srv_svcctl.c | 88 ++++++++++++++++++------------------- 1 file changed, 44 insertions(+), 44 deletions(-) (limited to 'source3/librpc/gen_ndr/srv_svcctl.c') diff --git a/source3/librpc/gen_ndr/srv_svcctl.c b/source3/librpc/gen_ndr/srv_svcctl.c index 0211baa583..6386bd4563 100644 --- a/source3/librpc/gen_ndr/srv_svcctl.c +++ b/source3/librpc/gen_ndr/srv_svcctl.c @@ -3154,50 +3154,50 @@ static BOOL api_svcctl_SCSendTSMessage(pipes_struct *p) /* Tables */ static struct api_struct api_svcctl_cmds[] = { - {"SVCCTL_CLOSESERVICEHANDLE", DCERPC_SVCCTL_CLOSESERVICEHANDLE, api_svcctl_CloseServiceHandle}, - {"SVCCTL_CONTROLSERVICE", DCERPC_SVCCTL_CONTROLSERVICE, api_svcctl_ControlService}, - {"SVCCTL_DELETESERVICE", DCERPC_SVCCTL_DELETESERVICE, api_svcctl_DeleteService}, - {"SVCCTL_LOCKSERVICEDATABASE", DCERPC_SVCCTL_LOCKSERVICEDATABASE, api_svcctl_LockServiceDatabase}, - {"SVCCTL_QUERYSERVICEOBJECTSECURITY", DCERPC_SVCCTL_QUERYSERVICEOBJECTSECURITY, api_svcctl_QueryServiceObjectSecurity}, - {"SVCCTL_SETSERVICEOBJECTSECURITY", DCERPC_SVCCTL_SETSERVICEOBJECTSECURITY, api_svcctl_SetServiceObjectSecurity}, - {"SVCCTL_QUERYSERVICESTATUS", DCERPC_SVCCTL_QUERYSERVICESTATUS, api_svcctl_QueryServiceStatus}, - {"SVCCTL_SETSERVICESTATUS", DCERPC_SVCCTL_SETSERVICESTATUS, api_svcctl_SetServiceStatus}, - {"SVCCTL_UNLOCKSERVICEDATABASE", DCERPC_SVCCTL_UNLOCKSERVICEDATABASE, api_svcctl_UnlockServiceDatabase}, - {"SVCCTL_NOTIFYBOOTCONFIGSTATUS", DCERPC_SVCCTL_NOTIFYBOOTCONFIGSTATUS, api_svcctl_NotifyBootConfigStatus}, - {"SVCCTL_SCSETSERVICEBITSW", DCERPC_SVCCTL_SCSETSERVICEBITSW, api_svcctl_SCSetServiceBitsW}, - {"SVCCTL_CHANGESERVICECONFIGW", DCERPC_SVCCTL_CHANGESERVICECONFIGW, api_svcctl_ChangeServiceConfigW}, - {"SVCCTL_CREATESERVICEW", DCERPC_SVCCTL_CREATESERVICEW, api_svcctl_CreateServiceW}, - {"SVCCTL_ENUMDEPENDENTSERVICESW", DCERPC_SVCCTL_ENUMDEPENDENTSERVICESW, api_svcctl_EnumDependentServicesW}, - {"SVCCTL_ENUMSERVICESSTATUSW", DCERPC_SVCCTL_ENUMSERVICESSTATUSW, api_svcctl_EnumServicesStatusW}, - {"SVCCTL_OPENSCMANAGERW", DCERPC_SVCCTL_OPENSCMANAGERW, api_svcctl_OpenSCManagerW}, - {"SVCCTL_OPENSERVICEW", DCERPC_SVCCTL_OPENSERVICEW, api_svcctl_OpenServiceW}, - {"SVCCTL_QUERYSERVICECONFIGW", DCERPC_SVCCTL_QUERYSERVICECONFIGW, api_svcctl_QueryServiceConfigW}, - {"SVCCTL_QUERYSERVICELOCKSTATUSW", DCERPC_SVCCTL_QUERYSERVICELOCKSTATUSW, api_svcctl_QueryServiceLockStatusW}, - {"SVCCTL_STARTSERVICEW", DCERPC_SVCCTL_STARTSERVICEW, api_svcctl_StartServiceW}, - {"SVCCTL_GETSERVICEDISPLAYNAMEW", DCERPC_SVCCTL_GETSERVICEDISPLAYNAMEW, api_svcctl_GetServiceDisplayNameW}, - {"SVCCTL_GETSERVICEKEYNAMEW", DCERPC_SVCCTL_GETSERVICEKEYNAMEW, api_svcctl_GetServiceKeyNameW}, - {"SVCCTL_SCSETSERVICEBITSA", DCERPC_SVCCTL_SCSETSERVICEBITSA, api_svcctl_SCSetServiceBitsA}, - {"SVCCTL_CHANGESERVICECONFIGA", DCERPC_SVCCTL_CHANGESERVICECONFIGA, api_svcctl_ChangeServiceConfigA}, - {"SVCCTL_CREATESERVICEA", DCERPC_SVCCTL_CREATESERVICEA, api_svcctl_CreateServiceA}, - {"SVCCTL_ENUMDEPENDENTSERVICESA", DCERPC_SVCCTL_ENUMDEPENDENTSERVICESA, api_svcctl_EnumDependentServicesA}, - {"SVCCTL_ENUMSERVICESSTATUSA", DCERPC_SVCCTL_ENUMSERVICESSTATUSA, api_svcctl_EnumServicesStatusA}, - {"SVCCTL_OPENSCMANAGERA", DCERPC_SVCCTL_OPENSCMANAGERA, api_svcctl_OpenSCManagerA}, - {"SVCCTL_OPENSERVICEA", DCERPC_SVCCTL_OPENSERVICEA, api_svcctl_OpenServiceA}, - {"SVCCTL_QUERYSERVICECONFIGA", DCERPC_SVCCTL_QUERYSERVICECONFIGA, api_svcctl_QueryServiceConfigA}, - {"SVCCTL_QUERYSERVICELOCKSTATUSA", DCERPC_SVCCTL_QUERYSERVICELOCKSTATUSA, api_svcctl_QueryServiceLockStatusA}, - {"SVCCTL_STARTSERVICEA", DCERPC_SVCCTL_STARTSERVICEA, api_svcctl_StartServiceA}, - {"SVCCTL_GETSERVICEDISPLAYNAMEA", DCERPC_SVCCTL_GETSERVICEDISPLAYNAMEA, api_svcctl_GetServiceDisplayNameA}, - {"SVCCTL_GETSERVICEKEYNAMEA", DCERPC_SVCCTL_GETSERVICEKEYNAMEA, api_svcctl_GetServiceKeyNameA}, - {"SVCCTL_GETCURRENTGROUPESTATEW", DCERPC_SVCCTL_GETCURRENTGROUPESTATEW, api_svcctl_GetCurrentGroupeStateW}, - {"SVCCTL_ENUMSERVICEGROUPW", DCERPC_SVCCTL_ENUMSERVICEGROUPW, api_svcctl_EnumServiceGroupW}, - {"SVCCTL_CHANGESERVICECONFIG2A", DCERPC_SVCCTL_CHANGESERVICECONFIG2A, api_svcctl_ChangeServiceConfig2A}, - {"SVCCTL_CHANGESERVICECONFIG2W", DCERPC_SVCCTL_CHANGESERVICECONFIG2W, api_svcctl_ChangeServiceConfig2W}, - {"SVCCTL_QUERYSERVICECONFIG2A", DCERPC_SVCCTL_QUERYSERVICECONFIG2A, api_svcctl_QueryServiceConfig2A}, - {"SVCCTL_QUERYSERVICECONFIG2W", DCERPC_SVCCTL_QUERYSERVICECONFIG2W, api_svcctl_QueryServiceConfig2W}, - {"SVCCTL_QUERYSERVICESTATUSEX", DCERPC_SVCCTL_QUERYSERVICESTATUSEX, api_svcctl_QueryServiceStatusEx}, - {"ENUMSERVICESSTATUSEXA", DCERPC_ENUMSERVICESSTATUSEXA, api_EnumServicesStatusExA}, - {"ENUMSERVICESSTATUSEXW", DCERPC_ENUMSERVICESSTATUSEXW, api_EnumServicesStatusExW}, - {"SVCCTL_SCSENDTSMESSAGE", DCERPC_SVCCTL_SCSENDTSMESSAGE, api_svcctl_SCSendTSMessage}, + {"SVCCTL_CLOSESERVICEHANDLE", NDR_SVCCTL_CLOSESERVICEHANDLE, api_svcctl_CloseServiceHandle}, + {"SVCCTL_CONTROLSERVICE", NDR_SVCCTL_CONTROLSERVICE, api_svcctl_ControlService}, + {"SVCCTL_DELETESERVICE", NDR_SVCCTL_DELETESERVICE, api_svcctl_DeleteService}, + {"SVCCTL_LOCKSERVICEDATABASE", NDR_SVCCTL_LOCKSERVICEDATABASE, api_svcctl_LockServiceDatabase}, + {"SVCCTL_QUERYSERVICEOBJECTSECURITY", NDR_SVCCTL_QUERYSERVICEOBJECTSECURITY, api_svcctl_QueryServiceObjectSecurity}, + {"SVCCTL_SETSERVICEOBJECTSECURITY", NDR_SVCCTL_SETSERVICEOBJECTSECURITY, api_svcctl_SetServiceObjectSecurity}, + {"SVCCTL_QUERYSERVICESTATUS", NDR_SVCCTL_QUERYSERVICESTATUS, api_svcctl_QueryServiceStatus}, + {"SVCCTL_SETSERVICESTATUS", NDR_SVCCTL_SETSERVICESTATUS, api_svcctl_SetServiceStatus}, + {"SVCCTL_UNLOCKSERVICEDATABASE", NDR_SVCCTL_UNLOCKSERVICEDATABASE, api_svcctl_UnlockServiceDatabase}, + {"SVCCTL_NOTIFYBOOTCONFIGSTATUS", NDR_SVCCTL_NOTIFYBOOTCONFIGSTATUS, api_svcctl_NotifyBootConfigStatus}, + {"SVCCTL_SCSETSERVICEBITSW", NDR_SVCCTL_SCSETSERVICEBITSW, api_svcctl_SCSetServiceBitsW}, + {"SVCCTL_CHANGESERVICECONFIGW", NDR_SVCCTL_CHANGESERVICECONFIGW, api_svcctl_ChangeServiceConfigW}, + {"SVCCTL_CREATESERVICEW", NDR_SVCCTL_CREATESERVICEW, api_svcctl_CreateServiceW}, + {"SVCCTL_ENUMDEPENDENTSERVICESW", NDR_SVCCTL_ENUMDEPENDENTSERVICESW, api_svcctl_EnumDependentServicesW}, + {"SVCCTL_ENUMSERVICESSTATUSW", NDR_SVCCTL_ENUMSERVICESSTATUSW, api_svcctl_EnumServicesStatusW}, + {"SVCCTL_OPENSCMANAGERW", NDR_SVCCTL_OPENSCMANAGERW, api_svcctl_OpenSCManagerW}, + {"SVCCTL_OPENSERVICEW", NDR_SVCCTL_OPENSERVICEW, api_svcctl_OpenServiceW}, + {"SVCCTL_QUERYSERVICECONFIGW", NDR_SVCCTL_QUERYSERVICECONFIGW, api_svcctl_QueryServiceConfigW}, + {"SVCCTL_QUERYSERVICELOCKSTATUSW", NDR_SVCCTL_QUERYSERVICELOCKSTATUSW, api_svcctl_QueryServiceLockStatusW}, + {"SVCCTL_STARTSERVICEW", NDR_SVCCTL_STARTSERVICEW, api_svcctl_StartServiceW}, + {"SVCCTL_GETSERVICEDISPLAYNAMEW", NDR_SVCCTL_GETSERVICEDISPLAYNAMEW, api_svcctl_GetServiceDisplayNameW}, + {"SVCCTL_GETSERVICEKEYNAMEW", NDR_SVCCTL_GETSERVICEKEYNAMEW, api_svcctl_GetServiceKeyNameW}, + {"SVCCTL_SCSETSERVICEBITSA", NDR_SVCCTL_SCSETSERVICEBITSA, api_svcctl_SCSetServiceBitsA}, + {"SVCCTL_CHANGESERVICECONFIGA", NDR_SVCCTL_CHANGESERVICECONFIGA, api_svcctl_ChangeServiceConfigA}, + {"SVCCTL_CREATESERVICEA", NDR_SVCCTL_CREATESERVICEA, api_svcctl_CreateServiceA}, + {"SVCCTL_ENUMDEPENDENTSERVICESA", NDR_SVCCTL_ENUMDEPENDENTSERVICESA, api_svcctl_EnumDependentServicesA}, + {"SVCCTL_ENUMSERVICESSTATUSA", NDR_SVCCTL_ENUMSERVICESSTATUSA, api_svcctl_EnumServicesStatusA}, + {"SVCCTL_OPENSCMANAGERA", NDR_SVCCTL_OPENSCMANAGERA, api_svcctl_OpenSCManagerA}, + {"SVCCTL_OPENSERVICEA", NDR_SVCCTL_OPENSERVICEA, api_svcctl_OpenServiceA}, + {"SVCCTL_QUERYSERVICECONFIGA", NDR_SVCCTL_QUERYSERVICECONFIGA, api_svcctl_QueryServiceConfigA}, + {"SVCCTL_QUERYSERVICELOCKSTATUSA", NDR_SVCCTL_QUERYSERVICELOCKSTATUSA, api_svcctl_QueryServiceLockStatusA}, + {"SVCCTL_STARTSERVICEA", NDR_SVCCTL_STARTSERVICEA, api_svcctl_StartServiceA}, + {"SVCCTL_GETSERVICEDISPLAYNAMEA", NDR_SVCCTL_GETSERVICEDISPLAYNAMEA, api_svcctl_GetServiceDisplayNameA}, + {"SVCCTL_GETSERVICEKEYNAMEA", NDR_SVCCTL_GETSERVICEKEYNAMEA, api_svcctl_GetServiceKeyNameA}, + {"SVCCTL_GETCURRENTGROUPESTATEW", NDR_SVCCTL_GETCURRENTGROUPESTATEW, api_svcctl_GetCurrentGroupeStateW}, + {"SVCCTL_ENUMSERVICEGROUPW", NDR_SVCCTL_ENUMSERVICEGROUPW, api_svcctl_EnumServiceGroupW}, + {"SVCCTL_CHANGESERVICECONFIG2A", NDR_SVCCTL_CHANGESERVICECONFIG2A, api_svcctl_ChangeServiceConfig2A}, + {"SVCCTL_CHANGESERVICECONFIG2W", NDR_SVCCTL_CHANGESERVICECONFIG2W, api_svcctl_ChangeServiceConfig2W}, + {"SVCCTL_QUERYSERVICECONFIG2A", NDR_SVCCTL_QUERYSERVICECONFIG2A, api_svcctl_QueryServiceConfig2A}, + {"SVCCTL_QUERYSERVICECONFIG2W", NDR_SVCCTL_QUERYSERVICECONFIG2W, api_svcctl_QueryServiceConfig2W}, + {"SVCCTL_QUERYSERVICESTATUSEX", NDR_SVCCTL_QUERYSERVICESTATUSEX, api_svcctl_QueryServiceStatusEx}, + {"ENUMSERVICESSTATUSEXA", NDR_ENUMSERVICESSTATUSEXA, api_EnumServicesStatusExA}, + {"ENUMSERVICESSTATUSEXW", NDR_ENUMSERVICESSTATUSEXW, api_EnumServicesStatusExW}, + {"SVCCTL_SCSENDTSMESSAGE", NDR_SVCCTL_SCSENDTSMESSAGE, api_svcctl_SCSendTSMessage}, }; void svcctl_get_pipe_fns(struct api_struct **fns, int *n_fns) -- cgit From 96567fa3ea92e5447b66a23514df392f1f7d353c Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 21 Aug 2007 14:06:46 +0000 Subject: r24597: - talloc request structure for the samba3 server bindings and make that the primary context for the request which the implementations can also use. - go via functions pointers in the ndr_interface_table instead of calling functions directly. metze (This used to be commit 5c4d998300d0c9836eb3cc6c3cd8ee4f262396b8) --- source3/librpc/gen_ndr/srv_svcctl.c | 2260 ++++++++++++++++++++--------------- 1 file changed, 1284 insertions(+), 976 deletions(-) (limited to 'source3/librpc/gen_ndr/srv_svcctl.c') diff --git a/source3/librpc/gen_ndr/srv_svcctl.c b/source3/librpc/gen_ndr/srv_svcctl.c index 6386bd4563..05dd27e7d8 100644 --- a/source3/librpc/gen_ndr/srv_svcctl.c +++ b/source3/librpc/gen_ndr/srv_svcctl.c @@ -8,3144 +8,3452 @@ static BOOL api_svcctl_CloseServiceHandle(pipes_struct *p) { + const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; NTSTATUS status; DATA_BLOB blob; - struct svcctl_CloseServiceHandle r; - TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_CloseServiceHandle"); + struct svcctl_CloseServiceHandle *r; - if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { - talloc_free(mem_ctx); + call = &ndr_table_svcctl.calls[NDR_SVCCTL_CLOSESERVICEHANDLE]; + + r = talloc(NULL, struct svcctl_CloseServiceHandle); + if (r == NULL) { + return False; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); return False; } - pull = ndr_pull_init_blob(&blob, mem_ctx); + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = ndr_pull_svcctl_CloseServiceHandle(pull, NDR_IN, &r); + status = call->ndr_pull(pull, NDR_IN, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } if (DEBUGLEVEL >= 10) - NDR_PRINT_IN_DEBUG(svcctl_CloseServiceHandle, &r); + NDR_PRINT_IN_DEBUG(svcctl_CloseServiceHandle, r); - ZERO_STRUCT(r.out); - r.out.handle = r.in.handle; - r.out.result = _svcctl_CloseServiceHandle(p, &r); + ZERO_STRUCT(r->out); + r->out.handle = r->in.handle; + r->out.result = _svcctl_CloseServiceHandle(p, r); if (p->rng_fault_state) { - talloc_free(mem_ctx); + talloc_free(r); /* Return True here, srv_pipe_hnd.c will take care */ return True; } if (DEBUGLEVEL >= 10) - NDR_PRINT_OUT_DEBUG(svcctl_CloseServiceHandle, &r); + NDR_PRINT_OUT_DEBUG(svcctl_CloseServiceHandle, r); - push = ndr_push_init_ctx(mem_ctx); + push = ndr_push_init_ctx(r); if (push == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - status = ndr_push_svcctl_CloseServiceHandle(push, NDR_OUT, &r); + status = call->ndr_push(push, NDR_OUT, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } blob = ndr_push_blob(push); if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - talloc_free(mem_ctx); + talloc_free(r); return True; } static BOOL api_svcctl_ControlService(pipes_struct *p) { + const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; NTSTATUS status; DATA_BLOB blob; - struct svcctl_ControlService r; - TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_ControlService"); + struct svcctl_ControlService *r; + + call = &ndr_table_svcctl.calls[NDR_SVCCTL_CONTROLSERVICE]; - if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { - talloc_free(mem_ctx); + r = talloc(NULL, struct svcctl_ControlService); + if (r == NULL) { return False; } - pull = ndr_pull_init_blob(&blob, mem_ctx); + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return False; + } + + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = ndr_pull_svcctl_ControlService(pull, NDR_IN, &r); + status = call->ndr_pull(pull, NDR_IN, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } if (DEBUGLEVEL >= 10) - NDR_PRINT_IN_DEBUG(svcctl_ControlService, &r); + NDR_PRINT_IN_DEBUG(svcctl_ControlService, r); - ZERO_STRUCT(r.out); - r.out.service_status = talloc_zero(mem_ctx, struct SERVICE_STATUS); - if (r.out.service_status == NULL) { - talloc_free(mem_ctx); + ZERO_STRUCT(r->out); + r->out.service_status = talloc_zero(r, struct SERVICE_STATUS); + if (r->out.service_status == NULL) { + talloc_free(r); return False; } - r.out.result = _svcctl_ControlService(p, &r); + r->out.result = _svcctl_ControlService(p, r); if (p->rng_fault_state) { - talloc_free(mem_ctx); + talloc_free(r); /* Return True here, srv_pipe_hnd.c will take care */ return True; } if (DEBUGLEVEL >= 10) - NDR_PRINT_OUT_DEBUG(svcctl_ControlService, &r); + NDR_PRINT_OUT_DEBUG(svcctl_ControlService, r); - push = ndr_push_init_ctx(mem_ctx); + push = ndr_push_init_ctx(r); if (push == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - status = ndr_push_svcctl_ControlService(push, NDR_OUT, &r); + status = call->ndr_push(push, NDR_OUT, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } blob = ndr_push_blob(push); if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - talloc_free(mem_ctx); + talloc_free(r); return True; } static BOOL api_svcctl_DeleteService(pipes_struct *p) { + const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; NTSTATUS status; DATA_BLOB blob; - struct svcctl_DeleteService r; - TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_DeleteService"); + struct svcctl_DeleteService *r; + + call = &ndr_table_svcctl.calls[NDR_SVCCTL_DELETESERVICE]; + + r = talloc(NULL, struct svcctl_DeleteService); + if (r == NULL) { + return False; + } - if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { - talloc_free(mem_ctx); + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); return False; } - pull = ndr_pull_init_blob(&blob, mem_ctx); + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = ndr_pull_svcctl_DeleteService(pull, NDR_IN, &r); + status = call->ndr_pull(pull, NDR_IN, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } if (DEBUGLEVEL >= 10) - NDR_PRINT_IN_DEBUG(svcctl_DeleteService, &r); + NDR_PRINT_IN_DEBUG(svcctl_DeleteService, r); - r.out.result = _svcctl_DeleteService(p, &r); + r->out.result = _svcctl_DeleteService(p, r); if (p->rng_fault_state) { - talloc_free(mem_ctx); + talloc_free(r); /* Return True here, srv_pipe_hnd.c will take care */ return True; } if (DEBUGLEVEL >= 10) - NDR_PRINT_OUT_DEBUG(svcctl_DeleteService, &r); + NDR_PRINT_OUT_DEBUG(svcctl_DeleteService, r); - push = ndr_push_init_ctx(mem_ctx); + push = ndr_push_init_ctx(r); if (push == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - status = ndr_push_svcctl_DeleteService(push, NDR_OUT, &r); + status = call->ndr_push(push, NDR_OUT, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } blob = ndr_push_blob(push); if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - talloc_free(mem_ctx); + talloc_free(r); return True; } static BOOL api_svcctl_LockServiceDatabase(pipes_struct *p) { + const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; NTSTATUS status; DATA_BLOB blob; - struct svcctl_LockServiceDatabase r; - TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_LockServiceDatabase"); + struct svcctl_LockServiceDatabase *r; + + call = &ndr_table_svcctl.calls[NDR_SVCCTL_LOCKSERVICEDATABASE]; + + r = talloc(NULL, struct svcctl_LockServiceDatabase); + if (r == NULL) { + return False; + } - if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { - talloc_free(mem_ctx); + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); return False; } - pull = ndr_pull_init_blob(&blob, mem_ctx); + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = ndr_pull_svcctl_LockServiceDatabase(pull, NDR_IN, &r); + status = call->ndr_pull(pull, NDR_IN, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } if (DEBUGLEVEL >= 10) - NDR_PRINT_IN_DEBUG(svcctl_LockServiceDatabase, &r); + NDR_PRINT_IN_DEBUG(svcctl_LockServiceDatabase, r); - ZERO_STRUCT(r.out); - r.out.lock = talloc_zero(mem_ctx, struct policy_handle); - if (r.out.lock == NULL) { - talloc_free(mem_ctx); + ZERO_STRUCT(r->out); + r->out.lock = talloc_zero(r, struct policy_handle); + if (r->out.lock == NULL) { + talloc_free(r); return False; } - r.out.result = _svcctl_LockServiceDatabase(p, &r); + r->out.result = _svcctl_LockServiceDatabase(p, r); if (p->rng_fault_state) { - talloc_free(mem_ctx); + talloc_free(r); /* Return True here, srv_pipe_hnd.c will take care */ return True; } if (DEBUGLEVEL >= 10) - NDR_PRINT_OUT_DEBUG(svcctl_LockServiceDatabase, &r); + NDR_PRINT_OUT_DEBUG(svcctl_LockServiceDatabase, r); - push = ndr_push_init_ctx(mem_ctx); + push = ndr_push_init_ctx(r); if (push == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - status = ndr_push_svcctl_LockServiceDatabase(push, NDR_OUT, &r); + status = call->ndr_push(push, NDR_OUT, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } blob = ndr_push_blob(push); if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - talloc_free(mem_ctx); + talloc_free(r); return True; } static BOOL api_svcctl_QueryServiceObjectSecurity(pipes_struct *p) { + const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; NTSTATUS status; DATA_BLOB blob; - struct svcctl_QueryServiceObjectSecurity r; - TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_QueryServiceObjectSecurity"); + struct svcctl_QueryServiceObjectSecurity *r; + + call = &ndr_table_svcctl.calls[NDR_SVCCTL_QUERYSERVICEOBJECTSECURITY]; - if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { - talloc_free(mem_ctx); + r = talloc(NULL, struct svcctl_QueryServiceObjectSecurity); + if (r == NULL) { return False; } - pull = ndr_pull_init_blob(&blob, mem_ctx); + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return False; + } + + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = ndr_pull_svcctl_QueryServiceObjectSecurity(pull, NDR_IN, &r); + status = call->ndr_pull(pull, NDR_IN, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } if (DEBUGLEVEL >= 10) - NDR_PRINT_IN_DEBUG(svcctl_QueryServiceObjectSecurity, &r); + NDR_PRINT_IN_DEBUG(svcctl_QueryServiceObjectSecurity, r); - r.out.result = _svcctl_QueryServiceObjectSecurity(p, &r); + r->out.result = _svcctl_QueryServiceObjectSecurity(p, r); if (p->rng_fault_state) { - talloc_free(mem_ctx); + talloc_free(r); /* Return True here, srv_pipe_hnd.c will take care */ return True; } if (DEBUGLEVEL >= 10) - NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceObjectSecurity, &r); + NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceObjectSecurity, r); - push = ndr_push_init_ctx(mem_ctx); + push = ndr_push_init_ctx(r); if (push == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - status = ndr_push_svcctl_QueryServiceObjectSecurity(push, NDR_OUT, &r); + status = call->ndr_push(push, NDR_OUT, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } blob = ndr_push_blob(push); if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - talloc_free(mem_ctx); + talloc_free(r); return True; } static BOOL api_svcctl_SetServiceObjectSecurity(pipes_struct *p) { + const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; NTSTATUS status; DATA_BLOB blob; - struct svcctl_SetServiceObjectSecurity r; - TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_SetServiceObjectSecurity"); + struct svcctl_SetServiceObjectSecurity *r; + + call = &ndr_table_svcctl.calls[NDR_SVCCTL_SETSERVICEOBJECTSECURITY]; + + r = talloc(NULL, struct svcctl_SetServiceObjectSecurity); + if (r == NULL) { + return False; + } - if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { - talloc_free(mem_ctx); + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); return False; } - pull = ndr_pull_init_blob(&blob, mem_ctx); + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = ndr_pull_svcctl_SetServiceObjectSecurity(pull, NDR_IN, &r); + status = call->ndr_pull(pull, NDR_IN, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } if (DEBUGLEVEL >= 10) - NDR_PRINT_IN_DEBUG(svcctl_SetServiceObjectSecurity, &r); + NDR_PRINT_IN_DEBUG(svcctl_SetServiceObjectSecurity, r); - r.out.result = _svcctl_SetServiceObjectSecurity(p, &r); + r->out.result = _svcctl_SetServiceObjectSecurity(p, r); if (p->rng_fault_state) { - talloc_free(mem_ctx); + talloc_free(r); /* Return True here, srv_pipe_hnd.c will take care */ return True; } if (DEBUGLEVEL >= 10) - NDR_PRINT_OUT_DEBUG(svcctl_SetServiceObjectSecurity, &r); + NDR_PRINT_OUT_DEBUG(svcctl_SetServiceObjectSecurity, r); - push = ndr_push_init_ctx(mem_ctx); + push = ndr_push_init_ctx(r); if (push == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - status = ndr_push_svcctl_SetServiceObjectSecurity(push, NDR_OUT, &r); + status = call->ndr_push(push, NDR_OUT, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } blob = ndr_push_blob(push); if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - talloc_free(mem_ctx); + talloc_free(r); return True; } static BOOL api_svcctl_QueryServiceStatus(pipes_struct *p) { + const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; NTSTATUS status; DATA_BLOB blob; - struct svcctl_QueryServiceStatus r; - TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_QueryServiceStatus"); + struct svcctl_QueryServiceStatus *r; + + call = &ndr_table_svcctl.calls[NDR_SVCCTL_QUERYSERVICESTATUS]; + + r = talloc(NULL, struct svcctl_QueryServiceStatus); + if (r == NULL) { + return False; + } - if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { - talloc_free(mem_ctx); + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); return False; } - pull = ndr_pull_init_blob(&blob, mem_ctx); + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = ndr_pull_svcctl_QueryServiceStatus(pull, NDR_IN, &r); + status = call->ndr_pull(pull, NDR_IN, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } if (DEBUGLEVEL >= 10) - NDR_PRINT_IN_DEBUG(svcctl_QueryServiceStatus, &r); + NDR_PRINT_IN_DEBUG(svcctl_QueryServiceStatus, r); - ZERO_STRUCT(r.out); - r.out.service_status = talloc_zero(mem_ctx, struct SERVICE_STATUS); - if (r.out.service_status == NULL) { - talloc_free(mem_ctx); + ZERO_STRUCT(r->out); + r->out.service_status = talloc_zero(r, struct SERVICE_STATUS); + if (r->out.service_status == NULL) { + talloc_free(r); return False; } - r.out.result = _svcctl_QueryServiceStatus(p, &r); + r->out.result = _svcctl_QueryServiceStatus(p, r); if (p->rng_fault_state) { - talloc_free(mem_ctx); + talloc_free(r); /* Return True here, srv_pipe_hnd.c will take care */ return True; } if (DEBUGLEVEL >= 10) - NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceStatus, &r); + NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceStatus, r); - push = ndr_push_init_ctx(mem_ctx); + push = ndr_push_init_ctx(r); if (push == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - status = ndr_push_svcctl_QueryServiceStatus(push, NDR_OUT, &r); + status = call->ndr_push(push, NDR_OUT, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } blob = ndr_push_blob(push); if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - talloc_free(mem_ctx); + talloc_free(r); return True; } static BOOL api_svcctl_SetServiceStatus(pipes_struct *p) { + const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; NTSTATUS status; DATA_BLOB blob; - struct svcctl_SetServiceStatus r; - TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_SetServiceStatus"); + struct svcctl_SetServiceStatus *r; - if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { - talloc_free(mem_ctx); + call = &ndr_table_svcctl.calls[NDR_SVCCTL_SETSERVICESTATUS]; + + r = talloc(NULL, struct svcctl_SetServiceStatus); + if (r == NULL) { return False; } - pull = ndr_pull_init_blob(&blob, mem_ctx); + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return False; + } + + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = ndr_pull_svcctl_SetServiceStatus(pull, NDR_IN, &r); + status = call->ndr_pull(pull, NDR_IN, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } if (DEBUGLEVEL >= 10) - NDR_PRINT_IN_DEBUG(svcctl_SetServiceStatus, &r); + NDR_PRINT_IN_DEBUG(svcctl_SetServiceStatus, r); - r.out.result = _svcctl_SetServiceStatus(p, &r); + r->out.result = _svcctl_SetServiceStatus(p, r); if (p->rng_fault_state) { - talloc_free(mem_ctx); + talloc_free(r); /* Return True here, srv_pipe_hnd.c will take care */ return True; } if (DEBUGLEVEL >= 10) - NDR_PRINT_OUT_DEBUG(svcctl_SetServiceStatus, &r); + NDR_PRINT_OUT_DEBUG(svcctl_SetServiceStatus, r); - push = ndr_push_init_ctx(mem_ctx); + push = ndr_push_init_ctx(r); if (push == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - status = ndr_push_svcctl_SetServiceStatus(push, NDR_OUT, &r); + status = call->ndr_push(push, NDR_OUT, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } blob = ndr_push_blob(push); if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - talloc_free(mem_ctx); + talloc_free(r); return True; } static BOOL api_svcctl_UnlockServiceDatabase(pipes_struct *p) { + const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; NTSTATUS status; DATA_BLOB blob; - struct svcctl_UnlockServiceDatabase r; - TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_UnlockServiceDatabase"); + struct svcctl_UnlockServiceDatabase *r; + + call = &ndr_table_svcctl.calls[NDR_SVCCTL_UNLOCKSERVICEDATABASE]; - if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { - talloc_free(mem_ctx); + r = talloc(NULL, struct svcctl_UnlockServiceDatabase); + if (r == NULL) { return False; } - pull = ndr_pull_init_blob(&blob, mem_ctx); + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return False; + } + + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = ndr_pull_svcctl_UnlockServiceDatabase(pull, NDR_IN, &r); + status = call->ndr_pull(pull, NDR_IN, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } if (DEBUGLEVEL >= 10) - NDR_PRINT_IN_DEBUG(svcctl_UnlockServiceDatabase, &r); + NDR_PRINT_IN_DEBUG(svcctl_UnlockServiceDatabase, r); - ZERO_STRUCT(r.out); - r.out.lock = r.in.lock; - r.out.result = _svcctl_UnlockServiceDatabase(p, &r); + ZERO_STRUCT(r->out); + r->out.lock = r->in.lock; + r->out.result = _svcctl_UnlockServiceDatabase(p, r); if (p->rng_fault_state) { - talloc_free(mem_ctx); + talloc_free(r); /* Return True here, srv_pipe_hnd.c will take care */ return True; } if (DEBUGLEVEL >= 10) - NDR_PRINT_OUT_DEBUG(svcctl_UnlockServiceDatabase, &r); + NDR_PRINT_OUT_DEBUG(svcctl_UnlockServiceDatabase, r); - push = ndr_push_init_ctx(mem_ctx); + push = ndr_push_init_ctx(r); if (push == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - status = ndr_push_svcctl_UnlockServiceDatabase(push, NDR_OUT, &r); + status = call->ndr_push(push, NDR_OUT, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } blob = ndr_push_blob(push); if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - talloc_free(mem_ctx); + talloc_free(r); return True; } static BOOL api_svcctl_NotifyBootConfigStatus(pipes_struct *p) { + const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; NTSTATUS status; DATA_BLOB blob; - struct svcctl_NotifyBootConfigStatus r; - TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_NotifyBootConfigStatus"); + struct svcctl_NotifyBootConfigStatus *r; - if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { - talloc_free(mem_ctx); + call = &ndr_table_svcctl.calls[NDR_SVCCTL_NOTIFYBOOTCONFIGSTATUS]; + + r = talloc(NULL, struct svcctl_NotifyBootConfigStatus); + if (r == NULL) { return False; } - pull = ndr_pull_init_blob(&blob, mem_ctx); + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return False; + } + + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = ndr_pull_svcctl_NotifyBootConfigStatus(pull, NDR_IN, &r); + status = call->ndr_pull(pull, NDR_IN, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } if (DEBUGLEVEL >= 10) - NDR_PRINT_IN_DEBUG(svcctl_NotifyBootConfigStatus, &r); + NDR_PRINT_IN_DEBUG(svcctl_NotifyBootConfigStatus, r); - r.out.result = _svcctl_NotifyBootConfigStatus(p, &r); + r->out.result = _svcctl_NotifyBootConfigStatus(p, r); if (p->rng_fault_state) { - talloc_free(mem_ctx); + talloc_free(r); /* Return True here, srv_pipe_hnd.c will take care */ return True; } if (DEBUGLEVEL >= 10) - NDR_PRINT_OUT_DEBUG(svcctl_NotifyBootConfigStatus, &r); + NDR_PRINT_OUT_DEBUG(svcctl_NotifyBootConfigStatus, r); - push = ndr_push_init_ctx(mem_ctx); + push = ndr_push_init_ctx(r); if (push == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - status = ndr_push_svcctl_NotifyBootConfigStatus(push, NDR_OUT, &r); + status = call->ndr_push(push, NDR_OUT, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } blob = ndr_push_blob(push); if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - talloc_free(mem_ctx); + talloc_free(r); return True; } static BOOL api_svcctl_SCSetServiceBitsW(pipes_struct *p) { + const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; NTSTATUS status; DATA_BLOB blob; - struct svcctl_SCSetServiceBitsW r; - TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_SCSetServiceBitsW"); + struct svcctl_SCSetServiceBitsW *r; + + call = &ndr_table_svcctl.calls[NDR_SVCCTL_SCSETSERVICEBITSW]; + + r = talloc(NULL, struct svcctl_SCSetServiceBitsW); + if (r == NULL) { + return False; + } - if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { - talloc_free(mem_ctx); + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); return False; } - pull = ndr_pull_init_blob(&blob, mem_ctx); + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = ndr_pull_svcctl_SCSetServiceBitsW(pull, NDR_IN, &r); + status = call->ndr_pull(pull, NDR_IN, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } if (DEBUGLEVEL >= 10) - NDR_PRINT_IN_DEBUG(svcctl_SCSetServiceBitsW, &r); + NDR_PRINT_IN_DEBUG(svcctl_SCSetServiceBitsW, r); - r.out.result = _svcctl_SCSetServiceBitsW(p, &r); + r->out.result = _svcctl_SCSetServiceBitsW(p, r); if (p->rng_fault_state) { - talloc_free(mem_ctx); + talloc_free(r); /* Return True here, srv_pipe_hnd.c will take care */ return True; } if (DEBUGLEVEL >= 10) - NDR_PRINT_OUT_DEBUG(svcctl_SCSetServiceBitsW, &r); + NDR_PRINT_OUT_DEBUG(svcctl_SCSetServiceBitsW, r); - push = ndr_push_init_ctx(mem_ctx); + push = ndr_push_init_ctx(r); if (push == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - status = ndr_push_svcctl_SCSetServiceBitsW(push, NDR_OUT, &r); + status = call->ndr_push(push, NDR_OUT, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } blob = ndr_push_blob(push); if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - talloc_free(mem_ctx); + talloc_free(r); return True; } static BOOL api_svcctl_ChangeServiceConfigW(pipes_struct *p) { + const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; NTSTATUS status; DATA_BLOB blob; - struct svcctl_ChangeServiceConfigW r; - TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_ChangeServiceConfigW"); + struct svcctl_ChangeServiceConfigW *r; - if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { - talloc_free(mem_ctx); + call = &ndr_table_svcctl.calls[NDR_SVCCTL_CHANGESERVICECONFIGW]; + + r = talloc(NULL, struct svcctl_ChangeServiceConfigW); + if (r == NULL) { + return False; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); return False; } - pull = ndr_pull_init_blob(&blob, mem_ctx); + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = ndr_pull_svcctl_ChangeServiceConfigW(pull, NDR_IN, &r); + status = call->ndr_pull(pull, NDR_IN, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } if (DEBUGLEVEL >= 10) - NDR_PRINT_IN_DEBUG(svcctl_ChangeServiceConfigW, &r); + NDR_PRINT_IN_DEBUG(svcctl_ChangeServiceConfigW, r); - ZERO_STRUCT(r.out); - r.out.tag_id = talloc_zero(mem_ctx, uint32_t); - if (r.out.tag_id == NULL) { - talloc_free(mem_ctx); + ZERO_STRUCT(r->out); + r->out.tag_id = talloc_zero(r, uint32_t); + if (r->out.tag_id == NULL) { + talloc_free(r); return False; } - r.out.result = _svcctl_ChangeServiceConfigW(p, &r); + r->out.result = _svcctl_ChangeServiceConfigW(p, r); if (p->rng_fault_state) { - talloc_free(mem_ctx); + talloc_free(r); /* Return True here, srv_pipe_hnd.c will take care */ return True; } if (DEBUGLEVEL >= 10) - NDR_PRINT_OUT_DEBUG(svcctl_ChangeServiceConfigW, &r); + NDR_PRINT_OUT_DEBUG(svcctl_ChangeServiceConfigW, r); - push = ndr_push_init_ctx(mem_ctx); + push = ndr_push_init_ctx(r); if (push == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - status = ndr_push_svcctl_ChangeServiceConfigW(push, NDR_OUT, &r); + status = call->ndr_push(push, NDR_OUT, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } blob = ndr_push_blob(push); if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - talloc_free(mem_ctx); + talloc_free(r); return True; } static BOOL api_svcctl_CreateServiceW(pipes_struct *p) { + const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; NTSTATUS status; DATA_BLOB blob; - struct svcctl_CreateServiceW r; - TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_CreateServiceW"); + struct svcctl_CreateServiceW *r; + + call = &ndr_table_svcctl.calls[NDR_SVCCTL_CREATESERVICEW]; - if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { - talloc_free(mem_ctx); + r = talloc(NULL, struct svcctl_CreateServiceW); + if (r == NULL) { return False; } - pull = ndr_pull_init_blob(&blob, mem_ctx); + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return False; + } + + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = ndr_pull_svcctl_CreateServiceW(pull, NDR_IN, &r); + status = call->ndr_pull(pull, NDR_IN, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } if (DEBUGLEVEL >= 10) - NDR_PRINT_IN_DEBUG(svcctl_CreateServiceW, &r); + NDR_PRINT_IN_DEBUG(svcctl_CreateServiceW, r); - ZERO_STRUCT(r.out); - r.out.TagId = r.in.TagId; - r.out.handle = talloc_zero(mem_ctx, struct policy_handle); - if (r.out.handle == NULL) { - talloc_free(mem_ctx); + ZERO_STRUCT(r->out); + r->out.TagId = r->in.TagId; + r->out.handle = talloc_zero(r, struct policy_handle); + if (r->out.handle == NULL) { + talloc_free(r); return False; } - r.out.result = _svcctl_CreateServiceW(p, &r); + r->out.result = _svcctl_CreateServiceW(p, r); if (p->rng_fault_state) { - talloc_free(mem_ctx); + talloc_free(r); /* Return True here, srv_pipe_hnd.c will take care */ return True; } if (DEBUGLEVEL >= 10) - NDR_PRINT_OUT_DEBUG(svcctl_CreateServiceW, &r); + NDR_PRINT_OUT_DEBUG(svcctl_CreateServiceW, r); - push = ndr_push_init_ctx(mem_ctx); + push = ndr_push_init_ctx(r); if (push == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - status = ndr_push_svcctl_CreateServiceW(push, NDR_OUT, &r); + status = call->ndr_push(push, NDR_OUT, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } blob = ndr_push_blob(push); if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - talloc_free(mem_ctx); + talloc_free(r); return True; } static BOOL api_svcctl_EnumDependentServicesW(pipes_struct *p) { + const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; NTSTATUS status; DATA_BLOB blob; - struct svcctl_EnumDependentServicesW r; - TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_EnumDependentServicesW"); + struct svcctl_EnumDependentServicesW *r; + + call = &ndr_table_svcctl.calls[NDR_SVCCTL_ENUMDEPENDENTSERVICESW]; + + r = talloc(NULL, struct svcctl_EnumDependentServicesW); + if (r == NULL) { + return False; + } - if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { - talloc_free(mem_ctx); + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); return False; } - pull = ndr_pull_init_blob(&blob, mem_ctx); + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = ndr_pull_svcctl_EnumDependentServicesW(pull, NDR_IN, &r); + status = call->ndr_pull(pull, NDR_IN, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } if (DEBUGLEVEL >= 10) - NDR_PRINT_IN_DEBUG(svcctl_EnumDependentServicesW, &r); + NDR_PRINT_IN_DEBUG(svcctl_EnumDependentServicesW, r); - ZERO_STRUCT(r.out); - r.out.service_status = talloc_zero(mem_ctx, struct ENUM_SERVICE_STATUS); - if (r.out.service_status == NULL) { - talloc_free(mem_ctx); + ZERO_STRUCT(r->out); + r->out.service_status = talloc_zero(r, struct ENUM_SERVICE_STATUS); + if (r->out.service_status == NULL) { + talloc_free(r); return False; } - r.out.bytes_needed = talloc_zero(mem_ctx, uint32_t); - if (r.out.bytes_needed == NULL) { - talloc_free(mem_ctx); + r->out.bytes_needed = talloc_zero(r, uint32_t); + if (r->out.bytes_needed == NULL) { + talloc_free(r); return False; } - r.out.services_returned = talloc_zero(mem_ctx, uint32_t); - if (r.out.services_returned == NULL) { - talloc_free(mem_ctx); + r->out.services_returned = talloc_zero(r, uint32_t); + if (r->out.services_returned == NULL) { + talloc_free(r); return False; } - r.out.result = _svcctl_EnumDependentServicesW(p, &r); + r->out.result = _svcctl_EnumDependentServicesW(p, r); if (p->rng_fault_state) { - talloc_free(mem_ctx); + talloc_free(r); /* Return True here, srv_pipe_hnd.c will take care */ return True; } if (DEBUGLEVEL >= 10) - NDR_PRINT_OUT_DEBUG(svcctl_EnumDependentServicesW, &r); + NDR_PRINT_OUT_DEBUG(svcctl_EnumDependentServicesW, r); - push = ndr_push_init_ctx(mem_ctx); + push = ndr_push_init_ctx(r); if (push == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - status = ndr_push_svcctl_EnumDependentServicesW(push, NDR_OUT, &r); + status = call->ndr_push(push, NDR_OUT, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } blob = ndr_push_blob(push); if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - talloc_free(mem_ctx); + talloc_free(r); return True; } static BOOL api_svcctl_EnumServicesStatusW(pipes_struct *p) { + const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; NTSTATUS status; DATA_BLOB blob; - struct svcctl_EnumServicesStatusW r; - TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_EnumServicesStatusW"); + struct svcctl_EnumServicesStatusW *r; + + call = &ndr_table_svcctl.calls[NDR_SVCCTL_ENUMSERVICESSTATUSW]; + + r = talloc(NULL, struct svcctl_EnumServicesStatusW); + if (r == NULL) { + return False; + } - if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { - talloc_free(mem_ctx); + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); return False; } - pull = ndr_pull_init_blob(&blob, mem_ctx); + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = ndr_pull_svcctl_EnumServicesStatusW(pull, NDR_IN, &r); + status = call->ndr_pull(pull, NDR_IN, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } if (DEBUGLEVEL >= 10) - NDR_PRINT_IN_DEBUG(svcctl_EnumServicesStatusW, &r); + NDR_PRINT_IN_DEBUG(svcctl_EnumServicesStatusW, r); - ZERO_STRUCT(r.out); - r.out.service = talloc_zero_array(mem_ctx, uint8_t, r.in.buf_size); - if (r.out.service == NULL) { - talloc_free(mem_ctx); + ZERO_STRUCT(r->out); + r->out.service = talloc_zero_array(r, uint8_t, r->in.buf_size); + if (r->out.service == NULL) { + talloc_free(r); return False; } - r.out.bytes_needed = talloc_zero(mem_ctx, uint32_t); - if (r.out.bytes_needed == NULL) { - talloc_free(mem_ctx); + r->out.bytes_needed = talloc_zero(r, uint32_t); + if (r->out.bytes_needed == NULL) { + talloc_free(r); return False; } - r.out.services_returned = talloc_zero(mem_ctx, uint32_t); - if (r.out.services_returned == NULL) { - talloc_free(mem_ctx); + r->out.services_returned = talloc_zero(r, uint32_t); + if (r->out.services_returned == NULL) { + talloc_free(r); return False; } - r.out.resume_handle = r.in.resume_handle; - r.out.result = _svcctl_EnumServicesStatusW(p, &r); + r->out.resume_handle = r->in.resume_handle; + r->out.result = _svcctl_EnumServicesStatusW(p, r); if (p->rng_fault_state) { - talloc_free(mem_ctx); + talloc_free(r); /* Return True here, srv_pipe_hnd.c will take care */ return True; } if (DEBUGLEVEL >= 10) - NDR_PRINT_OUT_DEBUG(svcctl_EnumServicesStatusW, &r); + NDR_PRINT_OUT_DEBUG(svcctl_EnumServicesStatusW, r); - push = ndr_push_init_ctx(mem_ctx); + push = ndr_push_init_ctx(r); if (push == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - status = ndr_push_svcctl_EnumServicesStatusW(push, NDR_OUT, &r); + status = call->ndr_push(push, NDR_OUT, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } blob = ndr_push_blob(push); if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - talloc_free(mem_ctx); + talloc_free(r); return True; } static BOOL api_svcctl_OpenSCManagerW(pipes_struct *p) { + const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; NTSTATUS status; DATA_BLOB blob; - struct svcctl_OpenSCManagerW r; - TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_OpenSCManagerW"); + struct svcctl_OpenSCManagerW *r; + + call = &ndr_table_svcctl.calls[NDR_SVCCTL_OPENSCMANAGERW]; - if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { - talloc_free(mem_ctx); + r = talloc(NULL, struct svcctl_OpenSCManagerW); + if (r == NULL) { return False; } - pull = ndr_pull_init_blob(&blob, mem_ctx); + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return False; + } + + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = ndr_pull_svcctl_OpenSCManagerW(pull, NDR_IN, &r); + status = call->ndr_pull(pull, NDR_IN, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } if (DEBUGLEVEL >= 10) - NDR_PRINT_IN_DEBUG(svcctl_OpenSCManagerW, &r); + NDR_PRINT_IN_DEBUG(svcctl_OpenSCManagerW, r); - ZERO_STRUCT(r.out); - r.out.handle = talloc_zero(mem_ctx, struct policy_handle); - if (r.out.handle == NULL) { - talloc_free(mem_ctx); + ZERO_STRUCT(r->out); + r->out.handle = talloc_zero(r, struct policy_handle); + if (r->out.handle == NULL) { + talloc_free(r); return False; } - r.out.result = _svcctl_OpenSCManagerW(p, &r); + r->out.result = _svcctl_OpenSCManagerW(p, r); if (p->rng_fault_state) { - talloc_free(mem_ctx); + talloc_free(r); /* Return True here, srv_pipe_hnd.c will take care */ return True; } if (DEBUGLEVEL >= 10) - NDR_PRINT_OUT_DEBUG(svcctl_OpenSCManagerW, &r); + NDR_PRINT_OUT_DEBUG(svcctl_OpenSCManagerW, r); - push = ndr_push_init_ctx(mem_ctx); + push = ndr_push_init_ctx(r); if (push == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - status = ndr_push_svcctl_OpenSCManagerW(push, NDR_OUT, &r); + status = call->ndr_push(push, NDR_OUT, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } blob = ndr_push_blob(push); if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - talloc_free(mem_ctx); + talloc_free(r); return True; } static BOOL api_svcctl_OpenServiceW(pipes_struct *p) { + const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; NTSTATUS status; DATA_BLOB blob; - struct svcctl_OpenServiceW r; - TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_OpenServiceW"); + struct svcctl_OpenServiceW *r; + + call = &ndr_table_svcctl.calls[NDR_SVCCTL_OPENSERVICEW]; + + r = talloc(NULL, struct svcctl_OpenServiceW); + if (r == NULL) { + return False; + } - if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { - talloc_free(mem_ctx); + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); return False; } - pull = ndr_pull_init_blob(&blob, mem_ctx); + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = ndr_pull_svcctl_OpenServiceW(pull, NDR_IN, &r); + status = call->ndr_pull(pull, NDR_IN, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } if (DEBUGLEVEL >= 10) - NDR_PRINT_IN_DEBUG(svcctl_OpenServiceW, &r); + NDR_PRINT_IN_DEBUG(svcctl_OpenServiceW, r); - ZERO_STRUCT(r.out); - r.out.handle = talloc_zero(mem_ctx, struct policy_handle); - if (r.out.handle == NULL) { - talloc_free(mem_ctx); + ZERO_STRUCT(r->out); + r->out.handle = talloc_zero(r, struct policy_handle); + if (r->out.handle == NULL) { + talloc_free(r); return False; } - r.out.result = _svcctl_OpenServiceW(p, &r); + r->out.result = _svcctl_OpenServiceW(p, r); if (p->rng_fault_state) { - talloc_free(mem_ctx); + talloc_free(r); /* Return True here, srv_pipe_hnd.c will take care */ return True; } if (DEBUGLEVEL >= 10) - NDR_PRINT_OUT_DEBUG(svcctl_OpenServiceW, &r); + NDR_PRINT_OUT_DEBUG(svcctl_OpenServiceW, r); - push = ndr_push_init_ctx(mem_ctx); + push = ndr_push_init_ctx(r); if (push == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - status = ndr_push_svcctl_OpenServiceW(push, NDR_OUT, &r); + status = call->ndr_push(push, NDR_OUT, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } blob = ndr_push_blob(push); if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - talloc_free(mem_ctx); + talloc_free(r); return True; } static BOOL api_svcctl_QueryServiceConfigW(pipes_struct *p) { + const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; NTSTATUS status; DATA_BLOB blob; - struct svcctl_QueryServiceConfigW r; - TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_QueryServiceConfigW"); + struct svcctl_QueryServiceConfigW *r; + + call = &ndr_table_svcctl.calls[NDR_SVCCTL_QUERYSERVICECONFIGW]; + + r = talloc(NULL, struct svcctl_QueryServiceConfigW); + if (r == NULL) { + return False; + } - if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { - talloc_free(mem_ctx); + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); return False; } - pull = ndr_pull_init_blob(&blob, mem_ctx); + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = ndr_pull_svcctl_QueryServiceConfigW(pull, NDR_IN, &r); + status = call->ndr_pull(pull, NDR_IN, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } if (DEBUGLEVEL >= 10) - NDR_PRINT_IN_DEBUG(svcctl_QueryServiceConfigW, &r); + NDR_PRINT_IN_DEBUG(svcctl_QueryServiceConfigW, r); - ZERO_STRUCT(r.out); - r.out.query = talloc_zero_array(mem_ctx, uint8_t, r.in.buf_size); - if (r.out.query == NULL) { - talloc_free(mem_ctx); + ZERO_STRUCT(r->out); + r->out.query = talloc_zero_array(r, uint8_t, r->in.buf_size); + if (r->out.query == NULL) { + talloc_free(r); return False; } - r.out.bytes_needed = talloc_zero(mem_ctx, uint32_t); - if (r.out.bytes_needed == NULL) { - talloc_free(mem_ctx); + r->out.bytes_needed = talloc_zero(r, uint32_t); + if (r->out.bytes_needed == NULL) { + talloc_free(r); return False; } - r.out.result = _svcctl_QueryServiceConfigW(p, &r); + r->out.result = _svcctl_QueryServiceConfigW(p, r); if (p->rng_fault_state) { - talloc_free(mem_ctx); + talloc_free(r); /* Return True here, srv_pipe_hnd.c will take care */ return True; } if (DEBUGLEVEL >= 10) - NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceConfigW, &r); + NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceConfigW, r); - push = ndr_push_init_ctx(mem_ctx); + push = ndr_push_init_ctx(r); if (push == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - status = ndr_push_svcctl_QueryServiceConfigW(push, NDR_OUT, &r); + status = call->ndr_push(push, NDR_OUT, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } blob = ndr_push_blob(push); if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - talloc_free(mem_ctx); + talloc_free(r); return True; } static BOOL api_svcctl_QueryServiceLockStatusW(pipes_struct *p) { + const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; NTSTATUS status; DATA_BLOB blob; - struct svcctl_QueryServiceLockStatusW r; - TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_QueryServiceLockStatusW"); + struct svcctl_QueryServiceLockStatusW *r; - if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { - talloc_free(mem_ctx); + call = &ndr_table_svcctl.calls[NDR_SVCCTL_QUERYSERVICELOCKSTATUSW]; + + r = talloc(NULL, struct svcctl_QueryServiceLockStatusW); + if (r == NULL) { return False; } - pull = ndr_pull_init_blob(&blob, mem_ctx); + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return False; + } + + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = ndr_pull_svcctl_QueryServiceLockStatusW(pull, NDR_IN, &r); + status = call->ndr_pull(pull, NDR_IN, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } if (DEBUGLEVEL >= 10) - NDR_PRINT_IN_DEBUG(svcctl_QueryServiceLockStatusW, &r); + NDR_PRINT_IN_DEBUG(svcctl_QueryServiceLockStatusW, r); - ZERO_STRUCT(r.out); - r.out.lock_status = talloc_zero(mem_ctx, struct SERVICE_LOCK_STATUS); - if (r.out.lock_status == NULL) { - talloc_free(mem_ctx); + ZERO_STRUCT(r->out); + r->out.lock_status = talloc_zero(r, struct SERVICE_LOCK_STATUS); + if (r->out.lock_status == NULL) { + talloc_free(r); return False; } - r.out.required_buf_size = talloc_zero(mem_ctx, uint32_t); - if (r.out.required_buf_size == NULL) { - talloc_free(mem_ctx); + r->out.required_buf_size = talloc_zero(r, uint32_t); + if (r->out.required_buf_size == NULL) { + talloc_free(r); return False; } - r.out.result = _svcctl_QueryServiceLockStatusW(p, &r); + r->out.result = _svcctl_QueryServiceLockStatusW(p, r); if (p->rng_fault_state) { - talloc_free(mem_ctx); + talloc_free(r); /* Return True here, srv_pipe_hnd.c will take care */ return True; } if (DEBUGLEVEL >= 10) - NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceLockStatusW, &r); + NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceLockStatusW, r); - push = ndr_push_init_ctx(mem_ctx); + push = ndr_push_init_ctx(r); if (push == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - status = ndr_push_svcctl_QueryServiceLockStatusW(push, NDR_OUT, &r); + status = call->ndr_push(push, NDR_OUT, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } blob = ndr_push_blob(push); if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - talloc_free(mem_ctx); + talloc_free(r); return True; } static BOOL api_svcctl_StartServiceW(pipes_struct *p) { + const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; NTSTATUS status; DATA_BLOB blob; - struct svcctl_StartServiceW r; - TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_StartServiceW"); + struct svcctl_StartServiceW *r; + + call = &ndr_table_svcctl.calls[NDR_SVCCTL_STARTSERVICEW]; - if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { - talloc_free(mem_ctx); + r = talloc(NULL, struct svcctl_StartServiceW); + if (r == NULL) { return False; } - pull = ndr_pull_init_blob(&blob, mem_ctx); + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return False; + } + + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = ndr_pull_svcctl_StartServiceW(pull, NDR_IN, &r); + status = call->ndr_pull(pull, NDR_IN, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } if (DEBUGLEVEL >= 10) - NDR_PRINT_IN_DEBUG(svcctl_StartServiceW, &r); + NDR_PRINT_IN_DEBUG(svcctl_StartServiceW, r); - r.out.result = _svcctl_StartServiceW(p, &r); + r->out.result = _svcctl_StartServiceW(p, r); if (p->rng_fault_state) { - talloc_free(mem_ctx); + talloc_free(r); /* Return True here, srv_pipe_hnd.c will take care */ return True; } if (DEBUGLEVEL >= 10) - NDR_PRINT_OUT_DEBUG(svcctl_StartServiceW, &r); + NDR_PRINT_OUT_DEBUG(svcctl_StartServiceW, r); - push = ndr_push_init_ctx(mem_ctx); + push = ndr_push_init_ctx(r); if (push == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - status = ndr_push_svcctl_StartServiceW(push, NDR_OUT, &r); + status = call->ndr_push(push, NDR_OUT, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } blob = ndr_push_blob(push); if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - talloc_free(mem_ctx); + talloc_free(r); return True; } static BOOL api_svcctl_GetServiceDisplayNameW(pipes_struct *p) { + const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; NTSTATUS status; DATA_BLOB blob; - struct svcctl_GetServiceDisplayNameW r; - TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_GetServiceDisplayNameW"); + struct svcctl_GetServiceDisplayNameW *r; - if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { - talloc_free(mem_ctx); + call = &ndr_table_svcctl.calls[NDR_SVCCTL_GETSERVICEDISPLAYNAMEW]; + + r = talloc(NULL, struct svcctl_GetServiceDisplayNameW); + if (r == NULL) { return False; } - pull = ndr_pull_init_blob(&blob, mem_ctx); + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return False; + } + + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = ndr_pull_svcctl_GetServiceDisplayNameW(pull, NDR_IN, &r); + status = call->ndr_pull(pull, NDR_IN, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } if (DEBUGLEVEL >= 10) - NDR_PRINT_IN_DEBUG(svcctl_GetServiceDisplayNameW, &r); + NDR_PRINT_IN_DEBUG(svcctl_GetServiceDisplayNameW, r); - ZERO_STRUCT(r.out); - r.out.display_name = talloc_zero(mem_ctx, const char *); - if (r.out.display_name == NULL) { - talloc_free(mem_ctx); + ZERO_STRUCT(r->out); + r->out.display_name = talloc_zero(r, const char *); + if (r->out.display_name == NULL) { + talloc_free(r); return False; } - r.out.display_name_length = r.in.display_name_length; - r.out.result = _svcctl_GetServiceDisplayNameW(p, &r); + r->out.display_name_length = r->in.display_name_length; + r->out.result = _svcctl_GetServiceDisplayNameW(p, r); if (p->rng_fault_state) { - talloc_free(mem_ctx); + talloc_free(r); /* Return True here, srv_pipe_hnd.c will take care */ return True; } if (DEBUGLEVEL >= 10) - NDR_PRINT_OUT_DEBUG(svcctl_GetServiceDisplayNameW, &r); + NDR_PRINT_OUT_DEBUG(svcctl_GetServiceDisplayNameW, r); - push = ndr_push_init_ctx(mem_ctx); + push = ndr_push_init_ctx(r); if (push == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - status = ndr_push_svcctl_GetServiceDisplayNameW(push, NDR_OUT, &r); + status = call->ndr_push(push, NDR_OUT, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } blob = ndr_push_blob(push); if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - talloc_free(mem_ctx); + talloc_free(r); return True; } static BOOL api_svcctl_GetServiceKeyNameW(pipes_struct *p) { + const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; NTSTATUS status; DATA_BLOB blob; - struct svcctl_GetServiceKeyNameW r; - TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_GetServiceKeyNameW"); + struct svcctl_GetServiceKeyNameW *r; + + call = &ndr_table_svcctl.calls[NDR_SVCCTL_GETSERVICEKEYNAMEW]; + + r = talloc(NULL, struct svcctl_GetServiceKeyNameW); + if (r == NULL) { + return False; + } - if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { - talloc_free(mem_ctx); + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); return False; } - pull = ndr_pull_init_blob(&blob, mem_ctx); + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = ndr_pull_svcctl_GetServiceKeyNameW(pull, NDR_IN, &r); + status = call->ndr_pull(pull, NDR_IN, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } if (DEBUGLEVEL >= 10) - NDR_PRINT_IN_DEBUG(svcctl_GetServiceKeyNameW, &r); + NDR_PRINT_IN_DEBUG(svcctl_GetServiceKeyNameW, r); - ZERO_STRUCT(r.out); - r.out.key_name = talloc_zero(mem_ctx, const char *); - if (r.out.key_name == NULL) { - talloc_free(mem_ctx); + ZERO_STRUCT(r->out); + r->out.key_name = talloc_zero(r, const char *); + if (r->out.key_name == NULL) { + talloc_free(r); return False; } - r.out.display_name_length = r.in.display_name_length; - r.out.result = _svcctl_GetServiceKeyNameW(p, &r); + r->out.display_name_length = r->in.display_name_length; + r->out.result = _svcctl_GetServiceKeyNameW(p, r); if (p->rng_fault_state) { - talloc_free(mem_ctx); + talloc_free(r); /* Return True here, srv_pipe_hnd.c will take care */ return True; } if (DEBUGLEVEL >= 10) - NDR_PRINT_OUT_DEBUG(svcctl_GetServiceKeyNameW, &r); + NDR_PRINT_OUT_DEBUG(svcctl_GetServiceKeyNameW, r); - push = ndr_push_init_ctx(mem_ctx); + push = ndr_push_init_ctx(r); if (push == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - status = ndr_push_svcctl_GetServiceKeyNameW(push, NDR_OUT, &r); + status = call->ndr_push(push, NDR_OUT, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } blob = ndr_push_blob(push); if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - talloc_free(mem_ctx); + talloc_free(r); return True; } static BOOL api_svcctl_SCSetServiceBitsA(pipes_struct *p) { + const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; NTSTATUS status; DATA_BLOB blob; - struct svcctl_SCSetServiceBitsA r; - TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_SCSetServiceBitsA"); + struct svcctl_SCSetServiceBitsA *r; - if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { - talloc_free(mem_ctx); + call = &ndr_table_svcctl.calls[NDR_SVCCTL_SCSETSERVICEBITSA]; + + r = talloc(NULL, struct svcctl_SCSetServiceBitsA); + if (r == NULL) { + return False; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); return False; } - pull = ndr_pull_init_blob(&blob, mem_ctx); + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = ndr_pull_svcctl_SCSetServiceBitsA(pull, NDR_IN, &r); + status = call->ndr_pull(pull, NDR_IN, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } if (DEBUGLEVEL >= 10) - NDR_PRINT_IN_DEBUG(svcctl_SCSetServiceBitsA, &r); + NDR_PRINT_IN_DEBUG(svcctl_SCSetServiceBitsA, r); - r.out.result = _svcctl_SCSetServiceBitsA(p, &r); + r->out.result = _svcctl_SCSetServiceBitsA(p, r); if (p->rng_fault_state) { - talloc_free(mem_ctx); + talloc_free(r); /* Return True here, srv_pipe_hnd.c will take care */ return True; } if (DEBUGLEVEL >= 10) - NDR_PRINT_OUT_DEBUG(svcctl_SCSetServiceBitsA, &r); + NDR_PRINT_OUT_DEBUG(svcctl_SCSetServiceBitsA, r); - push = ndr_push_init_ctx(mem_ctx); + push = ndr_push_init_ctx(r); if (push == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - status = ndr_push_svcctl_SCSetServiceBitsA(push, NDR_OUT, &r); + status = call->ndr_push(push, NDR_OUT, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } blob = ndr_push_blob(push); if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - talloc_free(mem_ctx); + talloc_free(r); return True; } static BOOL api_svcctl_ChangeServiceConfigA(pipes_struct *p) { + const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; NTSTATUS status; DATA_BLOB blob; - struct svcctl_ChangeServiceConfigA r; - TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_ChangeServiceConfigA"); + struct svcctl_ChangeServiceConfigA *r; + + call = &ndr_table_svcctl.calls[NDR_SVCCTL_CHANGESERVICECONFIGA]; - if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { - talloc_free(mem_ctx); + r = talloc(NULL, struct svcctl_ChangeServiceConfigA); + if (r == NULL) { return False; } - pull = ndr_pull_init_blob(&blob, mem_ctx); + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return False; + } + + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = ndr_pull_svcctl_ChangeServiceConfigA(pull, NDR_IN, &r); + status = call->ndr_pull(pull, NDR_IN, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } if (DEBUGLEVEL >= 10) - NDR_PRINT_IN_DEBUG(svcctl_ChangeServiceConfigA, &r); + NDR_PRINT_IN_DEBUG(svcctl_ChangeServiceConfigA, r); - ZERO_STRUCT(r.out); - r.out.tag_id = talloc_zero(mem_ctx, uint32_t); - if (r.out.tag_id == NULL) { - talloc_free(mem_ctx); + ZERO_STRUCT(r->out); + r->out.tag_id = talloc_zero(r, uint32_t); + if (r->out.tag_id == NULL) { + talloc_free(r); return False; } - r.out.result = _svcctl_ChangeServiceConfigA(p, &r); + r->out.result = _svcctl_ChangeServiceConfigA(p, r); if (p->rng_fault_state) { - talloc_free(mem_ctx); + talloc_free(r); /* Return True here, srv_pipe_hnd.c will take care */ return True; } if (DEBUGLEVEL >= 10) - NDR_PRINT_OUT_DEBUG(svcctl_ChangeServiceConfigA, &r); + NDR_PRINT_OUT_DEBUG(svcctl_ChangeServiceConfigA, r); - push = ndr_push_init_ctx(mem_ctx); + push = ndr_push_init_ctx(r); if (push == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - status = ndr_push_svcctl_ChangeServiceConfigA(push, NDR_OUT, &r); + status = call->ndr_push(push, NDR_OUT, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } blob = ndr_push_blob(push); if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - talloc_free(mem_ctx); + talloc_free(r); return True; } static BOOL api_svcctl_CreateServiceA(pipes_struct *p) { + const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; NTSTATUS status; DATA_BLOB blob; - struct svcctl_CreateServiceA r; - TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_CreateServiceA"); + struct svcctl_CreateServiceA *r; + + call = &ndr_table_svcctl.calls[NDR_SVCCTL_CREATESERVICEA]; + + r = talloc(NULL, struct svcctl_CreateServiceA); + if (r == NULL) { + return False; + } - if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { - talloc_free(mem_ctx); + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); return False; } - pull = ndr_pull_init_blob(&blob, mem_ctx); + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = ndr_pull_svcctl_CreateServiceA(pull, NDR_IN, &r); + status = call->ndr_pull(pull, NDR_IN, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } if (DEBUGLEVEL >= 10) - NDR_PRINT_IN_DEBUG(svcctl_CreateServiceA, &r); + NDR_PRINT_IN_DEBUG(svcctl_CreateServiceA, r); - ZERO_STRUCT(r.out); - r.out.TagId = talloc_zero(mem_ctx, uint32_t); - if (r.out.TagId == NULL) { - talloc_free(mem_ctx); + ZERO_STRUCT(r->out); + r->out.TagId = talloc_zero(r, uint32_t); + if (r->out.TagId == NULL) { + talloc_free(r); return False; } - r.out.result = _svcctl_CreateServiceA(p, &r); + r->out.result = _svcctl_CreateServiceA(p, r); if (p->rng_fault_state) { - talloc_free(mem_ctx); + talloc_free(r); /* Return True here, srv_pipe_hnd.c will take care */ return True; } if (DEBUGLEVEL >= 10) - NDR_PRINT_OUT_DEBUG(svcctl_CreateServiceA, &r); + NDR_PRINT_OUT_DEBUG(svcctl_CreateServiceA, r); - push = ndr_push_init_ctx(mem_ctx); + push = ndr_push_init_ctx(r); if (push == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - status = ndr_push_svcctl_CreateServiceA(push, NDR_OUT, &r); + status = call->ndr_push(push, NDR_OUT, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } blob = ndr_push_blob(push); if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - talloc_free(mem_ctx); + talloc_free(r); return True; } static BOOL api_svcctl_EnumDependentServicesA(pipes_struct *p) { + const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; NTSTATUS status; DATA_BLOB blob; - struct svcctl_EnumDependentServicesA r; - TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_EnumDependentServicesA"); + struct svcctl_EnumDependentServicesA *r; + + call = &ndr_table_svcctl.calls[NDR_SVCCTL_ENUMDEPENDENTSERVICESA]; + + r = talloc(NULL, struct svcctl_EnumDependentServicesA); + if (r == NULL) { + return False; + } - if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { - talloc_free(mem_ctx); + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); return False; } - pull = ndr_pull_init_blob(&blob, mem_ctx); + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = ndr_pull_svcctl_EnumDependentServicesA(pull, NDR_IN, &r); + status = call->ndr_pull(pull, NDR_IN, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } if (DEBUGLEVEL >= 10) - NDR_PRINT_IN_DEBUG(svcctl_EnumDependentServicesA, &r); + NDR_PRINT_IN_DEBUG(svcctl_EnumDependentServicesA, r); - ZERO_STRUCT(r.out); - r.out.service_status = talloc_zero(mem_ctx, struct ENUM_SERVICE_STATUS); - if (r.out.service_status == NULL) { - talloc_free(mem_ctx); + ZERO_STRUCT(r->out); + r->out.service_status = talloc_zero(r, struct ENUM_SERVICE_STATUS); + if (r->out.service_status == NULL) { + talloc_free(r); return False; } - r.out.bytes_needed = talloc_zero(mem_ctx, uint32_t); - if (r.out.bytes_needed == NULL) { - talloc_free(mem_ctx); + r->out.bytes_needed = talloc_zero(r, uint32_t); + if (r->out.bytes_needed == NULL) { + talloc_free(r); return False; } - r.out.services_returned = talloc_zero(mem_ctx, uint32_t); - if (r.out.services_returned == NULL) { - talloc_free(mem_ctx); + r->out.services_returned = talloc_zero(r, uint32_t); + if (r->out.services_returned == NULL) { + talloc_free(r); return False; } - r.out.result = _svcctl_EnumDependentServicesA(p, &r); + r->out.result = _svcctl_EnumDependentServicesA(p, r); if (p->rng_fault_state) { - talloc_free(mem_ctx); + talloc_free(r); /* Return True here, srv_pipe_hnd.c will take care */ return True; } if (DEBUGLEVEL >= 10) - NDR_PRINT_OUT_DEBUG(svcctl_EnumDependentServicesA, &r); + NDR_PRINT_OUT_DEBUG(svcctl_EnumDependentServicesA, r); - push = ndr_push_init_ctx(mem_ctx); + push = ndr_push_init_ctx(r); if (push == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - status = ndr_push_svcctl_EnumDependentServicesA(push, NDR_OUT, &r); + status = call->ndr_push(push, NDR_OUT, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } blob = ndr_push_blob(push); if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - talloc_free(mem_ctx); + talloc_free(r); return True; } static BOOL api_svcctl_EnumServicesStatusA(pipes_struct *p) { + const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; NTSTATUS status; DATA_BLOB blob; - struct svcctl_EnumServicesStatusA r; - TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_EnumServicesStatusA"); + struct svcctl_EnumServicesStatusA *r; + + call = &ndr_table_svcctl.calls[NDR_SVCCTL_ENUMSERVICESSTATUSA]; - if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { - talloc_free(mem_ctx); + r = talloc(NULL, struct svcctl_EnumServicesStatusA); + if (r == NULL) { return False; } - pull = ndr_pull_init_blob(&blob, mem_ctx); + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return False; + } + + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = ndr_pull_svcctl_EnumServicesStatusA(pull, NDR_IN, &r); + status = call->ndr_pull(pull, NDR_IN, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } if (DEBUGLEVEL >= 10) - NDR_PRINT_IN_DEBUG(svcctl_EnumServicesStatusA, &r); + NDR_PRINT_IN_DEBUG(svcctl_EnumServicesStatusA, r); - ZERO_STRUCT(r.out); - r.out.service = talloc_zero_array(mem_ctx, uint8_t, r.in.buf_size); - if (r.out.service == NULL) { - talloc_free(mem_ctx); + ZERO_STRUCT(r->out); + r->out.service = talloc_zero_array(r, uint8_t, r->in.buf_size); + if (r->out.service == NULL) { + talloc_free(r); return False; } - r.out.bytes_needed = talloc_zero(mem_ctx, uint32_t); - if (r.out.bytes_needed == NULL) { - talloc_free(mem_ctx); + r->out.bytes_needed = talloc_zero(r, uint32_t); + if (r->out.bytes_needed == NULL) { + talloc_free(r); return False; } - r.out.services_returned = talloc_zero(mem_ctx, uint32_t); - if (r.out.services_returned == NULL) { - talloc_free(mem_ctx); + r->out.services_returned = talloc_zero(r, uint32_t); + if (r->out.services_returned == NULL) { + talloc_free(r); return False; } - r.out.resume_handle = r.in.resume_handle; - r.out.result = _svcctl_EnumServicesStatusA(p, &r); + r->out.resume_handle = r->in.resume_handle; + r->out.result = _svcctl_EnumServicesStatusA(p, r); if (p->rng_fault_state) { - talloc_free(mem_ctx); + talloc_free(r); /* Return True here, srv_pipe_hnd.c will take care */ return True; } if (DEBUGLEVEL >= 10) - NDR_PRINT_OUT_DEBUG(svcctl_EnumServicesStatusA, &r); + NDR_PRINT_OUT_DEBUG(svcctl_EnumServicesStatusA, r); - push = ndr_push_init_ctx(mem_ctx); + push = ndr_push_init_ctx(r); if (push == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - status = ndr_push_svcctl_EnumServicesStatusA(push, NDR_OUT, &r); + status = call->ndr_push(push, NDR_OUT, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } blob = ndr_push_blob(push); if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - talloc_free(mem_ctx); + talloc_free(r); return True; } static BOOL api_svcctl_OpenSCManagerA(pipes_struct *p) { + const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; NTSTATUS status; DATA_BLOB blob; - struct svcctl_OpenSCManagerA r; - TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_OpenSCManagerA"); + struct svcctl_OpenSCManagerA *r; + + call = &ndr_table_svcctl.calls[NDR_SVCCTL_OPENSCMANAGERA]; + + r = talloc(NULL, struct svcctl_OpenSCManagerA); + if (r == NULL) { + return False; + } - if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { - talloc_free(mem_ctx); + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); return False; } - pull = ndr_pull_init_blob(&blob, mem_ctx); + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = ndr_pull_svcctl_OpenSCManagerA(pull, NDR_IN, &r); + status = call->ndr_pull(pull, NDR_IN, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } if (DEBUGLEVEL >= 10) - NDR_PRINT_IN_DEBUG(svcctl_OpenSCManagerA, &r); + NDR_PRINT_IN_DEBUG(svcctl_OpenSCManagerA, r); - ZERO_STRUCT(r.out); - r.out.handle = talloc_zero(mem_ctx, struct policy_handle); - if (r.out.handle == NULL) { - talloc_free(mem_ctx); + ZERO_STRUCT(r->out); + r->out.handle = talloc_zero(r, struct policy_handle); + if (r->out.handle == NULL) { + talloc_free(r); return False; } - r.out.result = _svcctl_OpenSCManagerA(p, &r); + r->out.result = _svcctl_OpenSCManagerA(p, r); if (p->rng_fault_state) { - talloc_free(mem_ctx); + talloc_free(r); /* Return True here, srv_pipe_hnd.c will take care */ return True; } if (DEBUGLEVEL >= 10) - NDR_PRINT_OUT_DEBUG(svcctl_OpenSCManagerA, &r); + NDR_PRINT_OUT_DEBUG(svcctl_OpenSCManagerA, r); - push = ndr_push_init_ctx(mem_ctx); + push = ndr_push_init_ctx(r); if (push == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - status = ndr_push_svcctl_OpenSCManagerA(push, NDR_OUT, &r); + status = call->ndr_push(push, NDR_OUT, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } blob = ndr_push_blob(push); if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - talloc_free(mem_ctx); + talloc_free(r); return True; } static BOOL api_svcctl_OpenServiceA(pipes_struct *p) { + const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; NTSTATUS status; DATA_BLOB blob; - struct svcctl_OpenServiceA r; - TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_OpenServiceA"); + struct svcctl_OpenServiceA *r; + + call = &ndr_table_svcctl.calls[NDR_SVCCTL_OPENSERVICEA]; + + r = talloc(NULL, struct svcctl_OpenServiceA); + if (r == NULL) { + return False; + } - if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { - talloc_free(mem_ctx); + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); return False; } - pull = ndr_pull_init_blob(&blob, mem_ctx); + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = ndr_pull_svcctl_OpenServiceA(pull, NDR_IN, &r); + status = call->ndr_pull(pull, NDR_IN, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } if (DEBUGLEVEL >= 10) - NDR_PRINT_IN_DEBUG(svcctl_OpenServiceA, &r); + NDR_PRINT_IN_DEBUG(svcctl_OpenServiceA, r); - r.out.result = _svcctl_OpenServiceA(p, &r); + r->out.result = _svcctl_OpenServiceA(p, r); if (p->rng_fault_state) { - talloc_free(mem_ctx); + talloc_free(r); /* Return True here, srv_pipe_hnd.c will take care */ return True; } if (DEBUGLEVEL >= 10) - NDR_PRINT_OUT_DEBUG(svcctl_OpenServiceA, &r); + NDR_PRINT_OUT_DEBUG(svcctl_OpenServiceA, r); - push = ndr_push_init_ctx(mem_ctx); + push = ndr_push_init_ctx(r); if (push == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - status = ndr_push_svcctl_OpenServiceA(push, NDR_OUT, &r); + status = call->ndr_push(push, NDR_OUT, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } blob = ndr_push_blob(push); if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - talloc_free(mem_ctx); + talloc_free(r); return True; } static BOOL api_svcctl_QueryServiceConfigA(pipes_struct *p) { + const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; NTSTATUS status; DATA_BLOB blob; - struct svcctl_QueryServiceConfigA r; - TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_QueryServiceConfigA"); + struct svcctl_QueryServiceConfigA *r; - if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { - talloc_free(mem_ctx); + call = &ndr_table_svcctl.calls[NDR_SVCCTL_QUERYSERVICECONFIGA]; + + r = talloc(NULL, struct svcctl_QueryServiceConfigA); + if (r == NULL) { return False; } - pull = ndr_pull_init_blob(&blob, mem_ctx); + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return False; + } + + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = ndr_pull_svcctl_QueryServiceConfigA(pull, NDR_IN, &r); + status = call->ndr_pull(pull, NDR_IN, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } if (DEBUGLEVEL >= 10) - NDR_PRINT_IN_DEBUG(svcctl_QueryServiceConfigA, &r); + NDR_PRINT_IN_DEBUG(svcctl_QueryServiceConfigA, r); - ZERO_STRUCT(r.out); - r.out.query = talloc_zero_array(mem_ctx, uint8_t, r.in.buf_size); - if (r.out.query == NULL) { - talloc_free(mem_ctx); + ZERO_STRUCT(r->out); + r->out.query = talloc_zero_array(r, uint8_t, r->in.buf_size); + if (r->out.query == NULL) { + talloc_free(r); return False; } - r.out.bytes_needed = talloc_zero(mem_ctx, uint32_t); - if (r.out.bytes_needed == NULL) { - talloc_free(mem_ctx); + r->out.bytes_needed = talloc_zero(r, uint32_t); + if (r->out.bytes_needed == NULL) { + talloc_free(r); return False; } - r.out.result = _svcctl_QueryServiceConfigA(p, &r); + r->out.result = _svcctl_QueryServiceConfigA(p, r); if (p->rng_fault_state) { - talloc_free(mem_ctx); + talloc_free(r); /* Return True here, srv_pipe_hnd.c will take care */ return True; } if (DEBUGLEVEL >= 10) - NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceConfigA, &r); + NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceConfigA, r); - push = ndr_push_init_ctx(mem_ctx); + push = ndr_push_init_ctx(r); if (push == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - status = ndr_push_svcctl_QueryServiceConfigA(push, NDR_OUT, &r); + status = call->ndr_push(push, NDR_OUT, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } blob = ndr_push_blob(push); if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - talloc_free(mem_ctx); + talloc_free(r); return True; } static BOOL api_svcctl_QueryServiceLockStatusA(pipes_struct *p) { + const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; NTSTATUS status; DATA_BLOB blob; - struct svcctl_QueryServiceLockStatusA r; - TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_QueryServiceLockStatusA"); + struct svcctl_QueryServiceLockStatusA *r; + + call = &ndr_table_svcctl.calls[NDR_SVCCTL_QUERYSERVICELOCKSTATUSA]; - if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { - talloc_free(mem_ctx); + r = talloc(NULL, struct svcctl_QueryServiceLockStatusA); + if (r == NULL) { return False; } - pull = ndr_pull_init_blob(&blob, mem_ctx); + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return False; + } + + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = ndr_pull_svcctl_QueryServiceLockStatusA(pull, NDR_IN, &r); + status = call->ndr_pull(pull, NDR_IN, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } if (DEBUGLEVEL >= 10) - NDR_PRINT_IN_DEBUG(svcctl_QueryServiceLockStatusA, &r); + NDR_PRINT_IN_DEBUG(svcctl_QueryServiceLockStatusA, r); - ZERO_STRUCT(r.out); - r.out.lock_status = talloc_zero(mem_ctx, struct SERVICE_LOCK_STATUS); - if (r.out.lock_status == NULL) { - talloc_free(mem_ctx); + ZERO_STRUCT(r->out); + r->out.lock_status = talloc_zero(r, struct SERVICE_LOCK_STATUS); + if (r->out.lock_status == NULL) { + talloc_free(r); return False; } - r.out.required_buf_size = talloc_zero(mem_ctx, uint32_t); - if (r.out.required_buf_size == NULL) { - talloc_free(mem_ctx); + r->out.required_buf_size = talloc_zero(r, uint32_t); + if (r->out.required_buf_size == NULL) { + talloc_free(r); return False; } - r.out.result = _svcctl_QueryServiceLockStatusA(p, &r); + r->out.result = _svcctl_QueryServiceLockStatusA(p, r); if (p->rng_fault_state) { - talloc_free(mem_ctx); + talloc_free(r); /* Return True here, srv_pipe_hnd.c will take care */ return True; } if (DEBUGLEVEL >= 10) - NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceLockStatusA, &r); + NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceLockStatusA, r); - push = ndr_push_init_ctx(mem_ctx); + push = ndr_push_init_ctx(r); if (push == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - status = ndr_push_svcctl_QueryServiceLockStatusA(push, NDR_OUT, &r); + status = call->ndr_push(push, NDR_OUT, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } blob = ndr_push_blob(push); if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - talloc_free(mem_ctx); + talloc_free(r); return True; } static BOOL api_svcctl_StartServiceA(pipes_struct *p) { + const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; NTSTATUS status; DATA_BLOB blob; - struct svcctl_StartServiceA r; - TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_StartServiceA"); + struct svcctl_StartServiceA *r; - if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { - talloc_free(mem_ctx); + call = &ndr_table_svcctl.calls[NDR_SVCCTL_STARTSERVICEA]; + + r = talloc(NULL, struct svcctl_StartServiceA); + if (r == NULL) { return False; } - pull = ndr_pull_init_blob(&blob, mem_ctx); + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return False; + } + + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = ndr_pull_svcctl_StartServiceA(pull, NDR_IN, &r); + status = call->ndr_pull(pull, NDR_IN, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } if (DEBUGLEVEL >= 10) - NDR_PRINT_IN_DEBUG(svcctl_StartServiceA, &r); + NDR_PRINT_IN_DEBUG(svcctl_StartServiceA, r); - r.out.result = _svcctl_StartServiceA(p, &r); + r->out.result = _svcctl_StartServiceA(p, r); if (p->rng_fault_state) { - talloc_free(mem_ctx); + talloc_free(r); /* Return True here, srv_pipe_hnd.c will take care */ return True; } if (DEBUGLEVEL >= 10) - NDR_PRINT_OUT_DEBUG(svcctl_StartServiceA, &r); + NDR_PRINT_OUT_DEBUG(svcctl_StartServiceA, r); - push = ndr_push_init_ctx(mem_ctx); + push = ndr_push_init_ctx(r); if (push == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - status = ndr_push_svcctl_StartServiceA(push, NDR_OUT, &r); + status = call->ndr_push(push, NDR_OUT, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } blob = ndr_push_blob(push); if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - talloc_free(mem_ctx); + talloc_free(r); return True; } static BOOL api_svcctl_GetServiceDisplayNameA(pipes_struct *p) { + const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; NTSTATUS status; DATA_BLOB blob; - struct svcctl_GetServiceDisplayNameA r; - TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_GetServiceDisplayNameA"); + struct svcctl_GetServiceDisplayNameA *r; + + call = &ndr_table_svcctl.calls[NDR_SVCCTL_GETSERVICEDISPLAYNAMEA]; + + r = talloc(NULL, struct svcctl_GetServiceDisplayNameA); + if (r == NULL) { + return False; + } - if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { - talloc_free(mem_ctx); + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); return False; } - pull = ndr_pull_init_blob(&blob, mem_ctx); + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = ndr_pull_svcctl_GetServiceDisplayNameA(pull, NDR_IN, &r); + status = call->ndr_pull(pull, NDR_IN, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } if (DEBUGLEVEL >= 10) - NDR_PRINT_IN_DEBUG(svcctl_GetServiceDisplayNameA, &r); + NDR_PRINT_IN_DEBUG(svcctl_GetServiceDisplayNameA, r); - ZERO_STRUCT(r.out); - r.out.display_name = talloc_zero(mem_ctx, const char *); - if (r.out.display_name == NULL) { - talloc_free(mem_ctx); + ZERO_STRUCT(r->out); + r->out.display_name = talloc_zero(r, const char *); + if (r->out.display_name == NULL) { + talloc_free(r); return False; } - r.out.display_name_length = r.in.display_name_length; - r.out.result = _svcctl_GetServiceDisplayNameA(p, &r); + r->out.display_name_length = r->in.display_name_length; + r->out.result = _svcctl_GetServiceDisplayNameA(p, r); if (p->rng_fault_state) { - talloc_free(mem_ctx); + talloc_free(r); /* Return True here, srv_pipe_hnd.c will take care */ return True; } if (DEBUGLEVEL >= 10) - NDR_PRINT_OUT_DEBUG(svcctl_GetServiceDisplayNameA, &r); + NDR_PRINT_OUT_DEBUG(svcctl_GetServiceDisplayNameA, r); - push = ndr_push_init_ctx(mem_ctx); + push = ndr_push_init_ctx(r); if (push == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - status = ndr_push_svcctl_GetServiceDisplayNameA(push, NDR_OUT, &r); + status = call->ndr_push(push, NDR_OUT, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } blob = ndr_push_blob(push); if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - talloc_free(mem_ctx); + talloc_free(r); return True; } static BOOL api_svcctl_GetServiceKeyNameA(pipes_struct *p) { + const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; NTSTATUS status; DATA_BLOB blob; - struct svcctl_GetServiceKeyNameA r; - TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_GetServiceKeyNameA"); + struct svcctl_GetServiceKeyNameA *r; - if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { - talloc_free(mem_ctx); + call = &ndr_table_svcctl.calls[NDR_SVCCTL_GETSERVICEKEYNAMEA]; + + r = talloc(NULL, struct svcctl_GetServiceKeyNameA); + if (r == NULL) { + return False; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); return False; } - pull = ndr_pull_init_blob(&blob, mem_ctx); + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = ndr_pull_svcctl_GetServiceKeyNameA(pull, NDR_IN, &r); + status = call->ndr_pull(pull, NDR_IN, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } if (DEBUGLEVEL >= 10) - NDR_PRINT_IN_DEBUG(svcctl_GetServiceKeyNameA, &r); + NDR_PRINT_IN_DEBUG(svcctl_GetServiceKeyNameA, r); - ZERO_STRUCT(r.out); - r.out.key_name = talloc_zero(mem_ctx, const char *); - if (r.out.key_name == NULL) { - talloc_free(mem_ctx); + ZERO_STRUCT(r->out); + r->out.key_name = talloc_zero(r, const char *); + if (r->out.key_name == NULL) { + talloc_free(r); return False; } - r.out.display_name_length = r.in.display_name_length; - r.out.result = _svcctl_GetServiceKeyNameA(p, &r); + r->out.display_name_length = r->in.display_name_length; + r->out.result = _svcctl_GetServiceKeyNameA(p, r); if (p->rng_fault_state) { - talloc_free(mem_ctx); + talloc_free(r); /* Return True here, srv_pipe_hnd.c will take care */ return True; } if (DEBUGLEVEL >= 10) - NDR_PRINT_OUT_DEBUG(svcctl_GetServiceKeyNameA, &r); + NDR_PRINT_OUT_DEBUG(svcctl_GetServiceKeyNameA, r); - push = ndr_push_init_ctx(mem_ctx); + push = ndr_push_init_ctx(r); if (push == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - status = ndr_push_svcctl_GetServiceKeyNameA(push, NDR_OUT, &r); + status = call->ndr_push(push, NDR_OUT, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } blob = ndr_push_blob(push); if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - talloc_free(mem_ctx); + talloc_free(r); return True; } static BOOL api_svcctl_GetCurrentGroupeStateW(pipes_struct *p) { + const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; NTSTATUS status; DATA_BLOB blob; - struct svcctl_GetCurrentGroupeStateW r; - TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_GetCurrentGroupeStateW"); + struct svcctl_GetCurrentGroupeStateW *r; + + call = &ndr_table_svcctl.calls[NDR_SVCCTL_GETCURRENTGROUPESTATEW]; - if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { - talloc_free(mem_ctx); + r = talloc(NULL, struct svcctl_GetCurrentGroupeStateW); + if (r == NULL) { return False; } - pull = ndr_pull_init_blob(&blob, mem_ctx); + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return False; + } + + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = ndr_pull_svcctl_GetCurrentGroupeStateW(pull, NDR_IN, &r); + status = call->ndr_pull(pull, NDR_IN, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } if (DEBUGLEVEL >= 10) - NDR_PRINT_IN_DEBUG(svcctl_GetCurrentGroupeStateW, &r); + NDR_PRINT_IN_DEBUG(svcctl_GetCurrentGroupeStateW, r); - r.out.result = _svcctl_GetCurrentGroupeStateW(p, &r); + r->out.result = _svcctl_GetCurrentGroupeStateW(p, r); if (p->rng_fault_state) { - talloc_free(mem_ctx); + talloc_free(r); /* Return True here, srv_pipe_hnd.c will take care */ return True; } if (DEBUGLEVEL >= 10) - NDR_PRINT_OUT_DEBUG(svcctl_GetCurrentGroupeStateW, &r); + NDR_PRINT_OUT_DEBUG(svcctl_GetCurrentGroupeStateW, r); - push = ndr_push_init_ctx(mem_ctx); + push = ndr_push_init_ctx(r); if (push == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - status = ndr_push_svcctl_GetCurrentGroupeStateW(push, NDR_OUT, &r); + status = call->ndr_push(push, NDR_OUT, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } blob = ndr_push_blob(push); if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - talloc_free(mem_ctx); + talloc_free(r); return True; } static BOOL api_svcctl_EnumServiceGroupW(pipes_struct *p) { + const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; NTSTATUS status; DATA_BLOB blob; - struct svcctl_EnumServiceGroupW r; - TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_EnumServiceGroupW"); + struct svcctl_EnumServiceGroupW *r; + + call = &ndr_table_svcctl.calls[NDR_SVCCTL_ENUMSERVICEGROUPW]; + + r = talloc(NULL, struct svcctl_EnumServiceGroupW); + if (r == NULL) { + return False; + } - if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { - talloc_free(mem_ctx); + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); return False; } - pull = ndr_pull_init_blob(&blob, mem_ctx); + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = ndr_pull_svcctl_EnumServiceGroupW(pull, NDR_IN, &r); + status = call->ndr_pull(pull, NDR_IN, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } if (DEBUGLEVEL >= 10) - NDR_PRINT_IN_DEBUG(svcctl_EnumServiceGroupW, &r); + NDR_PRINT_IN_DEBUG(svcctl_EnumServiceGroupW, r); - r.out.result = _svcctl_EnumServiceGroupW(p, &r); + r->out.result = _svcctl_EnumServiceGroupW(p, r); if (p->rng_fault_state) { - talloc_free(mem_ctx); + talloc_free(r); /* Return True here, srv_pipe_hnd.c will take care */ return True; } if (DEBUGLEVEL >= 10) - NDR_PRINT_OUT_DEBUG(svcctl_EnumServiceGroupW, &r); + NDR_PRINT_OUT_DEBUG(svcctl_EnumServiceGroupW, r); - push = ndr_push_init_ctx(mem_ctx); + push = ndr_push_init_ctx(r); if (push == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - status = ndr_push_svcctl_EnumServiceGroupW(push, NDR_OUT, &r); + status = call->ndr_push(push, NDR_OUT, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } blob = ndr_push_blob(push); if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - talloc_free(mem_ctx); + talloc_free(r); return True; } static BOOL api_svcctl_ChangeServiceConfig2A(pipes_struct *p) { + const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; NTSTATUS status; DATA_BLOB blob; - struct svcctl_ChangeServiceConfig2A r; - TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_ChangeServiceConfig2A"); + struct svcctl_ChangeServiceConfig2A *r; + + call = &ndr_table_svcctl.calls[NDR_SVCCTL_CHANGESERVICECONFIG2A]; + + r = talloc(NULL, struct svcctl_ChangeServiceConfig2A); + if (r == NULL) { + return False; + } - if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { - talloc_free(mem_ctx); + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); return False; } - pull = ndr_pull_init_blob(&blob, mem_ctx); + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = ndr_pull_svcctl_ChangeServiceConfig2A(pull, NDR_IN, &r); + status = call->ndr_pull(pull, NDR_IN, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } if (DEBUGLEVEL >= 10) - NDR_PRINT_IN_DEBUG(svcctl_ChangeServiceConfig2A, &r); + NDR_PRINT_IN_DEBUG(svcctl_ChangeServiceConfig2A, r); - r.out.result = _svcctl_ChangeServiceConfig2A(p, &r); + r->out.result = _svcctl_ChangeServiceConfig2A(p, r); if (p->rng_fault_state) { - talloc_free(mem_ctx); + talloc_free(r); /* Return True here, srv_pipe_hnd.c will take care */ return True; } if (DEBUGLEVEL >= 10) - NDR_PRINT_OUT_DEBUG(svcctl_ChangeServiceConfig2A, &r); + NDR_PRINT_OUT_DEBUG(svcctl_ChangeServiceConfig2A, r); - push = ndr_push_init_ctx(mem_ctx); + push = ndr_push_init_ctx(r); if (push == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - status = ndr_push_svcctl_ChangeServiceConfig2A(push, NDR_OUT, &r); + status = call->ndr_push(push, NDR_OUT, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } blob = ndr_push_blob(push); if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - talloc_free(mem_ctx); + talloc_free(r); return True; } static BOOL api_svcctl_ChangeServiceConfig2W(pipes_struct *p) { + const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; NTSTATUS status; DATA_BLOB blob; - struct svcctl_ChangeServiceConfig2W r; - TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_ChangeServiceConfig2W"); + struct svcctl_ChangeServiceConfig2W *r; + + call = &ndr_table_svcctl.calls[NDR_SVCCTL_CHANGESERVICECONFIG2W]; - if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { - talloc_free(mem_ctx); + r = talloc(NULL, struct svcctl_ChangeServiceConfig2W); + if (r == NULL) { return False; } - pull = ndr_pull_init_blob(&blob, mem_ctx); + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return False; + } + + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = ndr_pull_svcctl_ChangeServiceConfig2W(pull, NDR_IN, &r); + status = call->ndr_pull(pull, NDR_IN, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } if (DEBUGLEVEL >= 10) - NDR_PRINT_IN_DEBUG(svcctl_ChangeServiceConfig2W, &r); + NDR_PRINT_IN_DEBUG(svcctl_ChangeServiceConfig2W, r); - r.out.result = _svcctl_ChangeServiceConfig2W(p, &r); + r->out.result = _svcctl_ChangeServiceConfig2W(p, r); if (p->rng_fault_state) { - talloc_free(mem_ctx); + talloc_free(r); /* Return True here, srv_pipe_hnd.c will take care */ return True; } if (DEBUGLEVEL >= 10) - NDR_PRINT_OUT_DEBUG(svcctl_ChangeServiceConfig2W, &r); + NDR_PRINT_OUT_DEBUG(svcctl_ChangeServiceConfig2W, r); - push = ndr_push_init_ctx(mem_ctx); + push = ndr_push_init_ctx(r); if (push == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - status = ndr_push_svcctl_ChangeServiceConfig2W(push, NDR_OUT, &r); + status = call->ndr_push(push, NDR_OUT, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } blob = ndr_push_blob(push); if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - talloc_free(mem_ctx); + talloc_free(r); return True; } static BOOL api_svcctl_QueryServiceConfig2A(pipes_struct *p) { + const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; NTSTATUS status; DATA_BLOB blob; - struct svcctl_QueryServiceConfig2A r; - TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_QueryServiceConfig2A"); + struct svcctl_QueryServiceConfig2A *r; + + call = &ndr_table_svcctl.calls[NDR_SVCCTL_QUERYSERVICECONFIG2A]; + + r = talloc(NULL, struct svcctl_QueryServiceConfig2A); + if (r == NULL) { + return False; + } - if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { - talloc_free(mem_ctx); + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); return False; } - pull = ndr_pull_init_blob(&blob, mem_ctx); + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = ndr_pull_svcctl_QueryServiceConfig2A(pull, NDR_IN, &r); + status = call->ndr_pull(pull, NDR_IN, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } if (DEBUGLEVEL >= 10) - NDR_PRINT_IN_DEBUG(svcctl_QueryServiceConfig2A, &r); + NDR_PRINT_IN_DEBUG(svcctl_QueryServiceConfig2A, r); - ZERO_STRUCT(r.out); - r.out.buffer = talloc_zero_array(mem_ctx, uint8_t, r.in.buf_size); - if (r.out.buffer == NULL) { - talloc_free(mem_ctx); + ZERO_STRUCT(r->out); + r->out.buffer = talloc_zero_array(r, uint8_t, r->in.buf_size); + if (r->out.buffer == NULL) { + talloc_free(r); return False; } - r.out.bytes_needed = talloc_zero(mem_ctx, uint32_t); - if (r.out.bytes_needed == NULL) { - talloc_free(mem_ctx); + r->out.bytes_needed = talloc_zero(r, uint32_t); + if (r->out.bytes_needed == NULL) { + talloc_free(r); return False; } - r.out.result = _svcctl_QueryServiceConfig2A(p, &r); + r->out.result = _svcctl_QueryServiceConfig2A(p, r); if (p->rng_fault_state) { - talloc_free(mem_ctx); + talloc_free(r); /* Return True here, srv_pipe_hnd.c will take care */ return True; } if (DEBUGLEVEL >= 10) - NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceConfig2A, &r); + NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceConfig2A, r); - push = ndr_push_init_ctx(mem_ctx); + push = ndr_push_init_ctx(r); if (push == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - status = ndr_push_svcctl_QueryServiceConfig2A(push, NDR_OUT, &r); + status = call->ndr_push(push, NDR_OUT, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } blob = ndr_push_blob(push); if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - talloc_free(mem_ctx); + talloc_free(r); return True; } static BOOL api_svcctl_QueryServiceConfig2W(pipes_struct *p) { + const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; NTSTATUS status; DATA_BLOB blob; - struct svcctl_QueryServiceConfig2W r; - TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_QueryServiceConfig2W"); + struct svcctl_QueryServiceConfig2W *r; + + call = &ndr_table_svcctl.calls[NDR_SVCCTL_QUERYSERVICECONFIG2W]; + + r = talloc(NULL, struct svcctl_QueryServiceConfig2W); + if (r == NULL) { + return False; + } - if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { - talloc_free(mem_ctx); + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); return False; } - pull = ndr_pull_init_blob(&blob, mem_ctx); + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = ndr_pull_svcctl_QueryServiceConfig2W(pull, NDR_IN, &r); + status = call->ndr_pull(pull, NDR_IN, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } if (DEBUGLEVEL >= 10) - NDR_PRINT_IN_DEBUG(svcctl_QueryServiceConfig2W, &r); + NDR_PRINT_IN_DEBUG(svcctl_QueryServiceConfig2W, r); - ZERO_STRUCT(r.out); - r.out.buffer = talloc_zero_array(mem_ctx, uint8_t, r.in.buf_size); - if (r.out.buffer == NULL) { - talloc_free(mem_ctx); + ZERO_STRUCT(r->out); + r->out.buffer = talloc_zero_array(r, uint8_t, r->in.buf_size); + if (r->out.buffer == NULL) { + talloc_free(r); return False; } - r.out.bytes_needed = talloc_zero(mem_ctx, uint32_t); - if (r.out.bytes_needed == NULL) { - talloc_free(mem_ctx); + r->out.bytes_needed = talloc_zero(r, uint32_t); + if (r->out.bytes_needed == NULL) { + talloc_free(r); return False; } - r.out.result = _svcctl_QueryServiceConfig2W(p, &r); + r->out.result = _svcctl_QueryServiceConfig2W(p, r); if (p->rng_fault_state) { - talloc_free(mem_ctx); + talloc_free(r); /* Return True here, srv_pipe_hnd.c will take care */ return True; } if (DEBUGLEVEL >= 10) - NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceConfig2W, &r); + NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceConfig2W, r); - push = ndr_push_init_ctx(mem_ctx); + push = ndr_push_init_ctx(r); if (push == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - status = ndr_push_svcctl_QueryServiceConfig2W(push, NDR_OUT, &r); + status = call->ndr_push(push, NDR_OUT, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } blob = ndr_push_blob(push); if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - talloc_free(mem_ctx); + talloc_free(r); return True; } static BOOL api_svcctl_QueryServiceStatusEx(pipes_struct *p) { + const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; NTSTATUS status; DATA_BLOB blob; - struct svcctl_QueryServiceStatusEx r; - TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_QueryServiceStatusEx"); + struct svcctl_QueryServiceStatusEx *r; - if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { - talloc_free(mem_ctx); + call = &ndr_table_svcctl.calls[NDR_SVCCTL_QUERYSERVICESTATUSEX]; + + r = talloc(NULL, struct svcctl_QueryServiceStatusEx); + if (r == NULL) { return False; } - pull = ndr_pull_init_blob(&blob, mem_ctx); + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return False; + } + + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = ndr_pull_svcctl_QueryServiceStatusEx(pull, NDR_IN, &r); + status = call->ndr_pull(pull, NDR_IN, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } if (DEBUGLEVEL >= 10) - NDR_PRINT_IN_DEBUG(svcctl_QueryServiceStatusEx, &r); + NDR_PRINT_IN_DEBUG(svcctl_QueryServiceStatusEx, r); - ZERO_STRUCT(r.out); - r.out.buffer = talloc_zero_array(mem_ctx, uint8_t, r.in.buf_size); - if (r.out.buffer == NULL) { - talloc_free(mem_ctx); + ZERO_STRUCT(r->out); + r->out.buffer = talloc_zero_array(r, uint8_t, r->in.buf_size); + if (r->out.buffer == NULL) { + talloc_free(r); return False; } - r.out.bytes_needed = talloc_zero(mem_ctx, uint32_t); - if (r.out.bytes_needed == NULL) { - talloc_free(mem_ctx); + r->out.bytes_needed = talloc_zero(r, uint32_t); + if (r->out.bytes_needed == NULL) { + talloc_free(r); return False; } - r.out.result = _svcctl_QueryServiceStatusEx(p, &r); + r->out.result = _svcctl_QueryServiceStatusEx(p, r); if (p->rng_fault_state) { - talloc_free(mem_ctx); + talloc_free(r); /* Return True here, srv_pipe_hnd.c will take care */ return True; } if (DEBUGLEVEL >= 10) - NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceStatusEx, &r); + NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceStatusEx, r); - push = ndr_push_init_ctx(mem_ctx); + push = ndr_push_init_ctx(r); if (push == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - status = ndr_push_svcctl_QueryServiceStatusEx(push, NDR_OUT, &r); + status = call->ndr_push(push, NDR_OUT, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } blob = ndr_push_blob(push); if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - talloc_free(mem_ctx); + talloc_free(r); return True; } static BOOL api_EnumServicesStatusExA(pipes_struct *p) { + const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; NTSTATUS status; DATA_BLOB blob; - struct EnumServicesStatusExA r; - TALLOC_CTX *mem_ctx = talloc_init("api_EnumServicesStatusExA"); + struct EnumServicesStatusExA *r; + + call = &ndr_table_svcctl.calls[NDR_ENUMSERVICESSTATUSEXA]; - if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { - talloc_free(mem_ctx); + r = talloc(NULL, struct EnumServicesStatusExA); + if (r == NULL) { return False; } - pull = ndr_pull_init_blob(&blob, mem_ctx); + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return False; + } + + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = ndr_pull_EnumServicesStatusExA(pull, NDR_IN, &r); + status = call->ndr_pull(pull, NDR_IN, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } if (DEBUGLEVEL >= 10) - NDR_PRINT_IN_DEBUG(EnumServicesStatusExA, &r); + NDR_PRINT_IN_DEBUG(EnumServicesStatusExA, r); - ZERO_STRUCT(r.out); - r.out.services = talloc_zero_array(mem_ctx, uint8_t, r.in.buf_size); - if (r.out.services == NULL) { - talloc_free(mem_ctx); + ZERO_STRUCT(r->out); + r->out.services = talloc_zero_array(r, uint8_t, r->in.buf_size); + if (r->out.services == NULL) { + talloc_free(r); return False; } - r.out.bytes_needed = talloc_zero(mem_ctx, uint32_t); - if (r.out.bytes_needed == NULL) { - talloc_free(mem_ctx); + r->out.bytes_needed = talloc_zero(r, uint32_t); + if (r->out.bytes_needed == NULL) { + talloc_free(r); return False; } - r.out.service_returned = talloc_zero(mem_ctx, uint32_t); - if (r.out.service_returned == NULL) { - talloc_free(mem_ctx); + r->out.service_returned = talloc_zero(r, uint32_t); + if (r->out.service_returned == NULL) { + talloc_free(r); return False; } - r.out.resume_handle = r.in.resume_handle; - r.out.group_name = talloc_zero(mem_ctx, const char *); - if (r.out.group_name == NULL) { - talloc_free(mem_ctx); + r->out.resume_handle = r->in.resume_handle; + r->out.group_name = talloc_zero(r, const char *); + if (r->out.group_name == NULL) { + talloc_free(r); return False; } - r.out.result = _EnumServicesStatusExA(p, &r); + r->out.result = _EnumServicesStatusExA(p, r); if (p->rng_fault_state) { - talloc_free(mem_ctx); + talloc_free(r); /* Return True here, srv_pipe_hnd.c will take care */ return True; } if (DEBUGLEVEL >= 10) - NDR_PRINT_OUT_DEBUG(EnumServicesStatusExA, &r); + NDR_PRINT_OUT_DEBUG(EnumServicesStatusExA, r); - push = ndr_push_init_ctx(mem_ctx); + push = ndr_push_init_ctx(r); if (push == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - status = ndr_push_EnumServicesStatusExA(push, NDR_OUT, &r); + status = call->ndr_push(push, NDR_OUT, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } blob = ndr_push_blob(push); if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - talloc_free(mem_ctx); + talloc_free(r); return True; } static BOOL api_EnumServicesStatusExW(pipes_struct *p) { + const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; NTSTATUS status; DATA_BLOB blob; - struct EnumServicesStatusExW r; - TALLOC_CTX *mem_ctx = talloc_init("api_EnumServicesStatusExW"); + struct EnumServicesStatusExW *r; - if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { - talloc_free(mem_ctx); + call = &ndr_table_svcctl.calls[NDR_ENUMSERVICESSTATUSEXW]; + + r = talloc(NULL, struct EnumServicesStatusExW); + if (r == NULL) { return False; } - pull = ndr_pull_init_blob(&blob, mem_ctx); + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return False; + } + + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = ndr_pull_EnumServicesStatusExW(pull, NDR_IN, &r); + status = call->ndr_pull(pull, NDR_IN, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } if (DEBUGLEVEL >= 10) - NDR_PRINT_IN_DEBUG(EnumServicesStatusExW, &r); + NDR_PRINT_IN_DEBUG(EnumServicesStatusExW, r); - ZERO_STRUCT(r.out); - r.out.services = talloc_zero_array(mem_ctx, uint8_t, r.in.buf_size); - if (r.out.services == NULL) { - talloc_free(mem_ctx); + ZERO_STRUCT(r->out); + r->out.services = talloc_zero_array(r, uint8_t, r->in.buf_size); + if (r->out.services == NULL) { + talloc_free(r); return False; } - r.out.bytes_needed = talloc_zero(mem_ctx, uint32_t); - if (r.out.bytes_needed == NULL) { - talloc_free(mem_ctx); + r->out.bytes_needed = talloc_zero(r, uint32_t); + if (r->out.bytes_needed == NULL) { + talloc_free(r); return False; } - r.out.service_returned = talloc_zero(mem_ctx, uint32_t); - if (r.out.service_returned == NULL) { - talloc_free(mem_ctx); + r->out.service_returned = talloc_zero(r, uint32_t); + if (r->out.service_returned == NULL) { + talloc_free(r); return False; } - r.out.resume_handle = r.in.resume_handle; - r.out.group_name = talloc_zero(mem_ctx, const char *); - if (r.out.group_name == NULL) { - talloc_free(mem_ctx); + r->out.resume_handle = r->in.resume_handle; + r->out.group_name = talloc_zero(r, const char *); + if (r->out.group_name == NULL) { + talloc_free(r); return False; } - r.out.result = _EnumServicesStatusExW(p, &r); + r->out.result = _EnumServicesStatusExW(p, r); if (p->rng_fault_state) { - talloc_free(mem_ctx); + talloc_free(r); /* Return True here, srv_pipe_hnd.c will take care */ return True; } if (DEBUGLEVEL >= 10) - NDR_PRINT_OUT_DEBUG(EnumServicesStatusExW, &r); + NDR_PRINT_OUT_DEBUG(EnumServicesStatusExW, r); - push = ndr_push_init_ctx(mem_ctx); + push = ndr_push_init_ctx(r); if (push == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - status = ndr_push_EnumServicesStatusExW(push, NDR_OUT, &r); + status = call->ndr_push(push, NDR_OUT, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } blob = ndr_push_blob(push); if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - talloc_free(mem_ctx); + talloc_free(r); return True; } static BOOL api_svcctl_SCSendTSMessage(pipes_struct *p) { + const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; NTSTATUS status; DATA_BLOB blob; - struct svcctl_SCSendTSMessage r; - TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_SCSendTSMessage"); + struct svcctl_SCSendTSMessage *r; + + call = &ndr_table_svcctl.calls[NDR_SVCCTL_SCSENDTSMESSAGE]; + + r = talloc(NULL, struct svcctl_SCSendTSMessage); + if (r == NULL) { + return False; + } - if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { - talloc_free(mem_ctx); + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); return False; } - pull = ndr_pull_init_blob(&blob, mem_ctx); + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = ndr_pull_svcctl_SCSendTSMessage(pull, NDR_IN, &r); + status = call->ndr_pull(pull, NDR_IN, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } if (DEBUGLEVEL >= 10) - NDR_PRINT_IN_DEBUG(svcctl_SCSendTSMessage, &r); + NDR_PRINT_IN_DEBUG(svcctl_SCSendTSMessage, r); - r.out.result = _svcctl_SCSendTSMessage(p, &r); + r->out.result = _svcctl_SCSendTSMessage(p, r); if (p->rng_fault_state) { - talloc_free(mem_ctx); + talloc_free(r); /* Return True here, srv_pipe_hnd.c will take care */ return True; } if (DEBUGLEVEL >= 10) - NDR_PRINT_OUT_DEBUG(svcctl_SCSendTSMessage, &r); + NDR_PRINT_OUT_DEBUG(svcctl_SCSendTSMessage, r); - push = ndr_push_init_ctx(mem_ctx); + push = ndr_push_init_ctx(r); if (push == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - status = ndr_push_svcctl_SCSendTSMessage(push, NDR_OUT, &r); + status = call->ndr_push(push, NDR_OUT, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } blob = ndr_push_blob(push); if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - talloc_free(mem_ctx); + talloc_free(r); return True; } -- cgit From 30191d1a5704ad2b158386b511558972d539ce47 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 18 Oct 2007 17:40:25 -0700 Subject: RIP BOOL. Convert BOOL -> bool. I found a few interesting bugs in various places whilst doing this (places that assumed BOOL == int). I also need to fix the Samba4 pidl generation (next checkin). Jeremy. (This used to be commit f35a266b3cbb3e5fa6a86be60f34fe340a3ca71f) --- source3/librpc/gen_ndr/srv_svcctl.c | 88 ++++++++++++++++++------------------- 1 file changed, 44 insertions(+), 44 deletions(-) (limited to 'source3/librpc/gen_ndr/srv_svcctl.c') diff --git a/source3/librpc/gen_ndr/srv_svcctl.c b/source3/librpc/gen_ndr/srv_svcctl.c index 05dd27e7d8..5f66b8853c 100644 --- a/source3/librpc/gen_ndr/srv_svcctl.c +++ b/source3/librpc/gen_ndr/srv_svcctl.c @@ -6,7 +6,7 @@ #include "includes.h" #include "librpc/gen_ndr/srv_svcctl.h" -static BOOL api_svcctl_CloseServiceHandle(pipes_struct *p) +static bool api_svcctl_CloseServiceHandle(pipes_struct *p) { const struct ndr_interface_call *call; struct ndr_pull *pull; @@ -79,7 +79,7 @@ static BOOL api_svcctl_CloseServiceHandle(pipes_struct *p) return True; } -static BOOL api_svcctl_ControlService(pipes_struct *p) +static bool api_svcctl_ControlService(pipes_struct *p) { const struct ndr_interface_call *call; struct ndr_pull *pull; @@ -157,7 +157,7 @@ static BOOL api_svcctl_ControlService(pipes_struct *p) return True; } -static BOOL api_svcctl_DeleteService(pipes_struct *p) +static bool api_svcctl_DeleteService(pipes_struct *p) { const struct ndr_interface_call *call; struct ndr_pull *pull; @@ -228,7 +228,7 @@ static BOOL api_svcctl_DeleteService(pipes_struct *p) return True; } -static BOOL api_svcctl_LockServiceDatabase(pipes_struct *p) +static bool api_svcctl_LockServiceDatabase(pipes_struct *p) { const struct ndr_interface_call *call; struct ndr_pull *pull; @@ -306,7 +306,7 @@ static BOOL api_svcctl_LockServiceDatabase(pipes_struct *p) return True; } -static BOOL api_svcctl_QueryServiceObjectSecurity(pipes_struct *p) +static bool api_svcctl_QueryServiceObjectSecurity(pipes_struct *p) { const struct ndr_interface_call *call; struct ndr_pull *pull; @@ -377,7 +377,7 @@ static BOOL api_svcctl_QueryServiceObjectSecurity(pipes_struct *p) return True; } -static BOOL api_svcctl_SetServiceObjectSecurity(pipes_struct *p) +static bool api_svcctl_SetServiceObjectSecurity(pipes_struct *p) { const struct ndr_interface_call *call; struct ndr_pull *pull; @@ -448,7 +448,7 @@ static BOOL api_svcctl_SetServiceObjectSecurity(pipes_struct *p) return True; } -static BOOL api_svcctl_QueryServiceStatus(pipes_struct *p) +static bool api_svcctl_QueryServiceStatus(pipes_struct *p) { const struct ndr_interface_call *call; struct ndr_pull *pull; @@ -526,7 +526,7 @@ static BOOL api_svcctl_QueryServiceStatus(pipes_struct *p) return True; } -static BOOL api_svcctl_SetServiceStatus(pipes_struct *p) +static bool api_svcctl_SetServiceStatus(pipes_struct *p) { const struct ndr_interface_call *call; struct ndr_pull *pull; @@ -597,7 +597,7 @@ static BOOL api_svcctl_SetServiceStatus(pipes_struct *p) return True; } -static BOOL api_svcctl_UnlockServiceDatabase(pipes_struct *p) +static bool api_svcctl_UnlockServiceDatabase(pipes_struct *p) { const struct ndr_interface_call *call; struct ndr_pull *pull; @@ -670,7 +670,7 @@ static BOOL api_svcctl_UnlockServiceDatabase(pipes_struct *p) return True; } -static BOOL api_svcctl_NotifyBootConfigStatus(pipes_struct *p) +static bool api_svcctl_NotifyBootConfigStatus(pipes_struct *p) { const struct ndr_interface_call *call; struct ndr_pull *pull; @@ -741,7 +741,7 @@ static BOOL api_svcctl_NotifyBootConfigStatus(pipes_struct *p) return True; } -static BOOL api_svcctl_SCSetServiceBitsW(pipes_struct *p) +static bool api_svcctl_SCSetServiceBitsW(pipes_struct *p) { const struct ndr_interface_call *call; struct ndr_pull *pull; @@ -812,7 +812,7 @@ static BOOL api_svcctl_SCSetServiceBitsW(pipes_struct *p) return True; } -static BOOL api_svcctl_ChangeServiceConfigW(pipes_struct *p) +static bool api_svcctl_ChangeServiceConfigW(pipes_struct *p) { const struct ndr_interface_call *call; struct ndr_pull *pull; @@ -890,7 +890,7 @@ static BOOL api_svcctl_ChangeServiceConfigW(pipes_struct *p) return True; } -static BOOL api_svcctl_CreateServiceW(pipes_struct *p) +static bool api_svcctl_CreateServiceW(pipes_struct *p) { const struct ndr_interface_call *call; struct ndr_pull *pull; @@ -969,7 +969,7 @@ static BOOL api_svcctl_CreateServiceW(pipes_struct *p) return True; } -static BOOL api_svcctl_EnumDependentServicesW(pipes_struct *p) +static bool api_svcctl_EnumDependentServicesW(pipes_struct *p) { const struct ndr_interface_call *call; struct ndr_pull *pull; @@ -1059,7 +1059,7 @@ static BOOL api_svcctl_EnumDependentServicesW(pipes_struct *p) return True; } -static BOOL api_svcctl_EnumServicesStatusW(pipes_struct *p) +static bool api_svcctl_EnumServicesStatusW(pipes_struct *p) { const struct ndr_interface_call *call; struct ndr_pull *pull; @@ -1150,7 +1150,7 @@ static BOOL api_svcctl_EnumServicesStatusW(pipes_struct *p) return True; } -static BOOL api_svcctl_OpenSCManagerW(pipes_struct *p) +static bool api_svcctl_OpenSCManagerW(pipes_struct *p) { const struct ndr_interface_call *call; struct ndr_pull *pull; @@ -1228,7 +1228,7 @@ static BOOL api_svcctl_OpenSCManagerW(pipes_struct *p) return True; } -static BOOL api_svcctl_OpenServiceW(pipes_struct *p) +static bool api_svcctl_OpenServiceW(pipes_struct *p) { const struct ndr_interface_call *call; struct ndr_pull *pull; @@ -1306,7 +1306,7 @@ static BOOL api_svcctl_OpenServiceW(pipes_struct *p) return True; } -static BOOL api_svcctl_QueryServiceConfigW(pipes_struct *p) +static bool api_svcctl_QueryServiceConfigW(pipes_struct *p) { const struct ndr_interface_call *call; struct ndr_pull *pull; @@ -1390,7 +1390,7 @@ static BOOL api_svcctl_QueryServiceConfigW(pipes_struct *p) return True; } -static BOOL api_svcctl_QueryServiceLockStatusW(pipes_struct *p) +static bool api_svcctl_QueryServiceLockStatusW(pipes_struct *p) { const struct ndr_interface_call *call; struct ndr_pull *pull; @@ -1474,7 +1474,7 @@ static BOOL api_svcctl_QueryServiceLockStatusW(pipes_struct *p) return True; } -static BOOL api_svcctl_StartServiceW(pipes_struct *p) +static bool api_svcctl_StartServiceW(pipes_struct *p) { const struct ndr_interface_call *call; struct ndr_pull *pull; @@ -1545,7 +1545,7 @@ static BOOL api_svcctl_StartServiceW(pipes_struct *p) return True; } -static BOOL api_svcctl_GetServiceDisplayNameW(pipes_struct *p) +static bool api_svcctl_GetServiceDisplayNameW(pipes_struct *p) { const struct ndr_interface_call *call; struct ndr_pull *pull; @@ -1624,7 +1624,7 @@ static BOOL api_svcctl_GetServiceDisplayNameW(pipes_struct *p) return True; } -static BOOL api_svcctl_GetServiceKeyNameW(pipes_struct *p) +static bool api_svcctl_GetServiceKeyNameW(pipes_struct *p) { const struct ndr_interface_call *call; struct ndr_pull *pull; @@ -1703,7 +1703,7 @@ static BOOL api_svcctl_GetServiceKeyNameW(pipes_struct *p) return True; } -static BOOL api_svcctl_SCSetServiceBitsA(pipes_struct *p) +static bool api_svcctl_SCSetServiceBitsA(pipes_struct *p) { const struct ndr_interface_call *call; struct ndr_pull *pull; @@ -1774,7 +1774,7 @@ static BOOL api_svcctl_SCSetServiceBitsA(pipes_struct *p) return True; } -static BOOL api_svcctl_ChangeServiceConfigA(pipes_struct *p) +static bool api_svcctl_ChangeServiceConfigA(pipes_struct *p) { const struct ndr_interface_call *call; struct ndr_pull *pull; @@ -1852,7 +1852,7 @@ static BOOL api_svcctl_ChangeServiceConfigA(pipes_struct *p) return True; } -static BOOL api_svcctl_CreateServiceA(pipes_struct *p) +static bool api_svcctl_CreateServiceA(pipes_struct *p) { const struct ndr_interface_call *call; struct ndr_pull *pull; @@ -1930,7 +1930,7 @@ static BOOL api_svcctl_CreateServiceA(pipes_struct *p) return True; } -static BOOL api_svcctl_EnumDependentServicesA(pipes_struct *p) +static bool api_svcctl_EnumDependentServicesA(pipes_struct *p) { const struct ndr_interface_call *call; struct ndr_pull *pull; @@ -2020,7 +2020,7 @@ static BOOL api_svcctl_EnumDependentServicesA(pipes_struct *p) return True; } -static BOOL api_svcctl_EnumServicesStatusA(pipes_struct *p) +static bool api_svcctl_EnumServicesStatusA(pipes_struct *p) { const struct ndr_interface_call *call; struct ndr_pull *pull; @@ -2111,7 +2111,7 @@ static BOOL api_svcctl_EnumServicesStatusA(pipes_struct *p) return True; } -static BOOL api_svcctl_OpenSCManagerA(pipes_struct *p) +static bool api_svcctl_OpenSCManagerA(pipes_struct *p) { const struct ndr_interface_call *call; struct ndr_pull *pull; @@ -2189,7 +2189,7 @@ static BOOL api_svcctl_OpenSCManagerA(pipes_struct *p) return True; } -static BOOL api_svcctl_OpenServiceA(pipes_struct *p) +static bool api_svcctl_OpenServiceA(pipes_struct *p) { const struct ndr_interface_call *call; struct ndr_pull *pull; @@ -2260,7 +2260,7 @@ static BOOL api_svcctl_OpenServiceA(pipes_struct *p) return True; } -static BOOL api_svcctl_QueryServiceConfigA(pipes_struct *p) +static bool api_svcctl_QueryServiceConfigA(pipes_struct *p) { const struct ndr_interface_call *call; struct ndr_pull *pull; @@ -2344,7 +2344,7 @@ static BOOL api_svcctl_QueryServiceConfigA(pipes_struct *p) return True; } -static BOOL api_svcctl_QueryServiceLockStatusA(pipes_struct *p) +static bool api_svcctl_QueryServiceLockStatusA(pipes_struct *p) { const struct ndr_interface_call *call; struct ndr_pull *pull; @@ -2428,7 +2428,7 @@ static BOOL api_svcctl_QueryServiceLockStatusA(pipes_struct *p) return True; } -static BOOL api_svcctl_StartServiceA(pipes_struct *p) +static bool api_svcctl_StartServiceA(pipes_struct *p) { const struct ndr_interface_call *call; struct ndr_pull *pull; @@ -2499,7 +2499,7 @@ static BOOL api_svcctl_StartServiceA(pipes_struct *p) return True; } -static BOOL api_svcctl_GetServiceDisplayNameA(pipes_struct *p) +static bool api_svcctl_GetServiceDisplayNameA(pipes_struct *p) { const struct ndr_interface_call *call; struct ndr_pull *pull; @@ -2578,7 +2578,7 @@ static BOOL api_svcctl_GetServiceDisplayNameA(pipes_struct *p) return True; } -static BOOL api_svcctl_GetServiceKeyNameA(pipes_struct *p) +static bool api_svcctl_GetServiceKeyNameA(pipes_struct *p) { const struct ndr_interface_call *call; struct ndr_pull *pull; @@ -2657,7 +2657,7 @@ static BOOL api_svcctl_GetServiceKeyNameA(pipes_struct *p) return True; } -static BOOL api_svcctl_GetCurrentGroupeStateW(pipes_struct *p) +static bool api_svcctl_GetCurrentGroupeStateW(pipes_struct *p) { const struct ndr_interface_call *call; struct ndr_pull *pull; @@ -2728,7 +2728,7 @@ static BOOL api_svcctl_GetCurrentGroupeStateW(pipes_struct *p) return True; } -static BOOL api_svcctl_EnumServiceGroupW(pipes_struct *p) +static bool api_svcctl_EnumServiceGroupW(pipes_struct *p) { const struct ndr_interface_call *call; struct ndr_pull *pull; @@ -2799,7 +2799,7 @@ static BOOL api_svcctl_EnumServiceGroupW(pipes_struct *p) return True; } -static BOOL api_svcctl_ChangeServiceConfig2A(pipes_struct *p) +static bool api_svcctl_ChangeServiceConfig2A(pipes_struct *p) { const struct ndr_interface_call *call; struct ndr_pull *pull; @@ -2870,7 +2870,7 @@ static BOOL api_svcctl_ChangeServiceConfig2A(pipes_struct *p) return True; } -static BOOL api_svcctl_ChangeServiceConfig2W(pipes_struct *p) +static bool api_svcctl_ChangeServiceConfig2W(pipes_struct *p) { const struct ndr_interface_call *call; struct ndr_pull *pull; @@ -2941,7 +2941,7 @@ static BOOL api_svcctl_ChangeServiceConfig2W(pipes_struct *p) return True; } -static BOOL api_svcctl_QueryServiceConfig2A(pipes_struct *p) +static bool api_svcctl_QueryServiceConfig2A(pipes_struct *p) { const struct ndr_interface_call *call; struct ndr_pull *pull; @@ -3025,7 +3025,7 @@ static BOOL api_svcctl_QueryServiceConfig2A(pipes_struct *p) return True; } -static BOOL api_svcctl_QueryServiceConfig2W(pipes_struct *p) +static bool api_svcctl_QueryServiceConfig2W(pipes_struct *p) { const struct ndr_interface_call *call; struct ndr_pull *pull; @@ -3109,7 +3109,7 @@ static BOOL api_svcctl_QueryServiceConfig2W(pipes_struct *p) return True; } -static BOOL api_svcctl_QueryServiceStatusEx(pipes_struct *p) +static bool api_svcctl_QueryServiceStatusEx(pipes_struct *p) { const struct ndr_interface_call *call; struct ndr_pull *pull; @@ -3193,7 +3193,7 @@ static BOOL api_svcctl_QueryServiceStatusEx(pipes_struct *p) return True; } -static BOOL api_EnumServicesStatusExA(pipes_struct *p) +static bool api_EnumServicesStatusExA(pipes_struct *p) { const struct ndr_interface_call *call; struct ndr_pull *pull; @@ -3290,7 +3290,7 @@ static BOOL api_EnumServicesStatusExA(pipes_struct *p) return True; } -static BOOL api_EnumServicesStatusExW(pipes_struct *p) +static bool api_EnumServicesStatusExW(pipes_struct *p) { const struct ndr_interface_call *call; struct ndr_pull *pull; @@ -3387,7 +3387,7 @@ static BOOL api_EnumServicesStatusExW(pipes_struct *p) return True; } -static BOOL api_svcctl_SCSendTSMessage(pipes_struct *p) +static bool api_svcctl_SCSendTSMessage(pipes_struct *p) { const struct ndr_interface_call *call; struct ndr_pull *pull; -- cgit From 08ace73dbbcef5543bbaee9ba7ee16a0bd42a395 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 9 Nov 2007 14:38:47 +0100 Subject: rerun make idl metze (This used to be commit 53a636828d2ba01603401086f4a5f72f9b5ea214) --- source3/librpc/gen_ndr/srv_svcctl.c | 440 ++++++++++++++++++------------------ 1 file changed, 220 insertions(+), 220 deletions(-) (limited to 'source3/librpc/gen_ndr/srv_svcctl.c') diff --git a/source3/librpc/gen_ndr/srv_svcctl.c b/source3/librpc/gen_ndr/srv_svcctl.c index 5f66b8853c..1d4719858d 100644 --- a/source3/librpc/gen_ndr/srv_svcctl.c +++ b/source3/librpc/gen_ndr/srv_svcctl.c @@ -11,7 +11,7 @@ static bool api_svcctl_CloseServiceHandle(pipes_struct *p) const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; - NTSTATUS status; + enum ndr_err_code ndr_err; DATA_BLOB blob; struct svcctl_CloseServiceHandle *r; @@ -34,8 +34,8 @@ static bool api_svcctl_CloseServiceHandle(pipes_struct *p) } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = call->ndr_pull(pull, NDR_IN, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -62,8 +62,8 @@ static bool api_svcctl_CloseServiceHandle(pipes_struct *p) return False; } - status = call->ndr_push(push, NDR_OUT, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -84,7 +84,7 @@ static bool api_svcctl_ControlService(pipes_struct *p) const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; - NTSTATUS status; + enum ndr_err_code ndr_err; DATA_BLOB blob; struct svcctl_ControlService *r; @@ -107,8 +107,8 @@ static bool api_svcctl_ControlService(pipes_struct *p) } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = call->ndr_pull(pull, NDR_IN, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -140,8 +140,8 @@ static bool api_svcctl_ControlService(pipes_struct *p) return False; } - status = call->ndr_push(push, NDR_OUT, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -162,7 +162,7 @@ static bool api_svcctl_DeleteService(pipes_struct *p) const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; - NTSTATUS status; + enum ndr_err_code ndr_err; DATA_BLOB blob; struct svcctl_DeleteService *r; @@ -185,8 +185,8 @@ static bool api_svcctl_DeleteService(pipes_struct *p) } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = call->ndr_pull(pull, NDR_IN, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -211,8 +211,8 @@ static bool api_svcctl_DeleteService(pipes_struct *p) return False; } - status = call->ndr_push(push, NDR_OUT, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -233,7 +233,7 @@ static bool api_svcctl_LockServiceDatabase(pipes_struct *p) const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; - NTSTATUS status; + enum ndr_err_code ndr_err; DATA_BLOB blob; struct svcctl_LockServiceDatabase *r; @@ -256,8 +256,8 @@ static bool api_svcctl_LockServiceDatabase(pipes_struct *p) } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = call->ndr_pull(pull, NDR_IN, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -289,8 +289,8 @@ static bool api_svcctl_LockServiceDatabase(pipes_struct *p) return False; } - status = call->ndr_push(push, NDR_OUT, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -311,7 +311,7 @@ static bool api_svcctl_QueryServiceObjectSecurity(pipes_struct *p) const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; - NTSTATUS status; + enum ndr_err_code ndr_err; DATA_BLOB blob; struct svcctl_QueryServiceObjectSecurity *r; @@ -334,8 +334,8 @@ static bool api_svcctl_QueryServiceObjectSecurity(pipes_struct *p) } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = call->ndr_pull(pull, NDR_IN, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -360,8 +360,8 @@ static bool api_svcctl_QueryServiceObjectSecurity(pipes_struct *p) return False; } - status = call->ndr_push(push, NDR_OUT, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -382,7 +382,7 @@ static bool api_svcctl_SetServiceObjectSecurity(pipes_struct *p) const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; - NTSTATUS status; + enum ndr_err_code ndr_err; DATA_BLOB blob; struct svcctl_SetServiceObjectSecurity *r; @@ -405,8 +405,8 @@ static bool api_svcctl_SetServiceObjectSecurity(pipes_struct *p) } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = call->ndr_pull(pull, NDR_IN, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -431,8 +431,8 @@ static bool api_svcctl_SetServiceObjectSecurity(pipes_struct *p) return False; } - status = call->ndr_push(push, NDR_OUT, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -453,7 +453,7 @@ static bool api_svcctl_QueryServiceStatus(pipes_struct *p) const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; - NTSTATUS status; + enum ndr_err_code ndr_err; DATA_BLOB blob; struct svcctl_QueryServiceStatus *r; @@ -476,8 +476,8 @@ static bool api_svcctl_QueryServiceStatus(pipes_struct *p) } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = call->ndr_pull(pull, NDR_IN, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -509,8 +509,8 @@ static bool api_svcctl_QueryServiceStatus(pipes_struct *p) return False; } - status = call->ndr_push(push, NDR_OUT, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -531,7 +531,7 @@ static bool api_svcctl_SetServiceStatus(pipes_struct *p) const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; - NTSTATUS status; + enum ndr_err_code ndr_err; DATA_BLOB blob; struct svcctl_SetServiceStatus *r; @@ -554,8 +554,8 @@ static bool api_svcctl_SetServiceStatus(pipes_struct *p) } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = call->ndr_pull(pull, NDR_IN, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -580,8 +580,8 @@ static bool api_svcctl_SetServiceStatus(pipes_struct *p) return False; } - status = call->ndr_push(push, NDR_OUT, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -602,7 +602,7 @@ static bool api_svcctl_UnlockServiceDatabase(pipes_struct *p) const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; - NTSTATUS status; + enum ndr_err_code ndr_err; DATA_BLOB blob; struct svcctl_UnlockServiceDatabase *r; @@ -625,8 +625,8 @@ static bool api_svcctl_UnlockServiceDatabase(pipes_struct *p) } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = call->ndr_pull(pull, NDR_IN, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -653,8 +653,8 @@ static bool api_svcctl_UnlockServiceDatabase(pipes_struct *p) return False; } - status = call->ndr_push(push, NDR_OUT, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -675,7 +675,7 @@ static bool api_svcctl_NotifyBootConfigStatus(pipes_struct *p) const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; - NTSTATUS status; + enum ndr_err_code ndr_err; DATA_BLOB blob; struct svcctl_NotifyBootConfigStatus *r; @@ -698,8 +698,8 @@ static bool api_svcctl_NotifyBootConfigStatus(pipes_struct *p) } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = call->ndr_pull(pull, NDR_IN, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -724,8 +724,8 @@ static bool api_svcctl_NotifyBootConfigStatus(pipes_struct *p) return False; } - status = call->ndr_push(push, NDR_OUT, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -746,7 +746,7 @@ static bool api_svcctl_SCSetServiceBitsW(pipes_struct *p) const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; - NTSTATUS status; + enum ndr_err_code ndr_err; DATA_BLOB blob; struct svcctl_SCSetServiceBitsW *r; @@ -769,8 +769,8 @@ static bool api_svcctl_SCSetServiceBitsW(pipes_struct *p) } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = call->ndr_pull(pull, NDR_IN, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -795,8 +795,8 @@ static bool api_svcctl_SCSetServiceBitsW(pipes_struct *p) return False; } - status = call->ndr_push(push, NDR_OUT, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -817,7 +817,7 @@ static bool api_svcctl_ChangeServiceConfigW(pipes_struct *p) const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; - NTSTATUS status; + enum ndr_err_code ndr_err; DATA_BLOB blob; struct svcctl_ChangeServiceConfigW *r; @@ -840,8 +840,8 @@ static bool api_svcctl_ChangeServiceConfigW(pipes_struct *p) } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = call->ndr_pull(pull, NDR_IN, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -873,8 +873,8 @@ static bool api_svcctl_ChangeServiceConfigW(pipes_struct *p) return False; } - status = call->ndr_push(push, NDR_OUT, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -895,7 +895,7 @@ static bool api_svcctl_CreateServiceW(pipes_struct *p) const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; - NTSTATUS status; + enum ndr_err_code ndr_err; DATA_BLOB blob; struct svcctl_CreateServiceW *r; @@ -918,8 +918,8 @@ static bool api_svcctl_CreateServiceW(pipes_struct *p) } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = call->ndr_pull(pull, NDR_IN, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -952,8 +952,8 @@ static bool api_svcctl_CreateServiceW(pipes_struct *p) return False; } - status = call->ndr_push(push, NDR_OUT, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -974,7 +974,7 @@ static bool api_svcctl_EnumDependentServicesW(pipes_struct *p) const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; - NTSTATUS status; + enum ndr_err_code ndr_err; DATA_BLOB blob; struct svcctl_EnumDependentServicesW *r; @@ -997,8 +997,8 @@ static bool api_svcctl_EnumDependentServicesW(pipes_struct *p) } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = call->ndr_pull(pull, NDR_IN, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -1042,8 +1042,8 @@ static bool api_svcctl_EnumDependentServicesW(pipes_struct *p) return False; } - status = call->ndr_push(push, NDR_OUT, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -1064,7 +1064,7 @@ static bool api_svcctl_EnumServicesStatusW(pipes_struct *p) const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; - NTSTATUS status; + enum ndr_err_code ndr_err; DATA_BLOB blob; struct svcctl_EnumServicesStatusW *r; @@ -1087,8 +1087,8 @@ static bool api_svcctl_EnumServicesStatusW(pipes_struct *p) } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = call->ndr_pull(pull, NDR_IN, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -1133,8 +1133,8 @@ static bool api_svcctl_EnumServicesStatusW(pipes_struct *p) return False; } - status = call->ndr_push(push, NDR_OUT, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -1155,7 +1155,7 @@ static bool api_svcctl_OpenSCManagerW(pipes_struct *p) const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; - NTSTATUS status; + enum ndr_err_code ndr_err; DATA_BLOB blob; struct svcctl_OpenSCManagerW *r; @@ -1178,8 +1178,8 @@ static bool api_svcctl_OpenSCManagerW(pipes_struct *p) } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = call->ndr_pull(pull, NDR_IN, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -1211,8 +1211,8 @@ static bool api_svcctl_OpenSCManagerW(pipes_struct *p) return False; } - status = call->ndr_push(push, NDR_OUT, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -1233,7 +1233,7 @@ static bool api_svcctl_OpenServiceW(pipes_struct *p) const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; - NTSTATUS status; + enum ndr_err_code ndr_err; DATA_BLOB blob; struct svcctl_OpenServiceW *r; @@ -1256,8 +1256,8 @@ static bool api_svcctl_OpenServiceW(pipes_struct *p) } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = call->ndr_pull(pull, NDR_IN, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -1289,8 +1289,8 @@ static bool api_svcctl_OpenServiceW(pipes_struct *p) return False; } - status = call->ndr_push(push, NDR_OUT, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -1311,7 +1311,7 @@ static bool api_svcctl_QueryServiceConfigW(pipes_struct *p) const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; - NTSTATUS status; + enum ndr_err_code ndr_err; DATA_BLOB blob; struct svcctl_QueryServiceConfigW *r; @@ -1334,8 +1334,8 @@ static bool api_svcctl_QueryServiceConfigW(pipes_struct *p) } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = call->ndr_pull(pull, NDR_IN, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -1373,8 +1373,8 @@ static bool api_svcctl_QueryServiceConfigW(pipes_struct *p) return False; } - status = call->ndr_push(push, NDR_OUT, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -1395,7 +1395,7 @@ static bool api_svcctl_QueryServiceLockStatusW(pipes_struct *p) const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; - NTSTATUS status; + enum ndr_err_code ndr_err; DATA_BLOB blob; struct svcctl_QueryServiceLockStatusW *r; @@ -1418,8 +1418,8 @@ static bool api_svcctl_QueryServiceLockStatusW(pipes_struct *p) } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = call->ndr_pull(pull, NDR_IN, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -1457,8 +1457,8 @@ static bool api_svcctl_QueryServiceLockStatusW(pipes_struct *p) return False; } - status = call->ndr_push(push, NDR_OUT, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -1479,7 +1479,7 @@ static bool api_svcctl_StartServiceW(pipes_struct *p) const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; - NTSTATUS status; + enum ndr_err_code ndr_err; DATA_BLOB blob; struct svcctl_StartServiceW *r; @@ -1502,8 +1502,8 @@ static bool api_svcctl_StartServiceW(pipes_struct *p) } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = call->ndr_pull(pull, NDR_IN, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -1528,8 +1528,8 @@ static bool api_svcctl_StartServiceW(pipes_struct *p) return False; } - status = call->ndr_push(push, NDR_OUT, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -1550,7 +1550,7 @@ static bool api_svcctl_GetServiceDisplayNameW(pipes_struct *p) const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; - NTSTATUS status; + enum ndr_err_code ndr_err; DATA_BLOB blob; struct svcctl_GetServiceDisplayNameW *r; @@ -1573,8 +1573,8 @@ static bool api_svcctl_GetServiceDisplayNameW(pipes_struct *p) } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = call->ndr_pull(pull, NDR_IN, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -1607,8 +1607,8 @@ static bool api_svcctl_GetServiceDisplayNameW(pipes_struct *p) return False; } - status = call->ndr_push(push, NDR_OUT, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -1629,7 +1629,7 @@ static bool api_svcctl_GetServiceKeyNameW(pipes_struct *p) const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; - NTSTATUS status; + enum ndr_err_code ndr_err; DATA_BLOB blob; struct svcctl_GetServiceKeyNameW *r; @@ -1652,8 +1652,8 @@ static bool api_svcctl_GetServiceKeyNameW(pipes_struct *p) } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = call->ndr_pull(pull, NDR_IN, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -1686,8 +1686,8 @@ static bool api_svcctl_GetServiceKeyNameW(pipes_struct *p) return False; } - status = call->ndr_push(push, NDR_OUT, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -1708,7 +1708,7 @@ static bool api_svcctl_SCSetServiceBitsA(pipes_struct *p) const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; - NTSTATUS status; + enum ndr_err_code ndr_err; DATA_BLOB blob; struct svcctl_SCSetServiceBitsA *r; @@ -1731,8 +1731,8 @@ static bool api_svcctl_SCSetServiceBitsA(pipes_struct *p) } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = call->ndr_pull(pull, NDR_IN, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -1757,8 +1757,8 @@ static bool api_svcctl_SCSetServiceBitsA(pipes_struct *p) return False; } - status = call->ndr_push(push, NDR_OUT, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -1779,7 +1779,7 @@ static bool api_svcctl_ChangeServiceConfigA(pipes_struct *p) const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; - NTSTATUS status; + enum ndr_err_code ndr_err; DATA_BLOB blob; struct svcctl_ChangeServiceConfigA *r; @@ -1802,8 +1802,8 @@ static bool api_svcctl_ChangeServiceConfigA(pipes_struct *p) } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = call->ndr_pull(pull, NDR_IN, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -1835,8 +1835,8 @@ static bool api_svcctl_ChangeServiceConfigA(pipes_struct *p) return False; } - status = call->ndr_push(push, NDR_OUT, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -1857,7 +1857,7 @@ static bool api_svcctl_CreateServiceA(pipes_struct *p) const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; - NTSTATUS status; + enum ndr_err_code ndr_err; DATA_BLOB blob; struct svcctl_CreateServiceA *r; @@ -1880,8 +1880,8 @@ static bool api_svcctl_CreateServiceA(pipes_struct *p) } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = call->ndr_pull(pull, NDR_IN, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -1913,8 +1913,8 @@ static bool api_svcctl_CreateServiceA(pipes_struct *p) return False; } - status = call->ndr_push(push, NDR_OUT, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -1935,7 +1935,7 @@ static bool api_svcctl_EnumDependentServicesA(pipes_struct *p) const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; - NTSTATUS status; + enum ndr_err_code ndr_err; DATA_BLOB blob; struct svcctl_EnumDependentServicesA *r; @@ -1958,8 +1958,8 @@ static bool api_svcctl_EnumDependentServicesA(pipes_struct *p) } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = call->ndr_pull(pull, NDR_IN, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -2003,8 +2003,8 @@ static bool api_svcctl_EnumDependentServicesA(pipes_struct *p) return False; } - status = call->ndr_push(push, NDR_OUT, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -2025,7 +2025,7 @@ static bool api_svcctl_EnumServicesStatusA(pipes_struct *p) const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; - NTSTATUS status; + enum ndr_err_code ndr_err; DATA_BLOB blob; struct svcctl_EnumServicesStatusA *r; @@ -2048,8 +2048,8 @@ static bool api_svcctl_EnumServicesStatusA(pipes_struct *p) } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = call->ndr_pull(pull, NDR_IN, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -2094,8 +2094,8 @@ static bool api_svcctl_EnumServicesStatusA(pipes_struct *p) return False; } - status = call->ndr_push(push, NDR_OUT, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -2116,7 +2116,7 @@ static bool api_svcctl_OpenSCManagerA(pipes_struct *p) const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; - NTSTATUS status; + enum ndr_err_code ndr_err; DATA_BLOB blob; struct svcctl_OpenSCManagerA *r; @@ -2139,8 +2139,8 @@ static bool api_svcctl_OpenSCManagerA(pipes_struct *p) } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = call->ndr_pull(pull, NDR_IN, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -2172,8 +2172,8 @@ static bool api_svcctl_OpenSCManagerA(pipes_struct *p) return False; } - status = call->ndr_push(push, NDR_OUT, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -2194,7 +2194,7 @@ static bool api_svcctl_OpenServiceA(pipes_struct *p) const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; - NTSTATUS status; + enum ndr_err_code ndr_err; DATA_BLOB blob; struct svcctl_OpenServiceA *r; @@ -2217,8 +2217,8 @@ static bool api_svcctl_OpenServiceA(pipes_struct *p) } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = call->ndr_pull(pull, NDR_IN, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -2243,8 +2243,8 @@ static bool api_svcctl_OpenServiceA(pipes_struct *p) return False; } - status = call->ndr_push(push, NDR_OUT, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -2265,7 +2265,7 @@ static bool api_svcctl_QueryServiceConfigA(pipes_struct *p) const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; - NTSTATUS status; + enum ndr_err_code ndr_err; DATA_BLOB blob; struct svcctl_QueryServiceConfigA *r; @@ -2288,8 +2288,8 @@ static bool api_svcctl_QueryServiceConfigA(pipes_struct *p) } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = call->ndr_pull(pull, NDR_IN, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -2327,8 +2327,8 @@ static bool api_svcctl_QueryServiceConfigA(pipes_struct *p) return False; } - status = call->ndr_push(push, NDR_OUT, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -2349,7 +2349,7 @@ static bool api_svcctl_QueryServiceLockStatusA(pipes_struct *p) const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; - NTSTATUS status; + enum ndr_err_code ndr_err; DATA_BLOB blob; struct svcctl_QueryServiceLockStatusA *r; @@ -2372,8 +2372,8 @@ static bool api_svcctl_QueryServiceLockStatusA(pipes_struct *p) } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = call->ndr_pull(pull, NDR_IN, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -2411,8 +2411,8 @@ static bool api_svcctl_QueryServiceLockStatusA(pipes_struct *p) return False; } - status = call->ndr_push(push, NDR_OUT, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -2433,7 +2433,7 @@ static bool api_svcctl_StartServiceA(pipes_struct *p) const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; - NTSTATUS status; + enum ndr_err_code ndr_err; DATA_BLOB blob; struct svcctl_StartServiceA *r; @@ -2456,8 +2456,8 @@ static bool api_svcctl_StartServiceA(pipes_struct *p) } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = call->ndr_pull(pull, NDR_IN, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -2482,8 +2482,8 @@ static bool api_svcctl_StartServiceA(pipes_struct *p) return False; } - status = call->ndr_push(push, NDR_OUT, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -2504,7 +2504,7 @@ static bool api_svcctl_GetServiceDisplayNameA(pipes_struct *p) const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; - NTSTATUS status; + enum ndr_err_code ndr_err; DATA_BLOB blob; struct svcctl_GetServiceDisplayNameA *r; @@ -2527,8 +2527,8 @@ static bool api_svcctl_GetServiceDisplayNameA(pipes_struct *p) } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = call->ndr_pull(pull, NDR_IN, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -2561,8 +2561,8 @@ static bool api_svcctl_GetServiceDisplayNameA(pipes_struct *p) return False; } - status = call->ndr_push(push, NDR_OUT, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -2583,7 +2583,7 @@ static bool api_svcctl_GetServiceKeyNameA(pipes_struct *p) const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; - NTSTATUS status; + enum ndr_err_code ndr_err; DATA_BLOB blob; struct svcctl_GetServiceKeyNameA *r; @@ -2606,8 +2606,8 @@ static bool api_svcctl_GetServiceKeyNameA(pipes_struct *p) } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = call->ndr_pull(pull, NDR_IN, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -2640,8 +2640,8 @@ static bool api_svcctl_GetServiceKeyNameA(pipes_struct *p) return False; } - status = call->ndr_push(push, NDR_OUT, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -2662,7 +2662,7 @@ static bool api_svcctl_GetCurrentGroupeStateW(pipes_struct *p) const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; - NTSTATUS status; + enum ndr_err_code ndr_err; DATA_BLOB blob; struct svcctl_GetCurrentGroupeStateW *r; @@ -2685,8 +2685,8 @@ static bool api_svcctl_GetCurrentGroupeStateW(pipes_struct *p) } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = call->ndr_pull(pull, NDR_IN, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -2711,8 +2711,8 @@ static bool api_svcctl_GetCurrentGroupeStateW(pipes_struct *p) return False; } - status = call->ndr_push(push, NDR_OUT, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -2733,7 +2733,7 @@ static bool api_svcctl_EnumServiceGroupW(pipes_struct *p) const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; - NTSTATUS status; + enum ndr_err_code ndr_err; DATA_BLOB blob; struct svcctl_EnumServiceGroupW *r; @@ -2756,8 +2756,8 @@ static bool api_svcctl_EnumServiceGroupW(pipes_struct *p) } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = call->ndr_pull(pull, NDR_IN, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -2782,8 +2782,8 @@ static bool api_svcctl_EnumServiceGroupW(pipes_struct *p) return False; } - status = call->ndr_push(push, NDR_OUT, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -2804,7 +2804,7 @@ static bool api_svcctl_ChangeServiceConfig2A(pipes_struct *p) const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; - NTSTATUS status; + enum ndr_err_code ndr_err; DATA_BLOB blob; struct svcctl_ChangeServiceConfig2A *r; @@ -2827,8 +2827,8 @@ static bool api_svcctl_ChangeServiceConfig2A(pipes_struct *p) } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = call->ndr_pull(pull, NDR_IN, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -2853,8 +2853,8 @@ static bool api_svcctl_ChangeServiceConfig2A(pipes_struct *p) return False; } - status = call->ndr_push(push, NDR_OUT, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -2875,7 +2875,7 @@ static bool api_svcctl_ChangeServiceConfig2W(pipes_struct *p) const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; - NTSTATUS status; + enum ndr_err_code ndr_err; DATA_BLOB blob; struct svcctl_ChangeServiceConfig2W *r; @@ -2898,8 +2898,8 @@ static bool api_svcctl_ChangeServiceConfig2W(pipes_struct *p) } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = call->ndr_pull(pull, NDR_IN, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -2924,8 +2924,8 @@ static bool api_svcctl_ChangeServiceConfig2W(pipes_struct *p) return False; } - status = call->ndr_push(push, NDR_OUT, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -2946,7 +2946,7 @@ static bool api_svcctl_QueryServiceConfig2A(pipes_struct *p) const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; - NTSTATUS status; + enum ndr_err_code ndr_err; DATA_BLOB blob; struct svcctl_QueryServiceConfig2A *r; @@ -2969,8 +2969,8 @@ static bool api_svcctl_QueryServiceConfig2A(pipes_struct *p) } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = call->ndr_pull(pull, NDR_IN, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -3008,8 +3008,8 @@ static bool api_svcctl_QueryServiceConfig2A(pipes_struct *p) return False; } - status = call->ndr_push(push, NDR_OUT, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -3030,7 +3030,7 @@ static bool api_svcctl_QueryServiceConfig2W(pipes_struct *p) const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; - NTSTATUS status; + enum ndr_err_code ndr_err; DATA_BLOB blob; struct svcctl_QueryServiceConfig2W *r; @@ -3053,8 +3053,8 @@ static bool api_svcctl_QueryServiceConfig2W(pipes_struct *p) } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = call->ndr_pull(pull, NDR_IN, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -3092,8 +3092,8 @@ static bool api_svcctl_QueryServiceConfig2W(pipes_struct *p) return False; } - status = call->ndr_push(push, NDR_OUT, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -3114,7 +3114,7 @@ static bool api_svcctl_QueryServiceStatusEx(pipes_struct *p) const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; - NTSTATUS status; + enum ndr_err_code ndr_err; DATA_BLOB blob; struct svcctl_QueryServiceStatusEx *r; @@ -3137,8 +3137,8 @@ static bool api_svcctl_QueryServiceStatusEx(pipes_struct *p) } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = call->ndr_pull(pull, NDR_IN, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -3176,8 +3176,8 @@ static bool api_svcctl_QueryServiceStatusEx(pipes_struct *p) return False; } - status = call->ndr_push(push, NDR_OUT, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -3198,7 +3198,7 @@ static bool api_EnumServicesStatusExA(pipes_struct *p) const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; - NTSTATUS status; + enum ndr_err_code ndr_err; DATA_BLOB blob; struct EnumServicesStatusExA *r; @@ -3221,8 +3221,8 @@ static bool api_EnumServicesStatusExA(pipes_struct *p) } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = call->ndr_pull(pull, NDR_IN, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -3273,8 +3273,8 @@ static bool api_EnumServicesStatusExA(pipes_struct *p) return False; } - status = call->ndr_push(push, NDR_OUT, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -3295,7 +3295,7 @@ static bool api_EnumServicesStatusExW(pipes_struct *p) const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; - NTSTATUS status; + enum ndr_err_code ndr_err; DATA_BLOB blob; struct EnumServicesStatusExW *r; @@ -3318,8 +3318,8 @@ static bool api_EnumServicesStatusExW(pipes_struct *p) } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = call->ndr_pull(pull, NDR_IN, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -3370,8 +3370,8 @@ static bool api_EnumServicesStatusExW(pipes_struct *p) return False; } - status = call->ndr_push(push, NDR_OUT, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -3392,7 +3392,7 @@ static bool api_svcctl_SCSendTSMessage(pipes_struct *p) const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; - NTSTATUS status; + enum ndr_err_code ndr_err; DATA_BLOB blob; struct svcctl_SCSendTSMessage *r; @@ -3415,8 +3415,8 @@ static bool api_svcctl_SCSendTSMessage(pipes_struct *p) } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = call->ndr_pull(pull, NDR_IN, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -3441,8 +3441,8 @@ static bool api_svcctl_SCSendTSMessage(pipes_struct *p) return False; } - status = call->ndr_push(push, NDR_OUT, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } -- cgit From 3d87cba590b714e95c4e02946bdba8588c3d3700 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Wed, 9 Jan 2008 12:28:44 +0100 Subject: Re-run make idl to get even nicer pidl generated server code. Guenther (This used to be commit 6169dea4dc3c4fc5eb1caefde828ed896cf048c5) --- source3/librpc/gen_ndr/srv_svcctl.c | 2656 ++++++++++++++++++----------------- 1 file changed, 1372 insertions(+), 1284 deletions(-) (limited to 'source3/librpc/gen_ndr/srv_svcctl.c') diff --git a/source3/librpc/gen_ndr/srv_svcctl.c b/source3/librpc/gen_ndr/srv_svcctl.c index 1d4719858d..4a0a2591ab 100644 --- a/source3/librpc/gen_ndr/srv_svcctl.c +++ b/source3/librpc/gen_ndr/srv_svcctl.c @@ -14,69 +14,71 @@ static bool api_svcctl_CloseServiceHandle(pipes_struct *p) enum ndr_err_code ndr_err; DATA_BLOB blob; struct svcctl_CloseServiceHandle *r; - + call = &ndr_table_svcctl.calls[NDR_SVCCTL_CLOSESERVICEHANDLE]; - + r = talloc(NULL, struct svcctl_CloseServiceHandle); if (r == NULL) { - return False; + return false; } - + if (!prs_data_blob(&p->in_data.data, &blob, r)) { talloc_free(r); - return False; + return false; } - + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { talloc_free(r); - return False; + return false; } - + pull->flags |= LIBNDR_FLAG_REF_ALLOC; ndr_err = call->ndr_pull(pull, NDR_IN, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(svcctl_CloseServiceHandle, r); - + } + ZERO_STRUCT(r->out); r->out.handle = r->in.handle; r->out.result = _svcctl_CloseServiceHandle(p, r); - + if (p->rng_fault_state) { talloc_free(r); - /* Return True here, srv_pipe_hnd.c will take care */ - return True; + /* Return true here, srv_pipe_hnd.c will take care */ + return true; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_OUT_DEBUG(svcctl_CloseServiceHandle, r); - + } + push = ndr_push_init_ctx(r); if (push == NULL) { talloc_free(r); - return False; + return false; } - + ndr_err = call->ndr_push(push, NDR_OUT, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - + blob = ndr_push_blob(push); - if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { talloc_free(r); - return False; + return false; } - + talloc_free(r); - - return True; + + return true; } static bool api_svcctl_ControlService(pipes_struct *p) @@ -87,74 +89,76 @@ static bool api_svcctl_ControlService(pipes_struct *p) enum ndr_err_code ndr_err; DATA_BLOB blob; struct svcctl_ControlService *r; - + call = &ndr_table_svcctl.calls[NDR_SVCCTL_CONTROLSERVICE]; - + r = talloc(NULL, struct svcctl_ControlService); if (r == NULL) { - return False; + return false; } - + if (!prs_data_blob(&p->in_data.data, &blob, r)) { talloc_free(r); - return False; + return false; } - + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { talloc_free(r); - return False; + return false; } - + pull->flags |= LIBNDR_FLAG_REF_ALLOC; ndr_err = call->ndr_pull(pull, NDR_IN, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(svcctl_ControlService, r); - + } + ZERO_STRUCT(r->out); r->out.service_status = talloc_zero(r, struct SERVICE_STATUS); if (r->out.service_status == NULL) { talloc_free(r); - return False; + return false; } - + r->out.result = _svcctl_ControlService(p, r); - + if (p->rng_fault_state) { talloc_free(r); - /* Return True here, srv_pipe_hnd.c will take care */ - return True; + /* Return true here, srv_pipe_hnd.c will take care */ + return true; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_OUT_DEBUG(svcctl_ControlService, r); - + } + push = ndr_push_init_ctx(r); if (push == NULL) { talloc_free(r); - return False; + return false; } - + ndr_err = call->ndr_push(push, NDR_OUT, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - + blob = ndr_push_blob(push); - if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { talloc_free(r); - return False; + return false; } - + talloc_free(r); - - return True; + + return true; } static bool api_svcctl_DeleteService(pipes_struct *p) @@ -165,67 +169,69 @@ static bool api_svcctl_DeleteService(pipes_struct *p) enum ndr_err_code ndr_err; DATA_BLOB blob; struct svcctl_DeleteService *r; - + call = &ndr_table_svcctl.calls[NDR_SVCCTL_DELETESERVICE]; - + r = talloc(NULL, struct svcctl_DeleteService); if (r == NULL) { - return False; + return false; } - + if (!prs_data_blob(&p->in_data.data, &blob, r)) { talloc_free(r); - return False; + return false; } - + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { talloc_free(r); - return False; + return false; } - + pull->flags |= LIBNDR_FLAG_REF_ALLOC; ndr_err = call->ndr_pull(pull, NDR_IN, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(svcctl_DeleteService, r); - + } + r->out.result = _svcctl_DeleteService(p, r); - + if (p->rng_fault_state) { talloc_free(r); - /* Return True here, srv_pipe_hnd.c will take care */ - return True; + /* Return true here, srv_pipe_hnd.c will take care */ + return true; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_OUT_DEBUG(svcctl_DeleteService, r); - + } + push = ndr_push_init_ctx(r); if (push == NULL) { talloc_free(r); - return False; + return false; } - + ndr_err = call->ndr_push(push, NDR_OUT, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - + blob = ndr_push_blob(push); - if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { talloc_free(r); - return False; + return false; } - + talloc_free(r); - - return True; + + return true; } static bool api_svcctl_LockServiceDatabase(pipes_struct *p) @@ -236,74 +242,76 @@ static bool api_svcctl_LockServiceDatabase(pipes_struct *p) enum ndr_err_code ndr_err; DATA_BLOB blob; struct svcctl_LockServiceDatabase *r; - + call = &ndr_table_svcctl.calls[NDR_SVCCTL_LOCKSERVICEDATABASE]; - + r = talloc(NULL, struct svcctl_LockServiceDatabase); if (r == NULL) { - return False; + return false; } - + if (!prs_data_blob(&p->in_data.data, &blob, r)) { talloc_free(r); - return False; + return false; } - + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { talloc_free(r); - return False; + return false; } - + pull->flags |= LIBNDR_FLAG_REF_ALLOC; ndr_err = call->ndr_pull(pull, NDR_IN, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(svcctl_LockServiceDatabase, r); - + } + ZERO_STRUCT(r->out); r->out.lock = talloc_zero(r, struct policy_handle); if (r->out.lock == NULL) { talloc_free(r); - return False; + return false; } - + r->out.result = _svcctl_LockServiceDatabase(p, r); - + if (p->rng_fault_state) { talloc_free(r); - /* Return True here, srv_pipe_hnd.c will take care */ - return True; + /* Return true here, srv_pipe_hnd.c will take care */ + return true; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_OUT_DEBUG(svcctl_LockServiceDatabase, r); - + } + push = ndr_push_init_ctx(r); if (push == NULL) { talloc_free(r); - return False; + return false; } - + ndr_err = call->ndr_push(push, NDR_OUT, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - + blob = ndr_push_blob(push); - if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { talloc_free(r); - return False; + return false; } - + talloc_free(r); - - return True; + + return true; } static bool api_svcctl_QueryServiceObjectSecurity(pipes_struct *p) @@ -314,67 +322,69 @@ static bool api_svcctl_QueryServiceObjectSecurity(pipes_struct *p) enum ndr_err_code ndr_err; DATA_BLOB blob; struct svcctl_QueryServiceObjectSecurity *r; - + call = &ndr_table_svcctl.calls[NDR_SVCCTL_QUERYSERVICEOBJECTSECURITY]; - + r = talloc(NULL, struct svcctl_QueryServiceObjectSecurity); if (r == NULL) { - return False; + return false; } - + if (!prs_data_blob(&p->in_data.data, &blob, r)) { talloc_free(r); - return False; + return false; } - + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { talloc_free(r); - return False; + return false; } - + pull->flags |= LIBNDR_FLAG_REF_ALLOC; ndr_err = call->ndr_pull(pull, NDR_IN, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(svcctl_QueryServiceObjectSecurity, r); - + } + r->out.result = _svcctl_QueryServiceObjectSecurity(p, r); - + if (p->rng_fault_state) { talloc_free(r); - /* Return True here, srv_pipe_hnd.c will take care */ - return True; + /* Return true here, srv_pipe_hnd.c will take care */ + return true; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceObjectSecurity, r); - + } + push = ndr_push_init_ctx(r); if (push == NULL) { talloc_free(r); - return False; + return false; } - + ndr_err = call->ndr_push(push, NDR_OUT, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - + blob = ndr_push_blob(push); - if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { talloc_free(r); - return False; + return false; } - + talloc_free(r); - - return True; + + return true; } static bool api_svcctl_SetServiceObjectSecurity(pipes_struct *p) @@ -385,67 +395,69 @@ static bool api_svcctl_SetServiceObjectSecurity(pipes_struct *p) enum ndr_err_code ndr_err; DATA_BLOB blob; struct svcctl_SetServiceObjectSecurity *r; - + call = &ndr_table_svcctl.calls[NDR_SVCCTL_SETSERVICEOBJECTSECURITY]; - + r = talloc(NULL, struct svcctl_SetServiceObjectSecurity); if (r == NULL) { - return False; + return false; } - + if (!prs_data_blob(&p->in_data.data, &blob, r)) { talloc_free(r); - return False; + return false; } - + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { talloc_free(r); - return False; + return false; } - + pull->flags |= LIBNDR_FLAG_REF_ALLOC; ndr_err = call->ndr_pull(pull, NDR_IN, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(svcctl_SetServiceObjectSecurity, r); - + } + r->out.result = _svcctl_SetServiceObjectSecurity(p, r); - + if (p->rng_fault_state) { talloc_free(r); - /* Return True here, srv_pipe_hnd.c will take care */ - return True; + /* Return true here, srv_pipe_hnd.c will take care */ + return true; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_OUT_DEBUG(svcctl_SetServiceObjectSecurity, r); - + } + push = ndr_push_init_ctx(r); if (push == NULL) { talloc_free(r); - return False; + return false; } - + ndr_err = call->ndr_push(push, NDR_OUT, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - + blob = ndr_push_blob(push); - if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { talloc_free(r); - return False; + return false; } - + talloc_free(r); - - return True; + + return true; } static bool api_svcctl_QueryServiceStatus(pipes_struct *p) @@ -456,74 +468,76 @@ static bool api_svcctl_QueryServiceStatus(pipes_struct *p) enum ndr_err_code ndr_err; DATA_BLOB blob; struct svcctl_QueryServiceStatus *r; - + call = &ndr_table_svcctl.calls[NDR_SVCCTL_QUERYSERVICESTATUS]; - + r = talloc(NULL, struct svcctl_QueryServiceStatus); if (r == NULL) { - return False; + return false; } - + if (!prs_data_blob(&p->in_data.data, &blob, r)) { talloc_free(r); - return False; + return false; } - + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { talloc_free(r); - return False; + return false; } - + pull->flags |= LIBNDR_FLAG_REF_ALLOC; ndr_err = call->ndr_pull(pull, NDR_IN, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(svcctl_QueryServiceStatus, r); - + } + ZERO_STRUCT(r->out); r->out.service_status = talloc_zero(r, struct SERVICE_STATUS); if (r->out.service_status == NULL) { talloc_free(r); - return False; + return false; } - + r->out.result = _svcctl_QueryServiceStatus(p, r); - + if (p->rng_fault_state) { talloc_free(r); - /* Return True here, srv_pipe_hnd.c will take care */ - return True; + /* Return true here, srv_pipe_hnd.c will take care */ + return true; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceStatus, r); - + } + push = ndr_push_init_ctx(r); if (push == NULL) { talloc_free(r); - return False; + return false; } - + ndr_err = call->ndr_push(push, NDR_OUT, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - + blob = ndr_push_blob(push); - if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { talloc_free(r); - return False; + return false; } - + talloc_free(r); - - return True; + + return true; } static bool api_svcctl_SetServiceStatus(pipes_struct *p) @@ -534,67 +548,69 @@ static bool api_svcctl_SetServiceStatus(pipes_struct *p) enum ndr_err_code ndr_err; DATA_BLOB blob; struct svcctl_SetServiceStatus *r; - + call = &ndr_table_svcctl.calls[NDR_SVCCTL_SETSERVICESTATUS]; - + r = talloc(NULL, struct svcctl_SetServiceStatus); if (r == NULL) { - return False; + return false; } - + if (!prs_data_blob(&p->in_data.data, &blob, r)) { talloc_free(r); - return False; + return false; } - + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { talloc_free(r); - return False; + return false; } - + pull->flags |= LIBNDR_FLAG_REF_ALLOC; ndr_err = call->ndr_pull(pull, NDR_IN, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(svcctl_SetServiceStatus, r); - + } + r->out.result = _svcctl_SetServiceStatus(p, r); - + if (p->rng_fault_state) { talloc_free(r); - /* Return True here, srv_pipe_hnd.c will take care */ - return True; + /* Return true here, srv_pipe_hnd.c will take care */ + return true; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_OUT_DEBUG(svcctl_SetServiceStatus, r); - + } + push = ndr_push_init_ctx(r); if (push == NULL) { talloc_free(r); - return False; + return false; } - + ndr_err = call->ndr_push(push, NDR_OUT, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - + blob = ndr_push_blob(push); - if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { talloc_free(r); - return False; + return false; } - + talloc_free(r); - - return True; + + return true; } static bool api_svcctl_UnlockServiceDatabase(pipes_struct *p) @@ -605,69 +621,71 @@ static bool api_svcctl_UnlockServiceDatabase(pipes_struct *p) enum ndr_err_code ndr_err; DATA_BLOB blob; struct svcctl_UnlockServiceDatabase *r; - + call = &ndr_table_svcctl.calls[NDR_SVCCTL_UNLOCKSERVICEDATABASE]; - + r = talloc(NULL, struct svcctl_UnlockServiceDatabase); if (r == NULL) { - return False; + return false; } - + if (!prs_data_blob(&p->in_data.data, &blob, r)) { talloc_free(r); - return False; + return false; } - + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { talloc_free(r); - return False; + return false; } - + pull->flags |= LIBNDR_FLAG_REF_ALLOC; ndr_err = call->ndr_pull(pull, NDR_IN, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(svcctl_UnlockServiceDatabase, r); - + } + ZERO_STRUCT(r->out); r->out.lock = r->in.lock; r->out.result = _svcctl_UnlockServiceDatabase(p, r); - + if (p->rng_fault_state) { talloc_free(r); - /* Return True here, srv_pipe_hnd.c will take care */ - return True; + /* Return true here, srv_pipe_hnd.c will take care */ + return true; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_OUT_DEBUG(svcctl_UnlockServiceDatabase, r); - + } + push = ndr_push_init_ctx(r); if (push == NULL) { talloc_free(r); - return False; + return false; } - + ndr_err = call->ndr_push(push, NDR_OUT, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - + blob = ndr_push_blob(push); - if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { talloc_free(r); - return False; + return false; } - + talloc_free(r); - - return True; + + return true; } static bool api_svcctl_NotifyBootConfigStatus(pipes_struct *p) @@ -678,67 +696,69 @@ static bool api_svcctl_NotifyBootConfigStatus(pipes_struct *p) enum ndr_err_code ndr_err; DATA_BLOB blob; struct svcctl_NotifyBootConfigStatus *r; - + call = &ndr_table_svcctl.calls[NDR_SVCCTL_NOTIFYBOOTCONFIGSTATUS]; - + r = talloc(NULL, struct svcctl_NotifyBootConfigStatus); if (r == NULL) { - return False; + return false; } - + if (!prs_data_blob(&p->in_data.data, &blob, r)) { talloc_free(r); - return False; + return false; } - + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { talloc_free(r); - return False; + return false; } - + pull->flags |= LIBNDR_FLAG_REF_ALLOC; ndr_err = call->ndr_pull(pull, NDR_IN, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(svcctl_NotifyBootConfigStatus, r); - + } + r->out.result = _svcctl_NotifyBootConfigStatus(p, r); - + if (p->rng_fault_state) { talloc_free(r); - /* Return True here, srv_pipe_hnd.c will take care */ - return True; + /* Return true here, srv_pipe_hnd.c will take care */ + return true; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_OUT_DEBUG(svcctl_NotifyBootConfigStatus, r); - + } + push = ndr_push_init_ctx(r); if (push == NULL) { talloc_free(r); - return False; + return false; } - + ndr_err = call->ndr_push(push, NDR_OUT, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - + blob = ndr_push_blob(push); - if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { talloc_free(r); - return False; + return false; } - + talloc_free(r); - - return True; + + return true; } static bool api_svcctl_SCSetServiceBitsW(pipes_struct *p) @@ -749,67 +769,69 @@ static bool api_svcctl_SCSetServiceBitsW(pipes_struct *p) enum ndr_err_code ndr_err; DATA_BLOB blob; struct svcctl_SCSetServiceBitsW *r; - + call = &ndr_table_svcctl.calls[NDR_SVCCTL_SCSETSERVICEBITSW]; - + r = talloc(NULL, struct svcctl_SCSetServiceBitsW); if (r == NULL) { - return False; + return false; } - + if (!prs_data_blob(&p->in_data.data, &blob, r)) { talloc_free(r); - return False; + return false; } - + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { talloc_free(r); - return False; + return false; } - + pull->flags |= LIBNDR_FLAG_REF_ALLOC; ndr_err = call->ndr_pull(pull, NDR_IN, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(svcctl_SCSetServiceBitsW, r); - + } + r->out.result = _svcctl_SCSetServiceBitsW(p, r); - + if (p->rng_fault_state) { talloc_free(r); - /* Return True here, srv_pipe_hnd.c will take care */ - return True; + /* Return true here, srv_pipe_hnd.c will take care */ + return true; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_OUT_DEBUG(svcctl_SCSetServiceBitsW, r); - + } + push = ndr_push_init_ctx(r); if (push == NULL) { talloc_free(r); - return False; + return false; } - + ndr_err = call->ndr_push(push, NDR_OUT, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - + blob = ndr_push_blob(push); - if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { talloc_free(r); - return False; + return false; } - + talloc_free(r); - - return True; + + return true; } static bool api_svcctl_ChangeServiceConfigW(pipes_struct *p) @@ -820,74 +842,76 @@ static bool api_svcctl_ChangeServiceConfigW(pipes_struct *p) enum ndr_err_code ndr_err; DATA_BLOB blob; struct svcctl_ChangeServiceConfigW *r; - + call = &ndr_table_svcctl.calls[NDR_SVCCTL_CHANGESERVICECONFIGW]; - + r = talloc(NULL, struct svcctl_ChangeServiceConfigW); if (r == NULL) { - return False; + return false; } - + if (!prs_data_blob(&p->in_data.data, &blob, r)) { talloc_free(r); - return False; + return false; } - + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { talloc_free(r); - return False; + return false; } - + pull->flags |= LIBNDR_FLAG_REF_ALLOC; ndr_err = call->ndr_pull(pull, NDR_IN, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(svcctl_ChangeServiceConfigW, r); - + } + ZERO_STRUCT(r->out); r->out.tag_id = talloc_zero(r, uint32_t); if (r->out.tag_id == NULL) { talloc_free(r); - return False; + return false; } - + r->out.result = _svcctl_ChangeServiceConfigW(p, r); - + if (p->rng_fault_state) { talloc_free(r); - /* Return True here, srv_pipe_hnd.c will take care */ - return True; + /* Return true here, srv_pipe_hnd.c will take care */ + return true; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_OUT_DEBUG(svcctl_ChangeServiceConfigW, r); - + } + push = ndr_push_init_ctx(r); if (push == NULL) { talloc_free(r); - return False; + return false; } - + ndr_err = call->ndr_push(push, NDR_OUT, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - + blob = ndr_push_blob(push); - if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { talloc_free(r); - return False; + return false; } - + talloc_free(r); - - return True; + + return true; } static bool api_svcctl_CreateServiceW(pipes_struct *p) @@ -898,75 +922,77 @@ static bool api_svcctl_CreateServiceW(pipes_struct *p) enum ndr_err_code ndr_err; DATA_BLOB blob; struct svcctl_CreateServiceW *r; - + call = &ndr_table_svcctl.calls[NDR_SVCCTL_CREATESERVICEW]; - + r = talloc(NULL, struct svcctl_CreateServiceW); if (r == NULL) { - return False; + return false; } - + if (!prs_data_blob(&p->in_data.data, &blob, r)) { talloc_free(r); - return False; + return false; } - + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { talloc_free(r); - return False; + return false; } - + pull->flags |= LIBNDR_FLAG_REF_ALLOC; ndr_err = call->ndr_pull(pull, NDR_IN, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(svcctl_CreateServiceW, r); - + } + ZERO_STRUCT(r->out); r->out.TagId = r->in.TagId; r->out.handle = talloc_zero(r, struct policy_handle); if (r->out.handle == NULL) { talloc_free(r); - return False; + return false; } - + r->out.result = _svcctl_CreateServiceW(p, r); - + if (p->rng_fault_state) { talloc_free(r); - /* Return True here, srv_pipe_hnd.c will take care */ - return True; + /* Return true here, srv_pipe_hnd.c will take care */ + return true; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_OUT_DEBUG(svcctl_CreateServiceW, r); - + } + push = ndr_push_init_ctx(r); if (push == NULL) { talloc_free(r); - return False; + return false; } - + ndr_err = call->ndr_push(push, NDR_OUT, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - + blob = ndr_push_blob(push); - if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { talloc_free(r); - return False; + return false; } - + talloc_free(r); - - return True; + + return true; } static bool api_svcctl_EnumDependentServicesW(pipes_struct *p) @@ -977,86 +1003,88 @@ static bool api_svcctl_EnumDependentServicesW(pipes_struct *p) enum ndr_err_code ndr_err; DATA_BLOB blob; struct svcctl_EnumDependentServicesW *r; - + call = &ndr_table_svcctl.calls[NDR_SVCCTL_ENUMDEPENDENTSERVICESW]; - + r = talloc(NULL, struct svcctl_EnumDependentServicesW); if (r == NULL) { - return False; + return false; } - + if (!prs_data_blob(&p->in_data.data, &blob, r)) { talloc_free(r); - return False; + return false; } - + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { talloc_free(r); - return False; + return false; } - + pull->flags |= LIBNDR_FLAG_REF_ALLOC; ndr_err = call->ndr_pull(pull, NDR_IN, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(svcctl_EnumDependentServicesW, r); - + } + ZERO_STRUCT(r->out); r->out.service_status = talloc_zero(r, struct ENUM_SERVICE_STATUS); if (r->out.service_status == NULL) { talloc_free(r); - return False; + return false; } - + r->out.bytes_needed = talloc_zero(r, uint32_t); if (r->out.bytes_needed == NULL) { talloc_free(r); - return False; + return false; } - + r->out.services_returned = talloc_zero(r, uint32_t); if (r->out.services_returned == NULL) { talloc_free(r); - return False; + return false; } - + r->out.result = _svcctl_EnumDependentServicesW(p, r); - + if (p->rng_fault_state) { talloc_free(r); - /* Return True here, srv_pipe_hnd.c will take care */ - return True; + /* Return true here, srv_pipe_hnd.c will take care */ + return true; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_OUT_DEBUG(svcctl_EnumDependentServicesW, r); - + } + push = ndr_push_init_ctx(r); if (push == NULL) { talloc_free(r); - return False; + return false; } - + ndr_err = call->ndr_push(push, NDR_OUT, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - + blob = ndr_push_blob(push); - if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { talloc_free(r); - return False; + return false; } - + talloc_free(r); - - return True; + + return true; } static bool api_svcctl_EnumServicesStatusW(pipes_struct *p) @@ -1067,87 +1095,89 @@ static bool api_svcctl_EnumServicesStatusW(pipes_struct *p) enum ndr_err_code ndr_err; DATA_BLOB blob; struct svcctl_EnumServicesStatusW *r; - + call = &ndr_table_svcctl.calls[NDR_SVCCTL_ENUMSERVICESSTATUSW]; - + r = talloc(NULL, struct svcctl_EnumServicesStatusW); if (r == NULL) { - return False; + return false; } - + if (!prs_data_blob(&p->in_data.data, &blob, r)) { talloc_free(r); - return False; + return false; } - + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { talloc_free(r); - return False; + return false; } - + pull->flags |= LIBNDR_FLAG_REF_ALLOC; ndr_err = call->ndr_pull(pull, NDR_IN, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(svcctl_EnumServicesStatusW, r); - + } + ZERO_STRUCT(r->out); r->out.service = talloc_zero_array(r, uint8_t, r->in.buf_size); if (r->out.service == NULL) { talloc_free(r); - return False; + return false; } - + r->out.bytes_needed = talloc_zero(r, uint32_t); if (r->out.bytes_needed == NULL) { talloc_free(r); - return False; + return false; } - + r->out.services_returned = talloc_zero(r, uint32_t); if (r->out.services_returned == NULL) { talloc_free(r); - return False; + return false; } - + r->out.resume_handle = r->in.resume_handle; r->out.result = _svcctl_EnumServicesStatusW(p, r); - + if (p->rng_fault_state) { talloc_free(r); - /* Return True here, srv_pipe_hnd.c will take care */ - return True; + /* Return true here, srv_pipe_hnd.c will take care */ + return true; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_OUT_DEBUG(svcctl_EnumServicesStatusW, r); - + } + push = ndr_push_init_ctx(r); if (push == NULL) { talloc_free(r); - return False; + return false; } - + ndr_err = call->ndr_push(push, NDR_OUT, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - + blob = ndr_push_blob(push); - if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { talloc_free(r); - return False; + return false; } - + talloc_free(r); - - return True; + + return true; } static bool api_svcctl_OpenSCManagerW(pipes_struct *p) @@ -1158,74 +1188,76 @@ static bool api_svcctl_OpenSCManagerW(pipes_struct *p) enum ndr_err_code ndr_err; DATA_BLOB blob; struct svcctl_OpenSCManagerW *r; - + call = &ndr_table_svcctl.calls[NDR_SVCCTL_OPENSCMANAGERW]; - + r = talloc(NULL, struct svcctl_OpenSCManagerW); if (r == NULL) { - return False; + return false; } - + if (!prs_data_blob(&p->in_data.data, &blob, r)) { talloc_free(r); - return False; + return false; } - + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { talloc_free(r); - return False; + return false; } - + pull->flags |= LIBNDR_FLAG_REF_ALLOC; ndr_err = call->ndr_pull(pull, NDR_IN, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(svcctl_OpenSCManagerW, r); - + } + ZERO_STRUCT(r->out); r->out.handle = talloc_zero(r, struct policy_handle); if (r->out.handle == NULL) { talloc_free(r); - return False; + return false; } - + r->out.result = _svcctl_OpenSCManagerW(p, r); - + if (p->rng_fault_state) { talloc_free(r); - /* Return True here, srv_pipe_hnd.c will take care */ - return True; + /* Return true here, srv_pipe_hnd.c will take care */ + return true; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_OUT_DEBUG(svcctl_OpenSCManagerW, r); - + } + push = ndr_push_init_ctx(r); if (push == NULL) { talloc_free(r); - return False; + return false; } - + ndr_err = call->ndr_push(push, NDR_OUT, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - + blob = ndr_push_blob(push); - if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { talloc_free(r); - return False; + return false; } - + talloc_free(r); - - return True; + + return true; } static bool api_svcctl_OpenServiceW(pipes_struct *p) @@ -1236,74 +1268,76 @@ static bool api_svcctl_OpenServiceW(pipes_struct *p) enum ndr_err_code ndr_err; DATA_BLOB blob; struct svcctl_OpenServiceW *r; - + call = &ndr_table_svcctl.calls[NDR_SVCCTL_OPENSERVICEW]; - + r = talloc(NULL, struct svcctl_OpenServiceW); if (r == NULL) { - return False; + return false; } - + if (!prs_data_blob(&p->in_data.data, &blob, r)) { talloc_free(r); - return False; + return false; } - + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { talloc_free(r); - return False; + return false; } - + pull->flags |= LIBNDR_FLAG_REF_ALLOC; ndr_err = call->ndr_pull(pull, NDR_IN, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(svcctl_OpenServiceW, r); - + } + ZERO_STRUCT(r->out); r->out.handle = talloc_zero(r, struct policy_handle); if (r->out.handle == NULL) { talloc_free(r); - return False; + return false; } - + r->out.result = _svcctl_OpenServiceW(p, r); - + if (p->rng_fault_state) { talloc_free(r); - /* Return True here, srv_pipe_hnd.c will take care */ - return True; + /* Return true here, srv_pipe_hnd.c will take care */ + return true; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_OUT_DEBUG(svcctl_OpenServiceW, r); - + } + push = ndr_push_init_ctx(r); if (push == NULL) { talloc_free(r); - return False; + return false; } - + ndr_err = call->ndr_push(push, NDR_OUT, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - + blob = ndr_push_blob(push); - if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { talloc_free(r); - return False; + return false; } - + talloc_free(r); - - return True; + + return true; } static bool api_svcctl_QueryServiceConfigW(pipes_struct *p) @@ -1314,80 +1348,82 @@ static bool api_svcctl_QueryServiceConfigW(pipes_struct *p) enum ndr_err_code ndr_err; DATA_BLOB blob; struct svcctl_QueryServiceConfigW *r; - + call = &ndr_table_svcctl.calls[NDR_SVCCTL_QUERYSERVICECONFIGW]; - + r = talloc(NULL, struct svcctl_QueryServiceConfigW); if (r == NULL) { - return False; + return false; } - + if (!prs_data_blob(&p->in_data.data, &blob, r)) { talloc_free(r); - return False; + return false; } - + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { talloc_free(r); - return False; + return false; } - + pull->flags |= LIBNDR_FLAG_REF_ALLOC; ndr_err = call->ndr_pull(pull, NDR_IN, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(svcctl_QueryServiceConfigW, r); - + } + ZERO_STRUCT(r->out); r->out.query = talloc_zero_array(r, uint8_t, r->in.buf_size); if (r->out.query == NULL) { talloc_free(r); - return False; + return false; } - + r->out.bytes_needed = talloc_zero(r, uint32_t); if (r->out.bytes_needed == NULL) { talloc_free(r); - return False; + return false; } - + r->out.result = _svcctl_QueryServiceConfigW(p, r); - + if (p->rng_fault_state) { talloc_free(r); - /* Return True here, srv_pipe_hnd.c will take care */ - return True; + /* Return true here, srv_pipe_hnd.c will take care */ + return true; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceConfigW, r); - + } + push = ndr_push_init_ctx(r); if (push == NULL) { talloc_free(r); - return False; + return false; } - + ndr_err = call->ndr_push(push, NDR_OUT, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - + blob = ndr_push_blob(push); - if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { talloc_free(r); - return False; + return false; } - + talloc_free(r); - - return True; + + return true; } static bool api_svcctl_QueryServiceLockStatusW(pipes_struct *p) @@ -1398,80 +1434,82 @@ static bool api_svcctl_QueryServiceLockStatusW(pipes_struct *p) enum ndr_err_code ndr_err; DATA_BLOB blob; struct svcctl_QueryServiceLockStatusW *r; - + call = &ndr_table_svcctl.calls[NDR_SVCCTL_QUERYSERVICELOCKSTATUSW]; - + r = talloc(NULL, struct svcctl_QueryServiceLockStatusW); if (r == NULL) { - return False; + return false; } - + if (!prs_data_blob(&p->in_data.data, &blob, r)) { talloc_free(r); - return False; + return false; } - + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { talloc_free(r); - return False; + return false; } - + pull->flags |= LIBNDR_FLAG_REF_ALLOC; ndr_err = call->ndr_pull(pull, NDR_IN, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(svcctl_QueryServiceLockStatusW, r); - + } + ZERO_STRUCT(r->out); r->out.lock_status = talloc_zero(r, struct SERVICE_LOCK_STATUS); if (r->out.lock_status == NULL) { talloc_free(r); - return False; + return false; } - + r->out.required_buf_size = talloc_zero(r, uint32_t); if (r->out.required_buf_size == NULL) { talloc_free(r); - return False; + return false; } - + r->out.result = _svcctl_QueryServiceLockStatusW(p, r); - + if (p->rng_fault_state) { talloc_free(r); - /* Return True here, srv_pipe_hnd.c will take care */ - return True; + /* Return true here, srv_pipe_hnd.c will take care */ + return true; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceLockStatusW, r); - + } + push = ndr_push_init_ctx(r); if (push == NULL) { talloc_free(r); - return False; + return false; } - + ndr_err = call->ndr_push(push, NDR_OUT, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - + blob = ndr_push_blob(push); - if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { talloc_free(r); - return False; + return false; } - + talloc_free(r); - - return True; + + return true; } static bool api_svcctl_StartServiceW(pipes_struct *p) @@ -1482,67 +1520,69 @@ static bool api_svcctl_StartServiceW(pipes_struct *p) enum ndr_err_code ndr_err; DATA_BLOB blob; struct svcctl_StartServiceW *r; - + call = &ndr_table_svcctl.calls[NDR_SVCCTL_STARTSERVICEW]; - + r = talloc(NULL, struct svcctl_StartServiceW); if (r == NULL) { - return False; + return false; } - + if (!prs_data_blob(&p->in_data.data, &blob, r)) { talloc_free(r); - return False; + return false; } - + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { talloc_free(r); - return False; + return false; } - + pull->flags |= LIBNDR_FLAG_REF_ALLOC; ndr_err = call->ndr_pull(pull, NDR_IN, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(svcctl_StartServiceW, r); - + } + r->out.result = _svcctl_StartServiceW(p, r); - + if (p->rng_fault_state) { talloc_free(r); - /* Return True here, srv_pipe_hnd.c will take care */ - return True; + /* Return true here, srv_pipe_hnd.c will take care */ + return true; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_OUT_DEBUG(svcctl_StartServiceW, r); - + } + push = ndr_push_init_ctx(r); if (push == NULL) { talloc_free(r); - return False; + return false; } - + ndr_err = call->ndr_push(push, NDR_OUT, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - + blob = ndr_push_blob(push); - if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { talloc_free(r); - return False; + return false; } - + talloc_free(r); - - return True; + + return true; } static bool api_svcctl_GetServiceDisplayNameW(pipes_struct *p) @@ -1553,75 +1593,77 @@ static bool api_svcctl_GetServiceDisplayNameW(pipes_struct *p) enum ndr_err_code ndr_err; DATA_BLOB blob; struct svcctl_GetServiceDisplayNameW *r; - + call = &ndr_table_svcctl.calls[NDR_SVCCTL_GETSERVICEDISPLAYNAMEW]; - + r = talloc(NULL, struct svcctl_GetServiceDisplayNameW); if (r == NULL) { - return False; + return false; } - + if (!prs_data_blob(&p->in_data.data, &blob, r)) { talloc_free(r); - return False; + return false; } - + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { talloc_free(r); - return False; + return false; } - + pull->flags |= LIBNDR_FLAG_REF_ALLOC; ndr_err = call->ndr_pull(pull, NDR_IN, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(svcctl_GetServiceDisplayNameW, r); - + } + ZERO_STRUCT(r->out); r->out.display_name = talloc_zero(r, const char *); if (r->out.display_name == NULL) { talloc_free(r); - return False; + return false; } - + r->out.display_name_length = r->in.display_name_length; r->out.result = _svcctl_GetServiceDisplayNameW(p, r); - + if (p->rng_fault_state) { talloc_free(r); - /* Return True here, srv_pipe_hnd.c will take care */ - return True; + /* Return true here, srv_pipe_hnd.c will take care */ + return true; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_OUT_DEBUG(svcctl_GetServiceDisplayNameW, r); - + } + push = ndr_push_init_ctx(r); if (push == NULL) { talloc_free(r); - return False; + return false; } - + ndr_err = call->ndr_push(push, NDR_OUT, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - + blob = ndr_push_blob(push); - if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { talloc_free(r); - return False; + return false; } - + talloc_free(r); - - return True; + + return true; } static bool api_svcctl_GetServiceKeyNameW(pipes_struct *p) @@ -1632,75 +1674,77 @@ static bool api_svcctl_GetServiceKeyNameW(pipes_struct *p) enum ndr_err_code ndr_err; DATA_BLOB blob; struct svcctl_GetServiceKeyNameW *r; - + call = &ndr_table_svcctl.calls[NDR_SVCCTL_GETSERVICEKEYNAMEW]; - + r = talloc(NULL, struct svcctl_GetServiceKeyNameW); if (r == NULL) { - return False; + return false; } - + if (!prs_data_blob(&p->in_data.data, &blob, r)) { talloc_free(r); - return False; + return false; } - + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { talloc_free(r); - return False; + return false; } - + pull->flags |= LIBNDR_FLAG_REF_ALLOC; ndr_err = call->ndr_pull(pull, NDR_IN, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(svcctl_GetServiceKeyNameW, r); - + } + ZERO_STRUCT(r->out); r->out.key_name = talloc_zero(r, const char *); if (r->out.key_name == NULL) { talloc_free(r); - return False; + return false; } - + r->out.display_name_length = r->in.display_name_length; r->out.result = _svcctl_GetServiceKeyNameW(p, r); - + if (p->rng_fault_state) { talloc_free(r); - /* Return True here, srv_pipe_hnd.c will take care */ - return True; + /* Return true here, srv_pipe_hnd.c will take care */ + return true; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_OUT_DEBUG(svcctl_GetServiceKeyNameW, r); - + } + push = ndr_push_init_ctx(r); if (push == NULL) { talloc_free(r); - return False; + return false; } - + ndr_err = call->ndr_push(push, NDR_OUT, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - + blob = ndr_push_blob(push); - if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { talloc_free(r); - return False; + return false; } - + talloc_free(r); - - return True; + + return true; } static bool api_svcctl_SCSetServiceBitsA(pipes_struct *p) @@ -1711,67 +1755,69 @@ static bool api_svcctl_SCSetServiceBitsA(pipes_struct *p) enum ndr_err_code ndr_err; DATA_BLOB blob; struct svcctl_SCSetServiceBitsA *r; - + call = &ndr_table_svcctl.calls[NDR_SVCCTL_SCSETSERVICEBITSA]; - + r = talloc(NULL, struct svcctl_SCSetServiceBitsA); if (r == NULL) { - return False; + return false; } - + if (!prs_data_blob(&p->in_data.data, &blob, r)) { talloc_free(r); - return False; + return false; } - + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { talloc_free(r); - return False; + return false; } - + pull->flags |= LIBNDR_FLAG_REF_ALLOC; ndr_err = call->ndr_pull(pull, NDR_IN, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(svcctl_SCSetServiceBitsA, r); - + } + r->out.result = _svcctl_SCSetServiceBitsA(p, r); - + if (p->rng_fault_state) { talloc_free(r); - /* Return True here, srv_pipe_hnd.c will take care */ - return True; + /* Return true here, srv_pipe_hnd.c will take care */ + return true; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_OUT_DEBUG(svcctl_SCSetServiceBitsA, r); - + } + push = ndr_push_init_ctx(r); if (push == NULL) { talloc_free(r); - return False; + return false; } - + ndr_err = call->ndr_push(push, NDR_OUT, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - + blob = ndr_push_blob(push); - if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { talloc_free(r); - return False; + return false; } - + talloc_free(r); - - return True; + + return true; } static bool api_svcctl_ChangeServiceConfigA(pipes_struct *p) @@ -1782,74 +1828,76 @@ static bool api_svcctl_ChangeServiceConfigA(pipes_struct *p) enum ndr_err_code ndr_err; DATA_BLOB blob; struct svcctl_ChangeServiceConfigA *r; - + call = &ndr_table_svcctl.calls[NDR_SVCCTL_CHANGESERVICECONFIGA]; - + r = talloc(NULL, struct svcctl_ChangeServiceConfigA); if (r == NULL) { - return False; + return false; } - + if (!prs_data_blob(&p->in_data.data, &blob, r)) { talloc_free(r); - return False; + return false; } - + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { talloc_free(r); - return False; + return false; } - + pull->flags |= LIBNDR_FLAG_REF_ALLOC; ndr_err = call->ndr_pull(pull, NDR_IN, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(svcctl_ChangeServiceConfigA, r); - + } + ZERO_STRUCT(r->out); r->out.tag_id = talloc_zero(r, uint32_t); if (r->out.tag_id == NULL) { talloc_free(r); - return False; + return false; } - + r->out.result = _svcctl_ChangeServiceConfigA(p, r); - + if (p->rng_fault_state) { talloc_free(r); - /* Return True here, srv_pipe_hnd.c will take care */ - return True; + /* Return true here, srv_pipe_hnd.c will take care */ + return true; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_OUT_DEBUG(svcctl_ChangeServiceConfigA, r); - + } + push = ndr_push_init_ctx(r); if (push == NULL) { talloc_free(r); - return False; + return false; } - + ndr_err = call->ndr_push(push, NDR_OUT, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - + blob = ndr_push_blob(push); - if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { talloc_free(r); - return False; + return false; } - + talloc_free(r); - - return True; + + return true; } static bool api_svcctl_CreateServiceA(pipes_struct *p) @@ -1860,74 +1908,76 @@ static bool api_svcctl_CreateServiceA(pipes_struct *p) enum ndr_err_code ndr_err; DATA_BLOB blob; struct svcctl_CreateServiceA *r; - + call = &ndr_table_svcctl.calls[NDR_SVCCTL_CREATESERVICEA]; - + r = talloc(NULL, struct svcctl_CreateServiceA); if (r == NULL) { - return False; + return false; } - + if (!prs_data_blob(&p->in_data.data, &blob, r)) { talloc_free(r); - return False; + return false; } - + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { talloc_free(r); - return False; + return false; } - + pull->flags |= LIBNDR_FLAG_REF_ALLOC; ndr_err = call->ndr_pull(pull, NDR_IN, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(svcctl_CreateServiceA, r); - + } + ZERO_STRUCT(r->out); r->out.TagId = talloc_zero(r, uint32_t); if (r->out.TagId == NULL) { talloc_free(r); - return False; + return false; } - + r->out.result = _svcctl_CreateServiceA(p, r); - + if (p->rng_fault_state) { talloc_free(r); - /* Return True here, srv_pipe_hnd.c will take care */ - return True; + /* Return true here, srv_pipe_hnd.c will take care */ + return true; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_OUT_DEBUG(svcctl_CreateServiceA, r); - + } + push = ndr_push_init_ctx(r); if (push == NULL) { talloc_free(r); - return False; + return false; } - + ndr_err = call->ndr_push(push, NDR_OUT, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - + blob = ndr_push_blob(push); - if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { talloc_free(r); - return False; + return false; } - + talloc_free(r); - - return True; + + return true; } static bool api_svcctl_EnumDependentServicesA(pipes_struct *p) @@ -1938,86 +1988,88 @@ static bool api_svcctl_EnumDependentServicesA(pipes_struct *p) enum ndr_err_code ndr_err; DATA_BLOB blob; struct svcctl_EnumDependentServicesA *r; - + call = &ndr_table_svcctl.calls[NDR_SVCCTL_ENUMDEPENDENTSERVICESA]; - + r = talloc(NULL, struct svcctl_EnumDependentServicesA); if (r == NULL) { - return False; + return false; } - + if (!prs_data_blob(&p->in_data.data, &blob, r)) { talloc_free(r); - return False; + return false; } - + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { talloc_free(r); - return False; + return false; } - + pull->flags |= LIBNDR_FLAG_REF_ALLOC; ndr_err = call->ndr_pull(pull, NDR_IN, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(svcctl_EnumDependentServicesA, r); - + } + ZERO_STRUCT(r->out); r->out.service_status = talloc_zero(r, struct ENUM_SERVICE_STATUS); if (r->out.service_status == NULL) { talloc_free(r); - return False; + return false; } - + r->out.bytes_needed = talloc_zero(r, uint32_t); if (r->out.bytes_needed == NULL) { talloc_free(r); - return False; + return false; } - + r->out.services_returned = talloc_zero(r, uint32_t); if (r->out.services_returned == NULL) { talloc_free(r); - return False; + return false; } - + r->out.result = _svcctl_EnumDependentServicesA(p, r); - + if (p->rng_fault_state) { talloc_free(r); - /* Return True here, srv_pipe_hnd.c will take care */ - return True; + /* Return true here, srv_pipe_hnd.c will take care */ + return true; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_OUT_DEBUG(svcctl_EnumDependentServicesA, r); - + } + push = ndr_push_init_ctx(r); if (push == NULL) { talloc_free(r); - return False; + return false; } - + ndr_err = call->ndr_push(push, NDR_OUT, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - + blob = ndr_push_blob(push); - if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { talloc_free(r); - return False; + return false; } - + talloc_free(r); - - return True; + + return true; } static bool api_svcctl_EnumServicesStatusA(pipes_struct *p) @@ -2028,87 +2080,89 @@ static bool api_svcctl_EnumServicesStatusA(pipes_struct *p) enum ndr_err_code ndr_err; DATA_BLOB blob; struct svcctl_EnumServicesStatusA *r; - + call = &ndr_table_svcctl.calls[NDR_SVCCTL_ENUMSERVICESSTATUSA]; - + r = talloc(NULL, struct svcctl_EnumServicesStatusA); if (r == NULL) { - return False; + return false; } - + if (!prs_data_blob(&p->in_data.data, &blob, r)) { talloc_free(r); - return False; + return false; } - + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { talloc_free(r); - return False; + return false; } - + pull->flags |= LIBNDR_FLAG_REF_ALLOC; ndr_err = call->ndr_pull(pull, NDR_IN, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(svcctl_EnumServicesStatusA, r); - + } + ZERO_STRUCT(r->out); r->out.service = talloc_zero_array(r, uint8_t, r->in.buf_size); if (r->out.service == NULL) { talloc_free(r); - return False; + return false; } - + r->out.bytes_needed = talloc_zero(r, uint32_t); if (r->out.bytes_needed == NULL) { talloc_free(r); - return False; + return false; } - + r->out.services_returned = talloc_zero(r, uint32_t); if (r->out.services_returned == NULL) { talloc_free(r); - return False; + return false; } - + r->out.resume_handle = r->in.resume_handle; r->out.result = _svcctl_EnumServicesStatusA(p, r); - + if (p->rng_fault_state) { talloc_free(r); - /* Return True here, srv_pipe_hnd.c will take care */ - return True; + /* Return true here, srv_pipe_hnd.c will take care */ + return true; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_OUT_DEBUG(svcctl_EnumServicesStatusA, r); - + } + push = ndr_push_init_ctx(r); if (push == NULL) { talloc_free(r); - return False; + return false; } - + ndr_err = call->ndr_push(push, NDR_OUT, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - + blob = ndr_push_blob(push); - if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { talloc_free(r); - return False; + return false; } - + talloc_free(r); - - return True; + + return true; } static bool api_svcctl_OpenSCManagerA(pipes_struct *p) @@ -2119,74 +2173,76 @@ static bool api_svcctl_OpenSCManagerA(pipes_struct *p) enum ndr_err_code ndr_err; DATA_BLOB blob; struct svcctl_OpenSCManagerA *r; - + call = &ndr_table_svcctl.calls[NDR_SVCCTL_OPENSCMANAGERA]; - + r = talloc(NULL, struct svcctl_OpenSCManagerA); if (r == NULL) { - return False; + return false; } - + if (!prs_data_blob(&p->in_data.data, &blob, r)) { talloc_free(r); - return False; + return false; } - + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { talloc_free(r); - return False; + return false; } - + pull->flags |= LIBNDR_FLAG_REF_ALLOC; ndr_err = call->ndr_pull(pull, NDR_IN, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(svcctl_OpenSCManagerA, r); - + } + ZERO_STRUCT(r->out); r->out.handle = talloc_zero(r, struct policy_handle); if (r->out.handle == NULL) { talloc_free(r); - return False; + return false; } - + r->out.result = _svcctl_OpenSCManagerA(p, r); - + if (p->rng_fault_state) { talloc_free(r); - /* Return True here, srv_pipe_hnd.c will take care */ - return True; + /* Return true here, srv_pipe_hnd.c will take care */ + return true; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_OUT_DEBUG(svcctl_OpenSCManagerA, r); - + } + push = ndr_push_init_ctx(r); if (push == NULL) { talloc_free(r); - return False; + return false; } - + ndr_err = call->ndr_push(push, NDR_OUT, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - + blob = ndr_push_blob(push); - if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { talloc_free(r); - return False; + return false; } - + talloc_free(r); - - return True; + + return true; } static bool api_svcctl_OpenServiceA(pipes_struct *p) @@ -2197,67 +2253,69 @@ static bool api_svcctl_OpenServiceA(pipes_struct *p) enum ndr_err_code ndr_err; DATA_BLOB blob; struct svcctl_OpenServiceA *r; - + call = &ndr_table_svcctl.calls[NDR_SVCCTL_OPENSERVICEA]; - + r = talloc(NULL, struct svcctl_OpenServiceA); if (r == NULL) { - return False; + return false; } - + if (!prs_data_blob(&p->in_data.data, &blob, r)) { talloc_free(r); - return False; + return false; } - + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { talloc_free(r); - return False; + return false; } - + pull->flags |= LIBNDR_FLAG_REF_ALLOC; ndr_err = call->ndr_pull(pull, NDR_IN, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(svcctl_OpenServiceA, r); - + } + r->out.result = _svcctl_OpenServiceA(p, r); - + if (p->rng_fault_state) { talloc_free(r); - /* Return True here, srv_pipe_hnd.c will take care */ - return True; + /* Return true here, srv_pipe_hnd.c will take care */ + return true; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_OUT_DEBUG(svcctl_OpenServiceA, r); - + } + push = ndr_push_init_ctx(r); if (push == NULL) { talloc_free(r); - return False; + return false; } - + ndr_err = call->ndr_push(push, NDR_OUT, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - + blob = ndr_push_blob(push); - if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { talloc_free(r); - return False; + return false; } - + talloc_free(r); - - return True; + + return true; } static bool api_svcctl_QueryServiceConfigA(pipes_struct *p) @@ -2268,80 +2326,82 @@ static bool api_svcctl_QueryServiceConfigA(pipes_struct *p) enum ndr_err_code ndr_err; DATA_BLOB blob; struct svcctl_QueryServiceConfigA *r; - + call = &ndr_table_svcctl.calls[NDR_SVCCTL_QUERYSERVICECONFIGA]; - + r = talloc(NULL, struct svcctl_QueryServiceConfigA); if (r == NULL) { - return False; + return false; } - + if (!prs_data_blob(&p->in_data.data, &blob, r)) { talloc_free(r); - return False; + return false; } - + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { talloc_free(r); - return False; + return false; } - + pull->flags |= LIBNDR_FLAG_REF_ALLOC; ndr_err = call->ndr_pull(pull, NDR_IN, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(svcctl_QueryServiceConfigA, r); - + } + ZERO_STRUCT(r->out); r->out.query = talloc_zero_array(r, uint8_t, r->in.buf_size); if (r->out.query == NULL) { talloc_free(r); - return False; + return false; } - + r->out.bytes_needed = talloc_zero(r, uint32_t); if (r->out.bytes_needed == NULL) { talloc_free(r); - return False; + return false; } - + r->out.result = _svcctl_QueryServiceConfigA(p, r); - + if (p->rng_fault_state) { talloc_free(r); - /* Return True here, srv_pipe_hnd.c will take care */ - return True; + /* Return true here, srv_pipe_hnd.c will take care */ + return true; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceConfigA, r); - + } + push = ndr_push_init_ctx(r); if (push == NULL) { talloc_free(r); - return False; + return false; } - + ndr_err = call->ndr_push(push, NDR_OUT, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - + blob = ndr_push_blob(push); - if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { talloc_free(r); - return False; + return false; } - + talloc_free(r); - - return True; + + return true; } static bool api_svcctl_QueryServiceLockStatusA(pipes_struct *p) @@ -2352,80 +2412,82 @@ static bool api_svcctl_QueryServiceLockStatusA(pipes_struct *p) enum ndr_err_code ndr_err; DATA_BLOB blob; struct svcctl_QueryServiceLockStatusA *r; - + call = &ndr_table_svcctl.calls[NDR_SVCCTL_QUERYSERVICELOCKSTATUSA]; - + r = talloc(NULL, struct svcctl_QueryServiceLockStatusA); if (r == NULL) { - return False; + return false; } - + if (!prs_data_blob(&p->in_data.data, &blob, r)) { talloc_free(r); - return False; + return false; } - + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { talloc_free(r); - return False; + return false; } - + pull->flags |= LIBNDR_FLAG_REF_ALLOC; ndr_err = call->ndr_pull(pull, NDR_IN, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(svcctl_QueryServiceLockStatusA, r); - + } + ZERO_STRUCT(r->out); r->out.lock_status = talloc_zero(r, struct SERVICE_LOCK_STATUS); if (r->out.lock_status == NULL) { talloc_free(r); - return False; + return false; } - + r->out.required_buf_size = talloc_zero(r, uint32_t); if (r->out.required_buf_size == NULL) { talloc_free(r); - return False; + return false; } - + r->out.result = _svcctl_QueryServiceLockStatusA(p, r); - + if (p->rng_fault_state) { talloc_free(r); - /* Return True here, srv_pipe_hnd.c will take care */ - return True; + /* Return true here, srv_pipe_hnd.c will take care */ + return true; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceLockStatusA, r); - + } + push = ndr_push_init_ctx(r); if (push == NULL) { talloc_free(r); - return False; + return false; } - + ndr_err = call->ndr_push(push, NDR_OUT, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - + blob = ndr_push_blob(push); - if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { talloc_free(r); - return False; + return false; } - + talloc_free(r); - - return True; + + return true; } static bool api_svcctl_StartServiceA(pipes_struct *p) @@ -2436,67 +2498,69 @@ static bool api_svcctl_StartServiceA(pipes_struct *p) enum ndr_err_code ndr_err; DATA_BLOB blob; struct svcctl_StartServiceA *r; - + call = &ndr_table_svcctl.calls[NDR_SVCCTL_STARTSERVICEA]; - + r = talloc(NULL, struct svcctl_StartServiceA); if (r == NULL) { - return False; + return false; } - + if (!prs_data_blob(&p->in_data.data, &blob, r)) { talloc_free(r); - return False; + return false; } - + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { talloc_free(r); - return False; + return false; } - + pull->flags |= LIBNDR_FLAG_REF_ALLOC; ndr_err = call->ndr_pull(pull, NDR_IN, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(svcctl_StartServiceA, r); - + } + r->out.result = _svcctl_StartServiceA(p, r); - + if (p->rng_fault_state) { talloc_free(r); - /* Return True here, srv_pipe_hnd.c will take care */ - return True; + /* Return true here, srv_pipe_hnd.c will take care */ + return true; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_OUT_DEBUG(svcctl_StartServiceA, r); - + } + push = ndr_push_init_ctx(r); if (push == NULL) { talloc_free(r); - return False; + return false; } - + ndr_err = call->ndr_push(push, NDR_OUT, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - + blob = ndr_push_blob(push); - if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { talloc_free(r); - return False; + return false; } - + talloc_free(r); - - return True; + + return true; } static bool api_svcctl_GetServiceDisplayNameA(pipes_struct *p) @@ -2507,75 +2571,77 @@ static bool api_svcctl_GetServiceDisplayNameA(pipes_struct *p) enum ndr_err_code ndr_err; DATA_BLOB blob; struct svcctl_GetServiceDisplayNameA *r; - + call = &ndr_table_svcctl.calls[NDR_SVCCTL_GETSERVICEDISPLAYNAMEA]; - + r = talloc(NULL, struct svcctl_GetServiceDisplayNameA); if (r == NULL) { - return False; + return false; } - + if (!prs_data_blob(&p->in_data.data, &blob, r)) { talloc_free(r); - return False; + return false; } - + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { talloc_free(r); - return False; + return false; } - + pull->flags |= LIBNDR_FLAG_REF_ALLOC; ndr_err = call->ndr_pull(pull, NDR_IN, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(svcctl_GetServiceDisplayNameA, r); - + } + ZERO_STRUCT(r->out); r->out.display_name = talloc_zero(r, const char *); if (r->out.display_name == NULL) { talloc_free(r); - return False; + return false; } - + r->out.display_name_length = r->in.display_name_length; r->out.result = _svcctl_GetServiceDisplayNameA(p, r); - + if (p->rng_fault_state) { talloc_free(r); - /* Return True here, srv_pipe_hnd.c will take care */ - return True; + /* Return true here, srv_pipe_hnd.c will take care */ + return true; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_OUT_DEBUG(svcctl_GetServiceDisplayNameA, r); - + } + push = ndr_push_init_ctx(r); if (push == NULL) { talloc_free(r); - return False; + return false; } - + ndr_err = call->ndr_push(push, NDR_OUT, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - + blob = ndr_push_blob(push); - if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { talloc_free(r); - return False; + return false; } - + talloc_free(r); - - return True; + + return true; } static bool api_svcctl_GetServiceKeyNameA(pipes_struct *p) @@ -2586,75 +2652,77 @@ static bool api_svcctl_GetServiceKeyNameA(pipes_struct *p) enum ndr_err_code ndr_err; DATA_BLOB blob; struct svcctl_GetServiceKeyNameA *r; - + call = &ndr_table_svcctl.calls[NDR_SVCCTL_GETSERVICEKEYNAMEA]; - + r = talloc(NULL, struct svcctl_GetServiceKeyNameA); if (r == NULL) { - return False; + return false; } - + if (!prs_data_blob(&p->in_data.data, &blob, r)) { talloc_free(r); - return False; + return false; } - + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { talloc_free(r); - return False; + return false; } - + pull->flags |= LIBNDR_FLAG_REF_ALLOC; ndr_err = call->ndr_pull(pull, NDR_IN, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(svcctl_GetServiceKeyNameA, r); - + } + ZERO_STRUCT(r->out); r->out.key_name = talloc_zero(r, const char *); if (r->out.key_name == NULL) { talloc_free(r); - return False; + return false; } - + r->out.display_name_length = r->in.display_name_length; r->out.result = _svcctl_GetServiceKeyNameA(p, r); - + if (p->rng_fault_state) { talloc_free(r); - /* Return True here, srv_pipe_hnd.c will take care */ - return True; + /* Return true here, srv_pipe_hnd.c will take care */ + return true; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_OUT_DEBUG(svcctl_GetServiceKeyNameA, r); - + } + push = ndr_push_init_ctx(r); if (push == NULL) { talloc_free(r); - return False; + return false; } - + ndr_err = call->ndr_push(push, NDR_OUT, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - + blob = ndr_push_blob(push); - if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { talloc_free(r); - return False; + return false; } - + talloc_free(r); - - return True; + + return true; } static bool api_svcctl_GetCurrentGroupeStateW(pipes_struct *p) @@ -2665,67 +2733,69 @@ static bool api_svcctl_GetCurrentGroupeStateW(pipes_struct *p) enum ndr_err_code ndr_err; DATA_BLOB blob; struct svcctl_GetCurrentGroupeStateW *r; - + call = &ndr_table_svcctl.calls[NDR_SVCCTL_GETCURRENTGROUPESTATEW]; - + r = talloc(NULL, struct svcctl_GetCurrentGroupeStateW); if (r == NULL) { - return False; + return false; } - + if (!prs_data_blob(&p->in_data.data, &blob, r)) { talloc_free(r); - return False; + return false; } - + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { talloc_free(r); - return False; + return false; } - + pull->flags |= LIBNDR_FLAG_REF_ALLOC; ndr_err = call->ndr_pull(pull, NDR_IN, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(svcctl_GetCurrentGroupeStateW, r); - + } + r->out.result = _svcctl_GetCurrentGroupeStateW(p, r); - + if (p->rng_fault_state) { talloc_free(r); - /* Return True here, srv_pipe_hnd.c will take care */ - return True; + /* Return true here, srv_pipe_hnd.c will take care */ + return true; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_OUT_DEBUG(svcctl_GetCurrentGroupeStateW, r); - + } + push = ndr_push_init_ctx(r); if (push == NULL) { talloc_free(r); - return False; + return false; } - + ndr_err = call->ndr_push(push, NDR_OUT, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - + blob = ndr_push_blob(push); - if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { talloc_free(r); - return False; + return false; } - + talloc_free(r); - - return True; + + return true; } static bool api_svcctl_EnumServiceGroupW(pipes_struct *p) @@ -2736,67 +2806,69 @@ static bool api_svcctl_EnumServiceGroupW(pipes_struct *p) enum ndr_err_code ndr_err; DATA_BLOB blob; struct svcctl_EnumServiceGroupW *r; - + call = &ndr_table_svcctl.calls[NDR_SVCCTL_ENUMSERVICEGROUPW]; - + r = talloc(NULL, struct svcctl_EnumServiceGroupW); if (r == NULL) { - return False; + return false; } - + if (!prs_data_blob(&p->in_data.data, &blob, r)) { talloc_free(r); - return False; + return false; } - + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { talloc_free(r); - return False; + return false; } - + pull->flags |= LIBNDR_FLAG_REF_ALLOC; ndr_err = call->ndr_pull(pull, NDR_IN, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(svcctl_EnumServiceGroupW, r); - + } + r->out.result = _svcctl_EnumServiceGroupW(p, r); - + if (p->rng_fault_state) { talloc_free(r); - /* Return True here, srv_pipe_hnd.c will take care */ - return True; + /* Return true here, srv_pipe_hnd.c will take care */ + return true; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_OUT_DEBUG(svcctl_EnumServiceGroupW, r); - + } + push = ndr_push_init_ctx(r); if (push == NULL) { talloc_free(r); - return False; + return false; } - + ndr_err = call->ndr_push(push, NDR_OUT, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - + blob = ndr_push_blob(push); - if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { talloc_free(r); - return False; + return false; } - + talloc_free(r); - - return True; + + return true; } static bool api_svcctl_ChangeServiceConfig2A(pipes_struct *p) @@ -2807,67 +2879,69 @@ static bool api_svcctl_ChangeServiceConfig2A(pipes_struct *p) enum ndr_err_code ndr_err; DATA_BLOB blob; struct svcctl_ChangeServiceConfig2A *r; - + call = &ndr_table_svcctl.calls[NDR_SVCCTL_CHANGESERVICECONFIG2A]; - + r = talloc(NULL, struct svcctl_ChangeServiceConfig2A); if (r == NULL) { - return False; + return false; } - + if (!prs_data_blob(&p->in_data.data, &blob, r)) { talloc_free(r); - return False; + return false; } - + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { talloc_free(r); - return False; + return false; } - + pull->flags |= LIBNDR_FLAG_REF_ALLOC; ndr_err = call->ndr_pull(pull, NDR_IN, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(svcctl_ChangeServiceConfig2A, r); - + } + r->out.result = _svcctl_ChangeServiceConfig2A(p, r); - + if (p->rng_fault_state) { talloc_free(r); - /* Return True here, srv_pipe_hnd.c will take care */ - return True; + /* Return true here, srv_pipe_hnd.c will take care */ + return true; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_OUT_DEBUG(svcctl_ChangeServiceConfig2A, r); - + } + push = ndr_push_init_ctx(r); if (push == NULL) { talloc_free(r); - return False; + return false; } - + ndr_err = call->ndr_push(push, NDR_OUT, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - + blob = ndr_push_blob(push); - if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { talloc_free(r); - return False; + return false; } - + talloc_free(r); - - return True; + + return true; } static bool api_svcctl_ChangeServiceConfig2W(pipes_struct *p) @@ -2878,67 +2952,69 @@ static bool api_svcctl_ChangeServiceConfig2W(pipes_struct *p) enum ndr_err_code ndr_err; DATA_BLOB blob; struct svcctl_ChangeServiceConfig2W *r; - + call = &ndr_table_svcctl.calls[NDR_SVCCTL_CHANGESERVICECONFIG2W]; - + r = talloc(NULL, struct svcctl_ChangeServiceConfig2W); if (r == NULL) { - return False; + return false; } - + if (!prs_data_blob(&p->in_data.data, &blob, r)) { talloc_free(r); - return False; + return false; } - + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { talloc_free(r); - return False; + return false; } - + pull->flags |= LIBNDR_FLAG_REF_ALLOC; ndr_err = call->ndr_pull(pull, NDR_IN, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(svcctl_ChangeServiceConfig2W, r); - + } + r->out.result = _svcctl_ChangeServiceConfig2W(p, r); - + if (p->rng_fault_state) { talloc_free(r); - /* Return True here, srv_pipe_hnd.c will take care */ - return True; + /* Return true here, srv_pipe_hnd.c will take care */ + return true; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_OUT_DEBUG(svcctl_ChangeServiceConfig2W, r); - + } + push = ndr_push_init_ctx(r); if (push == NULL) { talloc_free(r); - return False; + return false; } - + ndr_err = call->ndr_push(push, NDR_OUT, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - + blob = ndr_push_blob(push); - if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { talloc_free(r); - return False; + return false; } - + talloc_free(r); - - return True; + + return true; } static bool api_svcctl_QueryServiceConfig2A(pipes_struct *p) @@ -2949,80 +3025,82 @@ static bool api_svcctl_QueryServiceConfig2A(pipes_struct *p) enum ndr_err_code ndr_err; DATA_BLOB blob; struct svcctl_QueryServiceConfig2A *r; - + call = &ndr_table_svcctl.calls[NDR_SVCCTL_QUERYSERVICECONFIG2A]; - + r = talloc(NULL, struct svcctl_QueryServiceConfig2A); if (r == NULL) { - return False; + return false; } - + if (!prs_data_blob(&p->in_data.data, &blob, r)) { talloc_free(r); - return False; + return false; } - + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { talloc_free(r); - return False; + return false; } - + pull->flags |= LIBNDR_FLAG_REF_ALLOC; ndr_err = call->ndr_pull(pull, NDR_IN, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(svcctl_QueryServiceConfig2A, r); - + } + ZERO_STRUCT(r->out); r->out.buffer = talloc_zero_array(r, uint8_t, r->in.buf_size); if (r->out.buffer == NULL) { talloc_free(r); - return False; + return false; } - + r->out.bytes_needed = talloc_zero(r, uint32_t); if (r->out.bytes_needed == NULL) { talloc_free(r); - return False; + return false; } - + r->out.result = _svcctl_QueryServiceConfig2A(p, r); - + if (p->rng_fault_state) { talloc_free(r); - /* Return True here, srv_pipe_hnd.c will take care */ - return True; + /* Return true here, srv_pipe_hnd.c will take care */ + return true; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceConfig2A, r); - + } + push = ndr_push_init_ctx(r); if (push == NULL) { talloc_free(r); - return False; + return false; } - + ndr_err = call->ndr_push(push, NDR_OUT, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - + blob = ndr_push_blob(push); - if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { talloc_free(r); - return False; + return false; } - + talloc_free(r); - - return True; + + return true; } static bool api_svcctl_QueryServiceConfig2W(pipes_struct *p) @@ -3033,80 +3111,82 @@ static bool api_svcctl_QueryServiceConfig2W(pipes_struct *p) enum ndr_err_code ndr_err; DATA_BLOB blob; struct svcctl_QueryServiceConfig2W *r; - + call = &ndr_table_svcctl.calls[NDR_SVCCTL_QUERYSERVICECONFIG2W]; - + r = talloc(NULL, struct svcctl_QueryServiceConfig2W); if (r == NULL) { - return False; + return false; } - + if (!prs_data_blob(&p->in_data.data, &blob, r)) { talloc_free(r); - return False; + return false; } - + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { talloc_free(r); - return False; + return false; } - + pull->flags |= LIBNDR_FLAG_REF_ALLOC; ndr_err = call->ndr_pull(pull, NDR_IN, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(svcctl_QueryServiceConfig2W, r); - + } + ZERO_STRUCT(r->out); r->out.buffer = talloc_zero_array(r, uint8_t, r->in.buf_size); if (r->out.buffer == NULL) { talloc_free(r); - return False; + return false; } - + r->out.bytes_needed = talloc_zero(r, uint32_t); if (r->out.bytes_needed == NULL) { talloc_free(r); - return False; + return false; } - + r->out.result = _svcctl_QueryServiceConfig2W(p, r); - + if (p->rng_fault_state) { talloc_free(r); - /* Return True here, srv_pipe_hnd.c will take care */ - return True; + /* Return true here, srv_pipe_hnd.c will take care */ + return true; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceConfig2W, r); - + } + push = ndr_push_init_ctx(r); if (push == NULL) { talloc_free(r); - return False; + return false; } - + ndr_err = call->ndr_push(push, NDR_OUT, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - + blob = ndr_push_blob(push); - if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { talloc_free(r); - return False; + return false; } - + talloc_free(r); - - return True; + + return true; } static bool api_svcctl_QueryServiceStatusEx(pipes_struct *p) @@ -3117,80 +3197,82 @@ static bool api_svcctl_QueryServiceStatusEx(pipes_struct *p) enum ndr_err_code ndr_err; DATA_BLOB blob; struct svcctl_QueryServiceStatusEx *r; - + call = &ndr_table_svcctl.calls[NDR_SVCCTL_QUERYSERVICESTATUSEX]; - + r = talloc(NULL, struct svcctl_QueryServiceStatusEx); if (r == NULL) { - return False; + return false; } - + if (!prs_data_blob(&p->in_data.data, &blob, r)) { talloc_free(r); - return False; + return false; } - + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { talloc_free(r); - return False; + return false; } - + pull->flags |= LIBNDR_FLAG_REF_ALLOC; ndr_err = call->ndr_pull(pull, NDR_IN, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(svcctl_QueryServiceStatusEx, r); - + } + ZERO_STRUCT(r->out); r->out.buffer = talloc_zero_array(r, uint8_t, r->in.buf_size); if (r->out.buffer == NULL) { talloc_free(r); - return False; + return false; } - + r->out.bytes_needed = talloc_zero(r, uint32_t); if (r->out.bytes_needed == NULL) { talloc_free(r); - return False; + return false; } - + r->out.result = _svcctl_QueryServiceStatusEx(p, r); - + if (p->rng_fault_state) { talloc_free(r); - /* Return True here, srv_pipe_hnd.c will take care */ - return True; + /* Return true here, srv_pipe_hnd.c will take care */ + return true; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceStatusEx, r); - + } + push = ndr_push_init_ctx(r); if (push == NULL) { talloc_free(r); - return False; + return false; } - + ndr_err = call->ndr_push(push, NDR_OUT, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - + blob = ndr_push_blob(push); - if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { talloc_free(r); - return False; + return false; } - + talloc_free(r); - - return True; + + return true; } static bool api_EnumServicesStatusExA(pipes_struct *p) @@ -3201,93 +3283,95 @@ static bool api_EnumServicesStatusExA(pipes_struct *p) enum ndr_err_code ndr_err; DATA_BLOB blob; struct EnumServicesStatusExA *r; - + call = &ndr_table_svcctl.calls[NDR_ENUMSERVICESSTATUSEXA]; - + r = talloc(NULL, struct EnumServicesStatusExA); if (r == NULL) { - return False; + return false; } - + if (!prs_data_blob(&p->in_data.data, &blob, r)) { talloc_free(r); - return False; + return false; } - + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { talloc_free(r); - return False; + return false; } - + pull->flags |= LIBNDR_FLAG_REF_ALLOC; ndr_err = call->ndr_pull(pull, NDR_IN, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(EnumServicesStatusExA, r); - + } + ZERO_STRUCT(r->out); r->out.services = talloc_zero_array(r, uint8_t, r->in.buf_size); if (r->out.services == NULL) { talloc_free(r); - return False; + return false; } - + r->out.bytes_needed = talloc_zero(r, uint32_t); if (r->out.bytes_needed == NULL) { talloc_free(r); - return False; + return false; } - + r->out.service_returned = talloc_zero(r, uint32_t); if (r->out.service_returned == NULL) { talloc_free(r); - return False; + return false; } - + r->out.resume_handle = r->in.resume_handle; r->out.group_name = talloc_zero(r, const char *); if (r->out.group_name == NULL) { talloc_free(r); - return False; + return false; } - + r->out.result = _EnumServicesStatusExA(p, r); - + if (p->rng_fault_state) { talloc_free(r); - /* Return True here, srv_pipe_hnd.c will take care */ - return True; + /* Return true here, srv_pipe_hnd.c will take care */ + return true; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_OUT_DEBUG(EnumServicesStatusExA, r); - + } + push = ndr_push_init_ctx(r); if (push == NULL) { talloc_free(r); - return False; + return false; } - + ndr_err = call->ndr_push(push, NDR_OUT, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - + blob = ndr_push_blob(push); - if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { talloc_free(r); - return False; + return false; } - + talloc_free(r); - - return True; + + return true; } static bool api_EnumServicesStatusExW(pipes_struct *p) @@ -3298,93 +3382,95 @@ static bool api_EnumServicesStatusExW(pipes_struct *p) enum ndr_err_code ndr_err; DATA_BLOB blob; struct EnumServicesStatusExW *r; - + call = &ndr_table_svcctl.calls[NDR_ENUMSERVICESSTATUSEXW]; - + r = talloc(NULL, struct EnumServicesStatusExW); if (r == NULL) { - return False; + return false; } - + if (!prs_data_blob(&p->in_data.data, &blob, r)) { talloc_free(r); - return False; + return false; } - + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { talloc_free(r); - return False; + return false; } - + pull->flags |= LIBNDR_FLAG_REF_ALLOC; ndr_err = call->ndr_pull(pull, NDR_IN, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(EnumServicesStatusExW, r); - + } + ZERO_STRUCT(r->out); r->out.services = talloc_zero_array(r, uint8_t, r->in.buf_size); if (r->out.services == NULL) { talloc_free(r); - return False; + return false; } - + r->out.bytes_needed = talloc_zero(r, uint32_t); if (r->out.bytes_needed == NULL) { talloc_free(r); - return False; + return false; } - + r->out.service_returned = talloc_zero(r, uint32_t); if (r->out.service_returned == NULL) { talloc_free(r); - return False; + return false; } - + r->out.resume_handle = r->in.resume_handle; r->out.group_name = talloc_zero(r, const char *); if (r->out.group_name == NULL) { talloc_free(r); - return False; + return false; } - + r->out.result = _EnumServicesStatusExW(p, r); - + if (p->rng_fault_state) { talloc_free(r); - /* Return True here, srv_pipe_hnd.c will take care */ - return True; + /* Return true here, srv_pipe_hnd.c will take care */ + return true; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_OUT_DEBUG(EnumServicesStatusExW, r); - + } + push = ndr_push_init_ctx(r); if (push == NULL) { talloc_free(r); - return False; + return false; } - + ndr_err = call->ndr_push(push, NDR_OUT, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - + blob = ndr_push_blob(push); - if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { talloc_free(r); - return False; + return false; } - + talloc_free(r); - - return True; + + return true; } static bool api_svcctl_SCSendTSMessage(pipes_struct *p) @@ -3395,67 +3481,69 @@ static bool api_svcctl_SCSendTSMessage(pipes_struct *p) enum ndr_err_code ndr_err; DATA_BLOB blob; struct svcctl_SCSendTSMessage *r; - + call = &ndr_table_svcctl.calls[NDR_SVCCTL_SCSENDTSMESSAGE]; - + r = talloc(NULL, struct svcctl_SCSendTSMessage); if (r == NULL) { - return False; + return false; } - + if (!prs_data_blob(&p->in_data.data, &blob, r)) { talloc_free(r); - return False; + return false; } - + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { talloc_free(r); - return False; + return false; } - + pull->flags |= LIBNDR_FLAG_REF_ALLOC; ndr_err = call->ndr_pull(pull, NDR_IN, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(svcctl_SCSendTSMessage, r); - + } + r->out.result = _svcctl_SCSendTSMessage(p, r); - + if (p->rng_fault_state) { talloc_free(r); - /* Return True here, srv_pipe_hnd.c will take care */ - return True; + /* Return true here, srv_pipe_hnd.c will take care */ + return true; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_OUT_DEBUG(svcctl_SCSendTSMessage, r); - + } + push = ndr_push_init_ctx(r); if (push == NULL) { talloc_free(r); - return False; + return false; } - + ndr_err = call->ndr_push(push, NDR_OUT, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - + blob = ndr_push_blob(push); - if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { talloc_free(r); - return False; + return false; } - + talloc_free(r); - - return True; + + return true; } -- cgit From 485cb23b16e62a37180b95bd5c409de6ee162084 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 11 Feb 2008 09:15:30 +0100 Subject: rerun 'make idl' metze (This used to be commit 55c74832f3a4052d8b15f01b233aab97f7001bbe) --- source3/librpc/gen_ndr/srv_svcctl.c | 88 ++++++++++++++++++------------------- 1 file changed, 44 insertions(+), 44 deletions(-) (limited to 'source3/librpc/gen_ndr/srv_svcctl.c') diff --git a/source3/librpc/gen_ndr/srv_svcctl.c b/source3/librpc/gen_ndr/srv_svcctl.c index 4a0a2591ab..a7163917bd 100644 --- a/source3/librpc/gen_ndr/srv_svcctl.c +++ b/source3/librpc/gen_ndr/srv_svcctl.c @@ -17,7 +17,7 @@ static bool api_svcctl_CloseServiceHandle(pipes_struct *p) call = &ndr_table_svcctl.calls[NDR_SVCCTL_CLOSESERVICEHANDLE]; - r = talloc(NULL, struct svcctl_CloseServiceHandle); + r = talloc(talloc_tos(), struct svcctl_CloseServiceHandle); if (r == NULL) { return false; } @@ -92,7 +92,7 @@ static bool api_svcctl_ControlService(pipes_struct *p) call = &ndr_table_svcctl.calls[NDR_SVCCTL_CONTROLSERVICE]; - r = talloc(NULL, struct svcctl_ControlService); + r = talloc(talloc_tos(), struct svcctl_ControlService); if (r == NULL) { return false; } @@ -172,7 +172,7 @@ static bool api_svcctl_DeleteService(pipes_struct *p) call = &ndr_table_svcctl.calls[NDR_SVCCTL_DELETESERVICE]; - r = talloc(NULL, struct svcctl_DeleteService); + r = talloc(talloc_tos(), struct svcctl_DeleteService); if (r == NULL) { return false; } @@ -245,7 +245,7 @@ static bool api_svcctl_LockServiceDatabase(pipes_struct *p) call = &ndr_table_svcctl.calls[NDR_SVCCTL_LOCKSERVICEDATABASE]; - r = talloc(NULL, struct svcctl_LockServiceDatabase); + r = talloc(talloc_tos(), struct svcctl_LockServiceDatabase); if (r == NULL) { return false; } @@ -325,7 +325,7 @@ static bool api_svcctl_QueryServiceObjectSecurity(pipes_struct *p) call = &ndr_table_svcctl.calls[NDR_SVCCTL_QUERYSERVICEOBJECTSECURITY]; - r = talloc(NULL, struct svcctl_QueryServiceObjectSecurity); + r = talloc(talloc_tos(), struct svcctl_QueryServiceObjectSecurity); if (r == NULL) { return false; } @@ -398,7 +398,7 @@ static bool api_svcctl_SetServiceObjectSecurity(pipes_struct *p) call = &ndr_table_svcctl.calls[NDR_SVCCTL_SETSERVICEOBJECTSECURITY]; - r = talloc(NULL, struct svcctl_SetServiceObjectSecurity); + r = talloc(talloc_tos(), struct svcctl_SetServiceObjectSecurity); if (r == NULL) { return false; } @@ -471,7 +471,7 @@ static bool api_svcctl_QueryServiceStatus(pipes_struct *p) call = &ndr_table_svcctl.calls[NDR_SVCCTL_QUERYSERVICESTATUS]; - r = talloc(NULL, struct svcctl_QueryServiceStatus); + r = talloc(talloc_tos(), struct svcctl_QueryServiceStatus); if (r == NULL) { return false; } @@ -551,7 +551,7 @@ static bool api_svcctl_SetServiceStatus(pipes_struct *p) call = &ndr_table_svcctl.calls[NDR_SVCCTL_SETSERVICESTATUS]; - r = talloc(NULL, struct svcctl_SetServiceStatus); + r = talloc(talloc_tos(), struct svcctl_SetServiceStatus); if (r == NULL) { return false; } @@ -624,7 +624,7 @@ static bool api_svcctl_UnlockServiceDatabase(pipes_struct *p) call = &ndr_table_svcctl.calls[NDR_SVCCTL_UNLOCKSERVICEDATABASE]; - r = talloc(NULL, struct svcctl_UnlockServiceDatabase); + r = talloc(talloc_tos(), struct svcctl_UnlockServiceDatabase); if (r == NULL) { return false; } @@ -699,7 +699,7 @@ static bool api_svcctl_NotifyBootConfigStatus(pipes_struct *p) call = &ndr_table_svcctl.calls[NDR_SVCCTL_NOTIFYBOOTCONFIGSTATUS]; - r = talloc(NULL, struct svcctl_NotifyBootConfigStatus); + r = talloc(talloc_tos(), struct svcctl_NotifyBootConfigStatus); if (r == NULL) { return false; } @@ -772,7 +772,7 @@ static bool api_svcctl_SCSetServiceBitsW(pipes_struct *p) call = &ndr_table_svcctl.calls[NDR_SVCCTL_SCSETSERVICEBITSW]; - r = talloc(NULL, struct svcctl_SCSetServiceBitsW); + r = talloc(talloc_tos(), struct svcctl_SCSetServiceBitsW); if (r == NULL) { return false; } @@ -845,7 +845,7 @@ static bool api_svcctl_ChangeServiceConfigW(pipes_struct *p) call = &ndr_table_svcctl.calls[NDR_SVCCTL_CHANGESERVICECONFIGW]; - r = talloc(NULL, struct svcctl_ChangeServiceConfigW); + r = talloc(talloc_tos(), struct svcctl_ChangeServiceConfigW); if (r == NULL) { return false; } @@ -925,7 +925,7 @@ static bool api_svcctl_CreateServiceW(pipes_struct *p) call = &ndr_table_svcctl.calls[NDR_SVCCTL_CREATESERVICEW]; - r = talloc(NULL, struct svcctl_CreateServiceW); + r = talloc(talloc_tos(), struct svcctl_CreateServiceW); if (r == NULL) { return false; } @@ -1006,7 +1006,7 @@ static bool api_svcctl_EnumDependentServicesW(pipes_struct *p) call = &ndr_table_svcctl.calls[NDR_SVCCTL_ENUMDEPENDENTSERVICESW]; - r = talloc(NULL, struct svcctl_EnumDependentServicesW); + r = talloc(talloc_tos(), struct svcctl_EnumDependentServicesW); if (r == NULL) { return false; } @@ -1098,7 +1098,7 @@ static bool api_svcctl_EnumServicesStatusW(pipes_struct *p) call = &ndr_table_svcctl.calls[NDR_SVCCTL_ENUMSERVICESSTATUSW]; - r = talloc(NULL, struct svcctl_EnumServicesStatusW); + r = talloc(talloc_tos(), struct svcctl_EnumServicesStatusW); if (r == NULL) { return false; } @@ -1191,7 +1191,7 @@ static bool api_svcctl_OpenSCManagerW(pipes_struct *p) call = &ndr_table_svcctl.calls[NDR_SVCCTL_OPENSCMANAGERW]; - r = talloc(NULL, struct svcctl_OpenSCManagerW); + r = talloc(talloc_tos(), struct svcctl_OpenSCManagerW); if (r == NULL) { return false; } @@ -1271,7 +1271,7 @@ static bool api_svcctl_OpenServiceW(pipes_struct *p) call = &ndr_table_svcctl.calls[NDR_SVCCTL_OPENSERVICEW]; - r = talloc(NULL, struct svcctl_OpenServiceW); + r = talloc(talloc_tos(), struct svcctl_OpenServiceW); if (r == NULL) { return false; } @@ -1351,7 +1351,7 @@ static bool api_svcctl_QueryServiceConfigW(pipes_struct *p) call = &ndr_table_svcctl.calls[NDR_SVCCTL_QUERYSERVICECONFIGW]; - r = talloc(NULL, struct svcctl_QueryServiceConfigW); + r = talloc(talloc_tos(), struct svcctl_QueryServiceConfigW); if (r == NULL) { return false; } @@ -1437,7 +1437,7 @@ static bool api_svcctl_QueryServiceLockStatusW(pipes_struct *p) call = &ndr_table_svcctl.calls[NDR_SVCCTL_QUERYSERVICELOCKSTATUSW]; - r = talloc(NULL, struct svcctl_QueryServiceLockStatusW); + r = talloc(talloc_tos(), struct svcctl_QueryServiceLockStatusW); if (r == NULL) { return false; } @@ -1523,7 +1523,7 @@ static bool api_svcctl_StartServiceW(pipes_struct *p) call = &ndr_table_svcctl.calls[NDR_SVCCTL_STARTSERVICEW]; - r = talloc(NULL, struct svcctl_StartServiceW); + r = talloc(talloc_tos(), struct svcctl_StartServiceW); if (r == NULL) { return false; } @@ -1596,7 +1596,7 @@ static bool api_svcctl_GetServiceDisplayNameW(pipes_struct *p) call = &ndr_table_svcctl.calls[NDR_SVCCTL_GETSERVICEDISPLAYNAMEW]; - r = talloc(NULL, struct svcctl_GetServiceDisplayNameW); + r = talloc(talloc_tos(), struct svcctl_GetServiceDisplayNameW); if (r == NULL) { return false; } @@ -1677,7 +1677,7 @@ static bool api_svcctl_GetServiceKeyNameW(pipes_struct *p) call = &ndr_table_svcctl.calls[NDR_SVCCTL_GETSERVICEKEYNAMEW]; - r = talloc(NULL, struct svcctl_GetServiceKeyNameW); + r = talloc(talloc_tos(), struct svcctl_GetServiceKeyNameW); if (r == NULL) { return false; } @@ -1758,7 +1758,7 @@ static bool api_svcctl_SCSetServiceBitsA(pipes_struct *p) call = &ndr_table_svcctl.calls[NDR_SVCCTL_SCSETSERVICEBITSA]; - r = talloc(NULL, struct svcctl_SCSetServiceBitsA); + r = talloc(talloc_tos(), struct svcctl_SCSetServiceBitsA); if (r == NULL) { return false; } @@ -1831,7 +1831,7 @@ static bool api_svcctl_ChangeServiceConfigA(pipes_struct *p) call = &ndr_table_svcctl.calls[NDR_SVCCTL_CHANGESERVICECONFIGA]; - r = talloc(NULL, struct svcctl_ChangeServiceConfigA); + r = talloc(talloc_tos(), struct svcctl_ChangeServiceConfigA); if (r == NULL) { return false; } @@ -1911,7 +1911,7 @@ static bool api_svcctl_CreateServiceA(pipes_struct *p) call = &ndr_table_svcctl.calls[NDR_SVCCTL_CREATESERVICEA]; - r = talloc(NULL, struct svcctl_CreateServiceA); + r = talloc(talloc_tos(), struct svcctl_CreateServiceA); if (r == NULL) { return false; } @@ -1991,7 +1991,7 @@ static bool api_svcctl_EnumDependentServicesA(pipes_struct *p) call = &ndr_table_svcctl.calls[NDR_SVCCTL_ENUMDEPENDENTSERVICESA]; - r = talloc(NULL, struct svcctl_EnumDependentServicesA); + r = talloc(talloc_tos(), struct svcctl_EnumDependentServicesA); if (r == NULL) { return false; } @@ -2083,7 +2083,7 @@ static bool api_svcctl_EnumServicesStatusA(pipes_struct *p) call = &ndr_table_svcctl.calls[NDR_SVCCTL_ENUMSERVICESSTATUSA]; - r = talloc(NULL, struct svcctl_EnumServicesStatusA); + r = talloc(talloc_tos(), struct svcctl_EnumServicesStatusA); if (r == NULL) { return false; } @@ -2176,7 +2176,7 @@ static bool api_svcctl_OpenSCManagerA(pipes_struct *p) call = &ndr_table_svcctl.calls[NDR_SVCCTL_OPENSCMANAGERA]; - r = talloc(NULL, struct svcctl_OpenSCManagerA); + r = talloc(talloc_tos(), struct svcctl_OpenSCManagerA); if (r == NULL) { return false; } @@ -2256,7 +2256,7 @@ static bool api_svcctl_OpenServiceA(pipes_struct *p) call = &ndr_table_svcctl.calls[NDR_SVCCTL_OPENSERVICEA]; - r = talloc(NULL, struct svcctl_OpenServiceA); + r = talloc(talloc_tos(), struct svcctl_OpenServiceA); if (r == NULL) { return false; } @@ -2329,7 +2329,7 @@ static bool api_svcctl_QueryServiceConfigA(pipes_struct *p) call = &ndr_table_svcctl.calls[NDR_SVCCTL_QUERYSERVICECONFIGA]; - r = talloc(NULL, struct svcctl_QueryServiceConfigA); + r = talloc(talloc_tos(), struct svcctl_QueryServiceConfigA); if (r == NULL) { return false; } @@ -2415,7 +2415,7 @@ static bool api_svcctl_QueryServiceLockStatusA(pipes_struct *p) call = &ndr_table_svcctl.calls[NDR_SVCCTL_QUERYSERVICELOCKSTATUSA]; - r = talloc(NULL, struct svcctl_QueryServiceLockStatusA); + r = talloc(talloc_tos(), struct svcctl_QueryServiceLockStatusA); if (r == NULL) { return false; } @@ -2501,7 +2501,7 @@ static bool api_svcctl_StartServiceA(pipes_struct *p) call = &ndr_table_svcctl.calls[NDR_SVCCTL_STARTSERVICEA]; - r = talloc(NULL, struct svcctl_StartServiceA); + r = talloc(talloc_tos(), struct svcctl_StartServiceA); if (r == NULL) { return false; } @@ -2574,7 +2574,7 @@ static bool api_svcctl_GetServiceDisplayNameA(pipes_struct *p) call = &ndr_table_svcctl.calls[NDR_SVCCTL_GETSERVICEDISPLAYNAMEA]; - r = talloc(NULL, struct svcctl_GetServiceDisplayNameA); + r = talloc(talloc_tos(), struct svcctl_GetServiceDisplayNameA); if (r == NULL) { return false; } @@ -2655,7 +2655,7 @@ static bool api_svcctl_GetServiceKeyNameA(pipes_struct *p) call = &ndr_table_svcctl.calls[NDR_SVCCTL_GETSERVICEKEYNAMEA]; - r = talloc(NULL, struct svcctl_GetServiceKeyNameA); + r = talloc(talloc_tos(), struct svcctl_GetServiceKeyNameA); if (r == NULL) { return false; } @@ -2736,7 +2736,7 @@ static bool api_svcctl_GetCurrentGroupeStateW(pipes_struct *p) call = &ndr_table_svcctl.calls[NDR_SVCCTL_GETCURRENTGROUPESTATEW]; - r = talloc(NULL, struct svcctl_GetCurrentGroupeStateW); + r = talloc(talloc_tos(), struct svcctl_GetCurrentGroupeStateW); if (r == NULL) { return false; } @@ -2809,7 +2809,7 @@ static bool api_svcctl_EnumServiceGroupW(pipes_struct *p) call = &ndr_table_svcctl.calls[NDR_SVCCTL_ENUMSERVICEGROUPW]; - r = talloc(NULL, struct svcctl_EnumServiceGroupW); + r = talloc(talloc_tos(), struct svcctl_EnumServiceGroupW); if (r == NULL) { return false; } @@ -2882,7 +2882,7 @@ static bool api_svcctl_ChangeServiceConfig2A(pipes_struct *p) call = &ndr_table_svcctl.calls[NDR_SVCCTL_CHANGESERVICECONFIG2A]; - r = talloc(NULL, struct svcctl_ChangeServiceConfig2A); + r = talloc(talloc_tos(), struct svcctl_ChangeServiceConfig2A); if (r == NULL) { return false; } @@ -2955,7 +2955,7 @@ static bool api_svcctl_ChangeServiceConfig2W(pipes_struct *p) call = &ndr_table_svcctl.calls[NDR_SVCCTL_CHANGESERVICECONFIG2W]; - r = talloc(NULL, struct svcctl_ChangeServiceConfig2W); + r = talloc(talloc_tos(), struct svcctl_ChangeServiceConfig2W); if (r == NULL) { return false; } @@ -3028,7 +3028,7 @@ static bool api_svcctl_QueryServiceConfig2A(pipes_struct *p) call = &ndr_table_svcctl.calls[NDR_SVCCTL_QUERYSERVICECONFIG2A]; - r = talloc(NULL, struct svcctl_QueryServiceConfig2A); + r = talloc(talloc_tos(), struct svcctl_QueryServiceConfig2A); if (r == NULL) { return false; } @@ -3114,7 +3114,7 @@ static bool api_svcctl_QueryServiceConfig2W(pipes_struct *p) call = &ndr_table_svcctl.calls[NDR_SVCCTL_QUERYSERVICECONFIG2W]; - r = talloc(NULL, struct svcctl_QueryServiceConfig2W); + r = talloc(talloc_tos(), struct svcctl_QueryServiceConfig2W); if (r == NULL) { return false; } @@ -3200,7 +3200,7 @@ static bool api_svcctl_QueryServiceStatusEx(pipes_struct *p) call = &ndr_table_svcctl.calls[NDR_SVCCTL_QUERYSERVICESTATUSEX]; - r = talloc(NULL, struct svcctl_QueryServiceStatusEx); + r = talloc(talloc_tos(), struct svcctl_QueryServiceStatusEx); if (r == NULL) { return false; } @@ -3286,7 +3286,7 @@ static bool api_EnumServicesStatusExA(pipes_struct *p) call = &ndr_table_svcctl.calls[NDR_ENUMSERVICESSTATUSEXA]; - r = talloc(NULL, struct EnumServicesStatusExA); + r = talloc(talloc_tos(), struct EnumServicesStatusExA); if (r == NULL) { return false; } @@ -3385,7 +3385,7 @@ static bool api_EnumServicesStatusExW(pipes_struct *p) call = &ndr_table_svcctl.calls[NDR_ENUMSERVICESSTATUSEXW]; - r = talloc(NULL, struct EnumServicesStatusExW); + r = talloc(talloc_tos(), struct EnumServicesStatusExW); if (r == NULL) { return false; } @@ -3484,7 +3484,7 @@ static bool api_svcctl_SCSendTSMessage(pipes_struct *p) call = &ndr_table_svcctl.calls[NDR_SVCCTL_SCSENDTSMESSAGE]; - r = talloc(NULL, struct svcctl_SCSendTSMessage); + r = talloc(talloc_tos(), struct svcctl_SCSendTSMessage); if (r == NULL) { return false; } -- cgit From 179405e8e7cdbfb2e305b7c1c79c8cddcc842287 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Thu, 28 Feb 2008 00:03:00 +0100 Subject: Re-run make idl. Guenther (This used to be commit 6a84317aec9ae3fcd813390b0eec655387e036ec) --- source3/librpc/gen_ndr/srv_svcctl.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'source3/librpc/gen_ndr/srv_svcctl.c') diff --git a/source3/librpc/gen_ndr/srv_svcctl.c b/source3/librpc/gen_ndr/srv_svcctl.c index a7163917bd..10db320452 100644 --- a/source3/librpc/gen_ndr/srv_svcctl.c +++ b/source3/librpc/gen_ndr/srv_svcctl.c @@ -352,6 +352,19 @@ static bool api_svcctl_QueryServiceObjectSecurity(pipes_struct *p) NDR_PRINT_IN_DEBUG(svcctl_QueryServiceObjectSecurity, r); } + ZERO_STRUCT(r->out); + r->out.buffer = talloc_zero_array(r, uint8_t, r->in.buffer_size); + if (r->out.buffer == NULL) { + talloc_free(r); + return false; + } + + r->out.needed = talloc_zero(r, uint32_t); + if (r->out.needed == NULL) { + talloc_free(r); + return false; + } + r->out.result = _svcctl_QueryServiceObjectSecurity(p, r); if (p->rng_fault_state) { -- cgit From d91575bd9cd3b9d9d02c73006cb7fb9a3b879061 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Thu, 20 Mar 2008 01:35:58 +0100 Subject: Re-run make idl. Guenther (This used to be commit fe7203090c0c51e4561a3b5ce0d5d131d280ba8e) --- source3/librpc/gen_ndr/srv_svcctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/librpc/gen_ndr/srv_svcctl.c') diff --git a/source3/librpc/gen_ndr/srv_svcctl.c b/source3/librpc/gen_ndr/srv_svcctl.c index 10db320452..264dea3474 100644 --- a/source3/librpc/gen_ndr/srv_svcctl.c +++ b/source3/librpc/gen_ndr/srv_svcctl.c @@ -1047,7 +1047,7 @@ static bool api_svcctl_EnumDependentServicesW(pipes_struct *p) } ZERO_STRUCT(r->out); - r->out.service_status = talloc_zero(r, struct ENUM_SERVICE_STATUS); + r->out.service_status = talloc_zero_array(r, uint8_t, r->in.buf_size); if (r->out.service_status == NULL) { talloc_free(r); return false; -- cgit From e0f3ea2cbeb61cb02be85d2b315948985bac27a8 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sat, 12 Jul 2008 23:17:23 +0200 Subject: In api_pipe_bind_req(), check for the iface id, not the pipe name This requires to store the rpc_interface in "struct rpc_table" (This used to be commit 654f8de8497aff29f9b1f1822b6a8e734ff329e0) --- source3/librpc/gen_ndr/srv_svcctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/librpc/gen_ndr/srv_svcctl.c') diff --git a/source3/librpc/gen_ndr/srv_svcctl.c b/source3/librpc/gen_ndr/srv_svcctl.c index 264dea3474..32317ad8fe 100644 --- a/source3/librpc/gen_ndr/srv_svcctl.c +++ b/source3/librpc/gen_ndr/srv_svcctl.c @@ -3617,5 +3617,5 @@ void svcctl_get_pipe_fns(struct api_struct **fns, int *n_fns) NTSTATUS rpc_svcctl_init(void) { - return rpc_pipe_register_commands(SMB_RPC_INTERFACE_VERSION, "svcctl", "svcctl", api_svcctl_cmds, sizeof(api_svcctl_cmds) / sizeof(struct api_struct)); + return rpc_pipe_register_commands(SMB_RPC_INTERFACE_VERSION, "svcctl", "svcctl", &ndr_table_svcctl.syntax_id, api_svcctl_cmds, sizeof(api_svcctl_cmds) / sizeof(struct api_struct)); } -- cgit