diff options
author | Günther Deschner <gd@samba.org> | 2009-01-08 15:45:09 +0100 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2009-01-08 17:32:36 +0100 |
commit | 6bed89fa49f29d189de6f6fbd15de1c39c5715f9 (patch) | |
tree | ed407273e4b0184433e520d7817178abccef1f26 /librpc/gen_ndr | |
parent | 2e5b581a5e2dc6ca63f5a869ced90843b284fa0c (diff) | |
download | samba-6bed89fa49f29d189de6f6fbd15de1c39c5715f9.tar.gz samba-6bed89fa49f29d189de6f6fbd15de1c39c5715f9.tar.bz2 samba-6bed89fa49f29d189de6f6fbd15de1c39c5715f9.zip |
s3: re-run make samba3-idl.
Guenther
Diffstat (limited to 'librpc/gen_ndr')
-rw-r--r-- | librpc/gen_ndr/cli_svcctl.c | 22 | ||||
-rw-r--r-- | librpc/gen_ndr/cli_svcctl.h | 22 | ||||
-rw-r--r-- | librpc/gen_ndr/ndr_svcctl.c | 194 | ||||
-rw-r--r-- | librpc/gen_ndr/ndr_svcctl.h | 9 | ||||
-rw-r--r-- | librpc/gen_ndr/srv_svcctl.c | 2 | ||||
-rw-r--r-- | librpc/gen_ndr/svcctl.h | 49 |
6 files changed, 224 insertions, 74 deletions
diff --git a/librpc/gen_ndr/cli_svcctl.c b/librpc/gen_ndr/cli_svcctl.c index 28318b31b1..4a5f49049e 100644 --- a/librpc/gen_ndr/cli_svcctl.c +++ b/librpc/gen_ndr/cli_svcctl.c @@ -703,9 +703,9 @@ NTSTATUS rpccli_svcctl_EnumServicesStatusW(struct rpc_pipe_client *cli, uint32_t type /* [in] */, enum svcctl_ServiceState state /* [in] */, uint8_t *service /* [out] [ref,size_is(buf_size)] */, - uint32_t buf_size /* [in] [range(0,262144)] */, - uint32_t *bytes_needed /* [out] [ref,range(0,262144)] */, - uint32_t *services_returned /* [out] [ref,range(0,262144)] */, + uint32_t buf_size /* [in] [range(0,0x40000)] */, + uint32_t *bytes_needed /* [out] [ref,range(0,0x40000)] */, + uint32_t *services_returned /* [out] [ref,range(0,0x40000)] */, uint32_t *resume_handle /* [in,out] [unique] */, WERROR *werror) { @@ -1289,7 +1289,7 @@ NTSTATUS rpccli_svcctl_EnumDependentServicesA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *service /* [in] [ref] */, uint32_t state /* [in] */, - struct ENUM_SERVICE_STATUS *service_status /* [out] [unique] */, + struct ENUM_SERVICE_STATUSA *service_status /* [out] [unique] */, uint32_t buf_size /* [in] */, uint32_t *bytes_needed /* [out] [ref] */, uint32_t *services_returned /* [out] [ref] */, @@ -1344,7 +1344,7 @@ NTSTATUS rpccli_svcctl_EnumServicesStatusA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, uint32_t type /* [in] */, - uint32_t state /* [in] */, + enum svcctl_ServiceState state /* [in] */, uint32_t buf_size /* [in] */, uint8_t *service /* [out] [size_is(buf_size)] */, uint32_t *bytes_needed /* [out] [ref] */, @@ -2079,7 +2079,7 @@ NTSTATUS rpccli_EnumServicesStatusExA(struct rpc_pipe_client *cli, struct policy_handle *scmanager /* [in] [ref] */, uint32_t info_level /* [in] */, uint32_t type /* [in] */, - uint32_t state /* [in] */, + enum svcctl_ServiceState state /* [in] */, uint8_t *services /* [out] */, uint32_t buf_size /* [in] */, uint32_t *bytes_needed /* [out] [ref] */, @@ -2143,12 +2143,12 @@ NTSTATUS rpccli_EnumServicesStatusExW(struct rpc_pipe_client *cli, struct policy_handle *scmanager /* [in] [ref] */, uint32_t info_level /* [in] */, uint32_t type /* [in] */, - uint32_t state /* [in] */, + enum svcctl_ServiceState state /* [in] */, uint8_t *services /* [out] [ref,size_is(buf_size)] */, - uint32_t buf_size /* [in] [range(0,262144)] */, - uint32_t *bytes_needed /* [out] [ref,range(0,262144)] */, - uint32_t *service_returned /* [out] [ref,range(0,262144)] */, - uint32_t *resume_handle /* [in,out] [unique,range(0,262144)] */, + uint32_t buf_size /* [in] [range(0,0x40000)] */, + uint32_t *bytes_needed /* [out] [ref,range(0,0x40000)] */, + uint32_t *service_returned /* [out] [ref,range(0,0x40000)] */, + uint32_t *resume_handle /* [in,out] [unique,range(0,0x40000)] */, const char *group_name /* [in] [unique,charset(UTF16)] */, WERROR *werror) { diff --git a/librpc/gen_ndr/cli_svcctl.h b/librpc/gen_ndr/cli_svcctl.h index 575256f62a..586e3fd5b9 100644 --- a/librpc/gen_ndr/cli_svcctl.h +++ b/librpc/gen_ndr/cli_svcctl.h @@ -105,9 +105,9 @@ NTSTATUS rpccli_svcctl_EnumServicesStatusW(struct rpc_pipe_client *cli, uint32_t type /* [in] */, enum svcctl_ServiceState state /* [in] */, uint8_t *service /* [out] [ref,size_is(buf_size)] */, - uint32_t buf_size /* [in] [range(0,262144)] */, - uint32_t *bytes_needed /* [out] [ref,range(0,262144)] */, - uint32_t *services_returned /* [out] [ref,range(0,262144)] */, + uint32_t buf_size /* [in] [range(0,0x40000)] */, + uint32_t *bytes_needed /* [out] [ref,range(0,0x40000)] */, + uint32_t *services_returned /* [out] [ref,range(0,0x40000)] */, uint32_t *resume_handle /* [in,out] [unique] */, WERROR *werror); NTSTATUS rpccli_svcctl_OpenSCManagerW(struct rpc_pipe_client *cli, @@ -199,7 +199,7 @@ NTSTATUS rpccli_svcctl_EnumDependentServicesA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *service /* [in] [ref] */, uint32_t state /* [in] */, - struct ENUM_SERVICE_STATUS *service_status /* [out] [unique] */, + struct ENUM_SERVICE_STATUSA *service_status /* [out] [unique] */, uint32_t buf_size /* [in] */, uint32_t *bytes_needed /* [out] [ref] */, uint32_t *services_returned /* [out] [ref] */, @@ -208,7 +208,7 @@ NTSTATUS rpccli_svcctl_EnumServicesStatusA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, uint32_t type /* [in] */, - uint32_t state /* [in] */, + enum svcctl_ServiceState state /* [in] */, uint32_t buf_size /* [in] */, uint8_t *service /* [out] [size_is(buf_size)] */, uint32_t *bytes_needed /* [out] [ref] */, @@ -309,7 +309,7 @@ NTSTATUS rpccli_EnumServicesStatusExA(struct rpc_pipe_client *cli, struct policy_handle *scmanager /* [in] [ref] */, uint32_t info_level /* [in] */, uint32_t type /* [in] */, - uint32_t state /* [in] */, + enum svcctl_ServiceState state /* [in] */, uint8_t *services /* [out] */, uint32_t buf_size /* [in] */, uint32_t *bytes_needed /* [out] [ref] */, @@ -322,12 +322,12 @@ NTSTATUS rpccli_EnumServicesStatusExW(struct rpc_pipe_client *cli, struct policy_handle *scmanager /* [in] [ref] */, uint32_t info_level /* [in] */, uint32_t type /* [in] */, - uint32_t state /* [in] */, + enum svcctl_ServiceState state /* [in] */, uint8_t *services /* [out] [ref,size_is(buf_size)] */, - uint32_t buf_size /* [in] [range(0,262144)] */, - uint32_t *bytes_needed /* [out] [ref,range(0,262144)] */, - uint32_t *service_returned /* [out] [ref,range(0,262144)] */, - uint32_t *resume_handle /* [in,out] [unique,range(0,262144)] */, + uint32_t buf_size /* [in] [range(0,0x40000)] */, + uint32_t *bytes_needed /* [out] [ref,range(0,0x40000)] */, + uint32_t *service_returned /* [out] [ref,range(0,0x40000)] */, + uint32_t *resume_handle /* [in,out] [unique,range(0,0x40000)] */, const char *group_name /* [in] [unique,charset(UTF16)] */, WERROR *werror); NTSTATUS rpccli_svcctl_SCSendTSMessage(struct rpc_pipe_client *cli, diff --git a/librpc/gen_ndr/ndr_svcctl.c b/librpc/gen_ndr/ndr_svcctl.c index 4cc85d49b9..72fee1ae23 100644 --- a/librpc/gen_ndr/ndr_svcctl.c +++ b/librpc/gen_ndr/ndr_svcctl.c @@ -215,7 +215,142 @@ _PUBLIC_ void ndr_print_SERVICE_STATUS_PROCESS(struct ndr_print *ndr, const char ndr->depth--; } -static enum ndr_err_code ndr_push_ENUM_SERVICE_STATUS(struct ndr_push *ndr, int ndr_flags, const struct ENUM_SERVICE_STATUS *r) +_PUBLIC_ enum ndr_err_code ndr_push_ENUM_SERVICE_STATUSW(struct ndr_push *ndr, int ndr_flags, const struct ENUM_SERVICE_STATUSW *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + { + uint32_t _flags_save_string = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); + NDR_CHECK(ndr_push_relative_ptr1(ndr, r->service_name)); + ndr->flags = _flags_save_string; + } + { + uint32_t _flags_save_string = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); + NDR_CHECK(ndr_push_relative_ptr1(ndr, r->display_name)); + ndr->flags = _flags_save_string; + } + NDR_CHECK(ndr_push_SERVICE_STATUS(ndr, NDR_SCALARS, &r->status)); + } + if (ndr_flags & NDR_BUFFERS) { + { + uint32_t _flags_save_string = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); + if (r->service_name) { + NDR_CHECK(ndr_push_relative_ptr2(ndr, r->service_name)); + NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->service_name)); + } + ndr->flags = _flags_save_string; + } + { + uint32_t _flags_save_string = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); + if (r->display_name) { + NDR_CHECK(ndr_push_relative_ptr2(ndr, r->display_name)); + NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->display_name)); + } + ndr->flags = _flags_save_string; + } + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ enum ndr_err_code ndr_pull_ENUM_SERVICE_STATUSW(struct ndr_pull *ndr, int ndr_flags, struct ENUM_SERVICE_STATUSW *r) +{ + uint32_t _ptr_service_name; + TALLOC_CTX *_mem_save_service_name_0; + uint32_t _ptr_display_name; + TALLOC_CTX *_mem_save_display_name_0; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + { + uint32_t _flags_save_string = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_service_name)); + if (_ptr_service_name) { + NDR_PULL_ALLOC(ndr, r->service_name); + NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->service_name, _ptr_service_name)); + } else { + r->service_name = NULL; + } + ndr->flags = _flags_save_string; + } + { + uint32_t _flags_save_string = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name)); + if (_ptr_display_name) { + NDR_PULL_ALLOC(ndr, r->display_name); + NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->display_name, _ptr_display_name)); + } else { + r->display_name = NULL; + } + ndr->flags = _flags_save_string; + } + NDR_CHECK(ndr_pull_SERVICE_STATUS(ndr, NDR_SCALARS, &r->status)); + } + if (ndr_flags & NDR_BUFFERS) { + { + uint32_t _flags_save_string = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); + if (r->service_name) { + uint32_t _relative_save_offset; + _relative_save_offset = ndr->offset; + NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->service_name)); + _mem_save_service_name_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->service_name, 0); + NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->service_name)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_name_0, 0); + ndr->offset = _relative_save_offset; + } + ndr->flags = _flags_save_string; + } + { + uint32_t _flags_save_string = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); + if (r->display_name) { + uint32_t _relative_save_offset; + _relative_save_offset = ndr->offset; + NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->display_name)); + _mem_save_display_name_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->display_name, 0); + NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->display_name)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_0, 0); + ndr->offset = _relative_save_offset; + } + ndr->flags = _flags_save_string; + } + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_ENUM_SERVICE_STATUSW(struct ndr_print *ndr, const char *name, const struct ENUM_SERVICE_STATUSW *r) +{ + ndr_print_struct(ndr, name, "ENUM_SERVICE_STATUSW"); + ndr->depth++; + ndr_print_ptr(ndr, "service_name", r->service_name); + ndr->depth++; + if (r->service_name) { + ndr_print_string(ndr, "service_name", r->service_name); + } + ndr->depth--; + ndr_print_ptr(ndr, "display_name", r->display_name); + ndr->depth++; + if (r->display_name) { + ndr_print_string(ndr, "display_name", r->display_name); + } + ndr->depth--; + ndr_print_SERVICE_STATUS(ndr, "status", &r->status); + ndr->depth--; +} + +_PUBLIC_ size_t ndr_size_ENUM_SERVICE_STATUSW(const struct ENUM_SERVICE_STATUSW *r, struct smb_iconv_convenience *ic, int flags) +{ + return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_ENUM_SERVICE_STATUSW, ic); +} + +_PUBLIC_ enum ndr_err_code ndr_push_ENUM_SERVICE_STATUSA(struct ndr_push *ndr, int ndr_flags, const struct ENUM_SERVICE_STATUSA *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); @@ -256,7 +391,7 @@ static enum ndr_err_code ndr_push_ENUM_SERVICE_STATUS(struct ndr_push *ndr, int return NDR_ERR_SUCCESS; } -static enum ndr_err_code ndr_pull_ENUM_SERVICE_STATUS(struct ndr_pull *ndr, int ndr_flags, struct ENUM_SERVICE_STATUS *r) +_PUBLIC_ enum ndr_err_code ndr_pull_ENUM_SERVICE_STATUSA(struct ndr_pull *ndr, int ndr_flags, struct ENUM_SERVICE_STATUSA *r) { uint32_t _ptr_service_name; TALLOC_CTX *_mem_save_service_name_0; @@ -325,9 +460,9 @@ static enum ndr_err_code ndr_pull_ENUM_SERVICE_STATUS(struct ndr_pull *ndr, int return NDR_ERR_SUCCESS; } -_PUBLIC_ void ndr_print_ENUM_SERVICE_STATUS(struct ndr_print *ndr, const char *name, const struct ENUM_SERVICE_STATUS *r) +_PUBLIC_ void ndr_print_ENUM_SERVICE_STATUSA(struct ndr_print *ndr, const char *name, const struct ENUM_SERVICE_STATUSA *r) { - ndr_print_struct(ndr, name, "ENUM_SERVICE_STATUS"); + ndr_print_struct(ndr, name, "ENUM_SERVICE_STATUSA"); ndr->depth++; ndr_print_ptr(ndr, "service_name", r->service_name); ndr->depth++; @@ -345,6 +480,11 @@ _PUBLIC_ void ndr_print_ENUM_SERVICE_STATUS(struct ndr_print *ndr, const char *n ndr->depth--; } +_PUBLIC_ size_t ndr_size_ENUM_SERVICE_STATUSA(const struct ENUM_SERVICE_STATUSA *r, struct smb_iconv_convenience *ic, int flags) +{ + return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_ENUM_SERVICE_STATUSA, ic); +} + _PUBLIC_ enum ndr_err_code ndr_push_svcctl_ServerType(struct ndr_push *ndr, int ndr_flags, uint32_t r) { NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r)); @@ -495,9 +635,9 @@ _PUBLIC_ void ndr_print_svcctl_ServiceState(struct ndr_print *ndr, const char *n const char *val = NULL; switch (r) { - case SVCCTL_STATE_ACTIVE: val = "SVCCTL_STATE_ACTIVE"; break; - case SVCCTL_STATE_INACTIVE: val = "SVCCTL_STATE_INACTIVE"; break; - case SVCCTL_STATE_ALL: val = "SVCCTL_STATE_ALL"; break; + case SERVICE_STATE_ACTIVE: val = "SERVICE_STATE_ACTIVE"; break; + case SERVICE_STATE_INACTIVE: val = "SERVICE_STATE_INACTIVE"; break; + case SERVICE_STATE_ALL: val = "SERVICE_STATE_ALL"; break; } ndr_print_enum(ndr, name, "ENUM", val, r); } @@ -2730,7 +2870,7 @@ static enum ndr_err_code ndr_pull_svcctl_EnumServicesStatusW(struct ndr_pull *nd NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.type)); NDR_CHECK(ndr_pull_svcctl_ServiceState(ndr, NDR_SCALARS, &r->in.state)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.buf_size)); - if (r->in.buf_size < 0 || r->in.buf_size > 262144) { + if (r->in.buf_size < 0 || r->in.buf_size > 0x40000) { return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range"); } NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle)); @@ -2764,7 +2904,7 @@ static enum ndr_err_code ndr_pull_svcctl_EnumServicesStatusW(struct ndr_pull *nd _mem_save_bytes_needed_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->out.bytes_needed, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.bytes_needed)); - if (*r->out.bytes_needed < 0 || *r->out.bytes_needed > 262144) { + if (*r->out.bytes_needed < 0 || *r->out.bytes_needed > 0x40000) { return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range"); } NDR_PULL_SET_MEM_CTX(ndr, _mem_save_bytes_needed_0, LIBNDR_FLAG_REF_ALLOC); @@ -2774,7 +2914,7 @@ static enum ndr_err_code ndr_pull_svcctl_EnumServicesStatusW(struct ndr_pull *nd _mem_save_services_returned_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->out.services_returned, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.services_returned)); - if (*r->out.services_returned < 0 || *r->out.services_returned > 262144) { + if (*r->out.services_returned < 0 || *r->out.services_returned > 0x40000) { return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range"); } NDR_PULL_SET_MEM_CTX(ndr, _mem_save_services_returned_0, LIBNDR_FLAG_REF_ALLOC); @@ -4428,7 +4568,7 @@ static enum ndr_err_code ndr_push_svcctl_EnumDependentServicesA(struct ndr_push if (flags & NDR_OUT) { NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.service_status)); if (r->out.service_status) { - NDR_CHECK(ndr_push_ENUM_SERVICE_STATUS(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.service_status)); + NDR_CHECK(ndr_push_ENUM_SERVICE_STATUSA(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.service_status)); } if (r->out.bytes_needed == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); @@ -4477,7 +4617,7 @@ static enum ndr_err_code ndr_pull_svcctl_EnumDependentServicesA(struct ndr_pull if (r->out.service_status) { _mem_save_service_status_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->out.service_status, 0); - NDR_CHECK(ndr_pull_ENUM_SERVICE_STATUS(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.service_status)); + NDR_CHECK(ndr_pull_ENUM_SERVICE_STATUSA(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.service_status)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_status_0, 0); } if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { @@ -4523,7 +4663,7 @@ _PUBLIC_ void ndr_print_svcctl_EnumDependentServicesA(struct ndr_print *ndr, con ndr_print_ptr(ndr, "service_status", r->out.service_status); ndr->depth++; if (r->out.service_status) { - ndr_print_ENUM_SERVICE_STATUS(ndr, "service_status", r->out.service_status); + ndr_print_ENUM_SERVICE_STATUSA(ndr, "service_status", r->out.service_status); } ndr->depth--; ndr_print_ptr(ndr, "bytes_needed", r->out.bytes_needed); @@ -4548,7 +4688,7 @@ static enum ndr_err_code ndr_push_svcctl_EnumServicesStatusA(struct ndr_push *nd } NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.type)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.state)); + NDR_CHECK(ndr_push_svcctl_ServiceState(ndr, NDR_SCALARS, r->in.state)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.buf_size)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.resume_handle)); if (r->in.resume_handle) { @@ -4593,7 +4733,7 @@ static enum ndr_err_code ndr_pull_svcctl_EnumServicesStatusA(struct ndr_pull *nd NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.type)); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.state)); + NDR_CHECK(ndr_pull_svcctl_ServiceState(ndr, NDR_SCALARS, &r->in.state)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.buf_size)); NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle)); if (_ptr_resume_handle) { @@ -4665,7 +4805,7 @@ _PUBLIC_ void ndr_print_svcctl_EnumServicesStatusA(struct ndr_print *ndr, const ndr_print_policy_handle(ndr, "handle", r->in.handle); ndr->depth--; ndr_print_uint32(ndr, "type", r->in.type); - ndr_print_uint32(ndr, "state", r->in.state); + ndr_print_svcctl_ServiceState(ndr, "state", r->in.state); ndr_print_uint32(ndr, "buf_size", r->in.buf_size); ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle); ndr->depth++; @@ -6131,7 +6271,7 @@ static enum ndr_err_code ndr_push_EnumServicesStatusExA(struct ndr_push *ndr, in NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.scmanager)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.info_level)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.type)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.state)); + NDR_CHECK(ndr_push_svcctl_ServiceState(ndr, NDR_SCALARS, r->in.state)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.buf_size)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.resume_handle)); if (r->in.resume_handle) { @@ -6189,7 +6329,7 @@ static enum ndr_err_code ndr_pull_EnumServicesStatusExA(struct ndr_pull *ndr, in NDR_PULL_SET_MEM_CTX(ndr, _mem_save_scmanager_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.info_level)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.type)); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.state)); + NDR_CHECK(ndr_pull_svcctl_ServiceState(ndr, NDR_SCALARS, &r->in.state)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.buf_size)); NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle)); if (_ptr_resume_handle) { @@ -6284,7 +6424,7 @@ _PUBLIC_ void ndr_print_EnumServicesStatusExA(struct ndr_print *ndr, const char ndr->depth--; ndr_print_uint32(ndr, "info_level", r->in.info_level); ndr_print_uint32(ndr, "type", r->in.type); - ndr_print_uint32(ndr, "state", r->in.state); + ndr_print_svcctl_ServiceState(ndr, "state", r->in.state); ndr_print_uint32(ndr, "buf_size", r->in.buf_size); ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle); ndr->depth++; @@ -6336,7 +6476,7 @@ static enum ndr_err_code ndr_push_EnumServicesStatusExW(struct ndr_push *ndr, in NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.scmanager)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.info_level)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.type)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.state)); + NDR_CHECK(ndr_push_svcctl_ServiceState(ndr, NDR_SCALARS, r->in.state)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.buf_size)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.resume_handle)); if (r->in.resume_handle) { @@ -6394,9 +6534,9 @@ static enum ndr_err_code ndr_pull_EnumServicesStatusExW(struct ndr_pull *ndr, in NDR_PULL_SET_MEM_CTX(ndr, _mem_save_scmanager_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.info_level)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.type)); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.state)); + NDR_CHECK(ndr_pull_svcctl_ServiceState(ndr, NDR_SCALARS, &r->in.state)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.buf_size)); - if (r->in.buf_size < 0 || r->in.buf_size > 262144) { + if (r->in.buf_size < 0 || r->in.buf_size > 0x40000) { return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range"); } NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle)); @@ -6409,7 +6549,7 @@ static enum ndr_err_code ndr_pull_EnumServicesStatusExW(struct ndr_pull *ndr, in _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, 0); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle)); - if (*r->in.resume_handle < 0 || *r->in.resume_handle > 262144) { + if (*r->in.resume_handle < 0 || *r->in.resume_handle > 0x40000) { return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range"); } NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0); @@ -6451,7 +6591,7 @@ static enum ndr_err_code ndr_pull_EnumServicesStatusExW(struct ndr_pull *ndr, in _mem_save_bytes_needed_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->out.bytes_needed, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.bytes_needed)); - if (*r->out.bytes_needed < 0 || *r->out.bytes_needed > 262144) { + if (*r->out.bytes_needed < 0 || *r->out.bytes_needed > 0x40000) { return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range"); } NDR_PULL_SET_MEM_CTX(ndr, _mem_save_bytes_needed_0, LIBNDR_FLAG_REF_ALLOC); @@ -6461,7 +6601,7 @@ static enum ndr_err_code ndr_pull_EnumServicesStatusExW(struct ndr_pull *ndr, in _mem_save_service_returned_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->out.service_returned, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.service_returned)); - if (*r->out.service_returned < 0 || *r->out.service_returned > 262144) { + if (*r->out.service_returned < 0 || *r->out.service_returned > 0x40000) { return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range"); } NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_returned_0, LIBNDR_FLAG_REF_ALLOC); @@ -6475,7 +6615,7 @@ static enum ndr_err_code ndr_pull_EnumServicesStatusExW(struct ndr_pull *ndr, in _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, 0); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle)); - if (*r->out.resume_handle < 0 || *r->out.resume_handle > 262144) { + if (*r->out.resume_handle < 0 || *r->out.resume_handle > 0x40000) { return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range"); } NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0); @@ -6504,7 +6644,7 @@ _PUBLIC_ void ndr_print_EnumServicesStatusExW(struct ndr_print *ndr, const char ndr->depth--; ndr_print_uint32(ndr, "info_level", r->in.info_level); ndr_print_uint32(ndr, "type", r->in.type); - ndr_print_uint32(ndr, "state", r->in.state); + ndr_print_svcctl_ServiceState(ndr, "state", r->in.state); ndr_print_uint32(ndr, "buf_size", r->in.buf_size); ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle); ndr->depth++; diff --git a/librpc/gen_ndr/ndr_svcctl.h b/librpc/gen_ndr/ndr_svcctl.h index 2d6f3ed7e8..be7ada3476 100644 --- a/librpc/gen_ndr/ndr_svcctl.h +++ b/librpc/gen_ndr/ndr_svcctl.h @@ -107,7 +107,14 @@ void ndr_print_SERVICE_STATUS(struct ndr_print *ndr, const char *name, const str enum ndr_err_code ndr_push_SERVICE_STATUS_PROCESS(struct ndr_push *ndr, int ndr_flags, const struct SERVICE_STATUS_PROCESS *r); enum ndr_err_code ndr_pull_SERVICE_STATUS_PROCESS(struct ndr_pull *ndr, int ndr_flags, struct SERVICE_STATUS_PROCESS *r); void ndr_print_SERVICE_STATUS_PROCESS(struct ndr_print *ndr, const char *name, const struct SERVICE_STATUS_PROCESS *r); -void ndr_print_ENUM_SERVICE_STATUS(struct ndr_print *ndr, const char *name, const struct ENUM_SERVICE_STATUS *r); +enum ndr_err_code ndr_push_ENUM_SERVICE_STATUSW(struct ndr_push *ndr, int ndr_flags, const struct ENUM_SERVICE_STATUSW *r); +enum ndr_err_code ndr_pull_ENUM_SERVICE_STATUSW(struct ndr_pull *ndr, int ndr_flags, struct ENUM_SERVICE_STATUSW *r); +void ndr_print_ENUM_SERVICE_STATUSW(struct ndr_print *ndr, const char *name, const struct ENUM_SERVICE_STATUSW *r); +size_t ndr_size_ENUM_SERVICE_STATUSW(const struct ENUM_SERVICE_STATUSW *r, struct smb_iconv_convenience *ic, int flags); +enum ndr_err_code ndr_push_ENUM_SERVICE_STATUSA(struct ndr_push *ndr, int ndr_flags, const struct ENUM_SERVICE_STATUSA *r); +enum ndr_err_code ndr_pull_ENUM_SERVICE_STATUSA(struct ndr_pull *ndr, int ndr_flags, struct ENUM_SERVICE_STATUSA *r); +void ndr_print_ENUM_SERVICE_STATUSA(struct ndr_print *ndr, const char *name, const struct ENUM_SERVICE_STATUSA *r); +size_t ndr_size_ENUM_SERVICE_STATUSA(const struct ENUM_SERVICE_STATUSA *r, struct smb_iconv_convenience *ic, int flags); enum ndr_err_code ndr_push_svcctl_ServerType(struct ndr_push *ndr, int ndr_flags, uint32_t r); enum ndr_err_code ndr_pull_svcctl_ServerType(struct ndr_pull *ndr, int ndr_flags, uint32_t *r); void ndr_print_svcctl_ServerType(struct ndr_print *ndr, const char *name, uint32_t r); diff --git a/librpc/gen_ndr/srv_svcctl.c b/librpc/gen_ndr/srv_svcctl.c index 46e2b03d3c..cffbb6a268 100644 --- a/librpc/gen_ndr/srv_svcctl.c +++ b/librpc/gen_ndr/srv_svcctl.c @@ -2032,7 +2032,7 @@ static bool api_svcctl_EnumDependentServicesA(pipes_struct *p) } ZERO_STRUCT(r->out); - r->out.service_status = talloc_zero(r, struct ENUM_SERVICE_STATUS); + r->out.service_status = talloc_zero(r, struct ENUM_SERVICE_STATUSA); if (r->out.service_status == NULL) { talloc_free(r); return false; diff --git a/librpc/gen_ndr/svcctl.h b/librpc/gen_ndr/svcctl.h index c3914e5671..80f906a364 100644 --- a/librpc/gen_ndr/svcctl.h +++ b/librpc/gen_ndr/svcctl.h @@ -15,9 +15,6 @@ #define SERVICE_TYPE_WIN32_OWN_PROCESS ( 0x10 ) #define SERVICE_TYPE_WIN32_SHARE_PROCESS ( 0x20 ) #define SERVICE_TYPE_WIN32 ( SERVICE_TYPE_WIN32_OWN_PROCESS|SERVICE_TYPE_WIN32_SHARE_PROCESS ) -#define SERVICE_STATE_ACTIVE ( 0x01 ) -#define SERVICE_STATE_INACTIVE ( 0x02 ) -#define SERVICE_STATE_ALL ( 0x03 ) #define SV_TYPE_ALL ( 0xFFFFFFFF ) #define SC_MANAGER_READ_ACCESS ( (SEC_STD_READ_CONTROL|SC_RIGHT_MGR_CONNECT|SC_RIGHT_MGR_ENUMERATE_SERVICE|SC_RIGHT_MGR_QUERY_LOCK_STATUS) ) #define SC_MANAGER_EXECUTE_ACCESS ( SC_MANAGER_READ_ACCESS ) @@ -84,11 +81,17 @@ struct SERVICE_STATUS_PROCESS { uint32_t service_flags; }/* [public] */; -struct ENUM_SERVICE_STATUS { +struct ENUM_SERVICE_STATUSW { + const char * service_name;/* [relative,flag(LIBNDR_FLAG_STR_NULLTERM)] */ + const char * display_name;/* [relative,flag(LIBNDR_FLAG_STR_NULLTERM)] */ + struct SERVICE_STATUS status; +}/* [gensize,public] */; + +struct ENUM_SERVICE_STATUSA { const char * service_name;/* [relative,flag(LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM)] */ const char * display_name;/* [relative,flag(LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM)] */ struct SERVICE_STATUS status; -}; +}/* [gensize,public] */; /* bitmap svcctl_ServerType */ #define SV_TYPE_WORKSTATION ( 0x00000001 ) @@ -177,15 +180,15 @@ enum svcctl_StartType enum svcctl_ServiceState #ifndef USE_UINT_ENUMS { - SVCCTL_STATE_ACTIVE=0x00000001, - SVCCTL_STATE_INACTIVE=0x00000002, - SVCCTL_STATE_ALL=(SVCCTL_STATE_ACTIVE|SVCCTL_STATE_INACTIVE) + SERVICE_STATE_ACTIVE=0x00000001, + SERVICE_STATE_INACTIVE=0x00000002, + SERVICE_STATE_ALL=(SERVICE_STATE_ACTIVE|SERVICE_STATE_INACTIVE) } #else { __donnot_use_enum_svcctl_ServiceState=0x7FFFFFFF} -#define SVCCTL_STATE_ACTIVE ( 0x00000001 ) -#define SVCCTL_STATE_INACTIVE ( 0x00000002 ) -#define SVCCTL_STATE_ALL ( (SVCCTL_STATE_ACTIVE|SVCCTL_STATE_INACTIVE) ) +#define SERVICE_STATE_ACTIVE ( 0x00000001 ) +#define SERVICE_STATE_INACTIVE ( 0x00000002 ) +#define SERVICE_STATE_ALL ( (SERVICE_STATE_ACTIVE|SERVICE_STATE_INACTIVE) ) #endif ; @@ -491,14 +494,14 @@ struct svcctl_EnumServicesStatusW { struct policy_handle *handle;/* [ref] */ uint32_t type; enum svcctl_ServiceState state; - uint32_t buf_size;/* [range(0,262144)] */ + uint32_t buf_size;/* [range(0,0x40000)] */ uint32_t *resume_handle;/* [unique] */ } in; struct { uint8_t *service;/* [ref,size_is(buf_size)] */ - uint32_t *bytes_needed;/* [ref,range(0,262144)] */ - uint32_t *services_returned;/* [ref,range(0,262144)] */ + uint32_t *bytes_needed;/* [ref,range(0,0x40000)] */ + uint32_t *services_returned;/* [ref,range(0,0x40000)] */ uint32_t *resume_handle;/* [unique] */ WERROR result; } out; @@ -681,7 +684,7 @@ struct svcctl_EnumDependentServicesA { } in; struct { - struct ENUM_SERVICE_STATUS *service_status;/* [unique] */ + struct ENUM_SERVICE_STATUSA *service_status;/* [unique] */ uint32_t *bytes_needed;/* [ref] */ uint32_t *services_returned;/* [ref] */ WERROR result; @@ -694,7 +697,7 @@ struct svcctl_EnumServicesStatusA { struct { struct policy_handle *handle;/* [ref] */ uint32_t type; - uint32_t state; + enum svcctl_ServiceState state; uint32_t buf_size; uint32_t *resume_handle;/* [unique] */ } in; @@ -912,7 +915,7 @@ struct EnumServicesStatusExA { struct policy_handle *scmanager;/* [ref] */ uint32_t info_level; uint32_t type; - uint32_t state; + enum svcctl_ServiceState state; uint32_t buf_size; uint32_t *resume_handle;/* [unique] */ } in; @@ -934,17 +937,17 @@ struct EnumServicesStatusExW { struct policy_handle *scmanager;/* [ref] */ uint32_t info_level; uint32_t type; - uint32_t state; - uint32_t buf_size;/* [range(0,262144)] */ + enum svcctl_ServiceState state; + uint32_t buf_size;/* [range(0,0x40000)] */ const char *group_name;/* [unique,charset(UTF16)] */ - uint32_t *resume_handle;/* [unique,range(0,262144)] */ + uint32_t *resume_handle;/* [unique,range(0,0x40000)] */ } in; struct { uint8_t *services;/* [ref,size_is(buf_size)] */ - uint32_t *bytes_needed;/* [ref,range(0,262144)] */ - uint32_t *service_returned;/* [ref,range(0,262144)] */ - uint32_t *resume_handle;/* [unique,range(0,262144)] */ + uint32_t *bytes_needed;/* [ref,range(0,0x40000)] */ + uint32_t *service_returned;/* [ref,range(0,0x40000)] */ + uint32_t *resume_handle;/* [unique,range(0,0x40000)] */ WERROR result; } out; |