summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-03-20 01:35:58 +0100
committerGünther Deschner <gd@samba.org>2008-03-20 01:35:58 +0100
commitd91575bd9cd3b9d9d02c73006cb7fb9a3b879061 (patch)
tree78686c7521bbee2505eaccd615761c7633641dc2
parent5a9d296f8e8bfbcef510ddcc7e79c2493b43fc61 (diff)
downloadsamba-d91575bd9cd3b9d9d02c73006cb7fb9a3b879061.tar.gz
samba-d91575bd9cd3b9d9d02c73006cb7fb9a3b879061.tar.bz2
samba-d91575bd9cd3b9d9d02c73006cb7fb9a3b879061.zip
Re-run make idl.
Guenther (This used to be commit fe7203090c0c51e4561a3b5ce0d5d131d280ba8e)
-rw-r--r--source3/librpc/gen_ndr/cli_svcctl.c6
-rw-r--r--source3/librpc/gen_ndr/cli_svcctl.h2
-rw-r--r--source3/librpc/gen_ndr/ndr_svcctl.c42
-rw-r--r--source3/librpc/gen_ndr/srv_svcctl.c2
-rw-r--r--source3/librpc/gen_ndr/svcctl.h8
5 files changed, 31 insertions, 29 deletions
diff --git a/source3/librpc/gen_ndr/cli_svcctl.c b/source3/librpc/gen_ndr/cli_svcctl.c
index b8f18afe1c..1d3bc57c49 100644
--- a/source3/librpc/gen_ndr/cli_svcctl.c
+++ b/source3/librpc/gen_ndr/cli_svcctl.c
@@ -661,7 +661,7 @@ NTSTATUS rpccli_svcctl_EnumDependentServicesW(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct policy_handle *service,
uint32_t state,
- struct ENUM_SERVICE_STATUS *service_status,
+ uint8_t *service_status,
uint32_t buf_size,
uint32_t *bytes_needed,
uint32_t *services_returned,
@@ -699,9 +699,7 @@ NTSTATUS rpccli_svcctl_EnumDependentServicesW(struct rpc_pipe_client *cli,
}
/* Return variables */
- if (service_status && r.out.service_status) {
- *service_status = *r.out.service_status;
- }
+ memcpy(service_status, r.out.service_status, r.in.buf_size);
*bytes_needed = *r.out.bytes_needed;
*services_returned = *r.out.services_returned;
diff --git a/source3/librpc/gen_ndr/cli_svcctl.h b/source3/librpc/gen_ndr/cli_svcctl.h
index 7c62519187..5f724ed09e 100644
--- a/source3/librpc/gen_ndr/cli_svcctl.h
+++ b/source3/librpc/gen_ndr/cli_svcctl.h
@@ -94,7 +94,7 @@ NTSTATUS rpccli_svcctl_EnumDependentServicesW(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct policy_handle *service,
uint32_t state,
- struct ENUM_SERVICE_STATUS *service_status,
+ uint8_t *service_status,
uint32_t buf_size,
uint32_t *bytes_needed,
uint32_t *services_returned,
diff --git a/source3/librpc/gen_ndr/ndr_svcctl.c b/source3/librpc/gen_ndr/ndr_svcctl.c
index 16e0416288..f7e787415a 100644
--- a/source3/librpc/gen_ndr/ndr_svcctl.c
+++ b/source3/librpc/gen_ndr/ndr_svcctl.c
@@ -1693,10 +1693,11 @@ static enum ndr_err_code ndr_push_svcctl_EnumDependentServicesW(struct ndr_push
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.buf_size));
}
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));
+ if (r->out.service_status == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
}
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.buf_size));
+ NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.service_status, r->in.buf_size));
if (r->out.bytes_needed == NULL) {
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
}
@@ -1712,9 +1713,7 @@ static enum ndr_err_code ndr_push_svcctl_EnumDependentServicesW(struct ndr_push
static enum ndr_err_code ndr_pull_svcctl_EnumDependentServicesW(struct ndr_pull *ndr, int flags, struct svcctl_EnumDependentServicesW *r)
{
- uint32_t _ptr_service_status;
TALLOC_CTX *_mem_save_service_0;
- TALLOC_CTX *_mem_save_service_status_0;
TALLOC_CTX *_mem_save_bytes_needed_0;
TALLOC_CTX *_mem_save_services_returned_0;
if (flags & NDR_IN) {
@@ -1729,30 +1728,31 @@ static enum ndr_err_code ndr_pull_svcctl_EnumDependentServicesW(struct ndr_pull
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_uint32(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 > 0x40000) {
+ return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
+ }
+ NDR_PULL_ALLOC_N(ndr, r->out.service_status, r->in.buf_size);
+ memset(r->out.service_status, 0, (r->in.buf_size) * sizeof(*r->out.service_status));
NDR_PULL_ALLOC(ndr, r->out.bytes_needed);
ZERO_STRUCTP(r->out.bytes_needed);
NDR_PULL_ALLOC(ndr, r->out.services_returned);
ZERO_STRUCTP(r->out.services_returned);
}
if (flags & NDR_OUT) {
- NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_service_status));
- if (_ptr_service_status) {
- NDR_PULL_ALLOC(ndr, r->out.service_status);
- } else {
- r->out.service_status = NULL;
- }
- 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_PULL_SET_MEM_CTX(ndr, _mem_save_service_status_0, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->out.service_status));
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC_N(ndr, r->out.service_status, ndr_get_array_size(ndr, &r->out.service_status));
}
+ NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.service_status, ndr_get_array_size(ndr, &r->out.service_status)));
if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
NDR_PULL_ALLOC(ndr, r->out.bytes_needed);
}
_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 > 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);
if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
NDR_PULL_ALLOC(ndr, r->out.services_returned);
@@ -1760,8 +1760,14 @@ static enum ndr_err_code ndr_pull_svcctl_EnumDependentServicesW(struct ndr_pull
_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 > 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);
NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ if (r->out.service_status) {
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.service_status, r->in.buf_size));
+ }
}
return NDR_ERR_SUCCESS;
}
@@ -1789,9 +1795,7 @@ _PUBLIC_ void ndr_print_svcctl_EnumDependentServicesW(struct ndr_print *ndr, con
ndr->depth++;
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_array_uint8(ndr, "service_status", r->out.service_status, r->in.buf_size);
ndr->depth--;
ndr_print_ptr(ndr, "bytes_needed", r->out.bytes_needed);
ndr->depth++;
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;
diff --git a/source3/librpc/gen_ndr/svcctl.h b/source3/librpc/gen_ndr/svcctl.h
index c13e96b2a0..fad51c446b 100644
--- a/source3/librpc/gen_ndr/svcctl.h
+++ b/source3/librpc/gen_ndr/svcctl.h
@@ -274,13 +274,13 @@ struct svcctl_EnumDependentServicesW {
struct {
struct policy_handle *service;/* [ref] */
uint32_t state;
- uint32_t buf_size;
+ uint32_t buf_size;/* [range(0,0x40000)] */
} in;
struct {
- struct ENUM_SERVICE_STATUS *service_status;/* [unique] */
- uint32_t *bytes_needed;/* [ref] */
- uint32_t *services_returned;/* [ref] */
+ uint8_t *service_status;/* [ref,size_is(buf_size)] */
+ uint32_t *bytes_needed;/* [ref,range(0,0x40000)] */
+ uint32_t *services_returned;/* [ref,range(0,0x40000)] */
WERROR result;
} out;