summaryrefslogtreecommitdiff
path: root/source3/librpc
diff options
context:
space:
mode:
Diffstat (limited to 'source3/librpc')
-rw-r--r--source3/librpc/gen_ndr/cli_winreg.c2
-rw-r--r--source3/librpc/gen_ndr/cli_winreg.h2
-rw-r--r--source3/librpc/gen_ndr/ndr_winreg.c71
-rw-r--r--source3/librpc/gen_ndr/srv_winreg.h2
-rw-r--r--source3/librpc/gen_ndr/winreg.h4
-rw-r--r--source3/librpc/idl/winreg.idl2
6 files changed, 12 insertions, 71 deletions
diff --git a/source3/librpc/gen_ndr/cli_winreg.c b/source3/librpc/gen_ndr/cli_winreg.c
index 688737082c..5ef93d3a92 100644
--- a/source3/librpc/gen_ndr/cli_winreg.c
+++ b/source3/librpc/gen_ndr/cli_winreg.c
@@ -512,7 +512,7 @@ NTSTATUS rpccli_winreg_QueryInfoKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem
return werror_to_ntstatus(r.out.result);
}
-NTSTATUS rpccli_winreg_QueryValue(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct winreg_String value_name, enum winreg_Type *type, uint8_t **data, uint32_t *size, uint32_t *length)
+NTSTATUS rpccli_winreg_QueryValue(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct winreg_String value_name, enum winreg_Type *type, uint8_t *data, uint32_t *size, uint32_t *length)
{
struct winreg_QueryValue r;
NTSTATUS status;
diff --git a/source3/librpc/gen_ndr/cli_winreg.h b/source3/librpc/gen_ndr/cli_winreg.h
index 3981a7fe53..041efd2b91 100644
--- a/source3/librpc/gen_ndr/cli_winreg.h
+++ b/source3/librpc/gen_ndr/cli_winreg.h
@@ -18,7 +18,7 @@ NTSTATUS rpccli_winreg_LoadKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
NTSTATUS rpccli_winreg_NotifyChangeKeyValue(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint8_t watch_subtree, uint32_t notify_filter, uint32_t unknown, struct winreg_String string1, struct winreg_String string2, uint32_t unknown2);
NTSTATUS rpccli_winreg_OpenKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *parent_handle, struct winreg_String keyname, uint32_t unknown, uint32_t access_mask, struct policy_handle *handle);
NTSTATUS rpccli_winreg_QueryInfoKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct winreg_String class_in, struct winreg_String *class_out, uint32_t *num_subkeys, uint32_t *max_subkeylen, uint32_t *max_subkeysize, uint32_t *num_values, uint32_t *max_valnamelen, uint32_t *max_valbufsize, uint32_t *secdescsize, NTTIME *last_changed_time);
-NTSTATUS rpccli_winreg_QueryValue(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct winreg_String value_name, enum winreg_Type *type, uint8_t **data, uint32_t *size, uint32_t *length);
+NTSTATUS rpccli_winreg_QueryValue(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct winreg_String value_name, enum winreg_Type *type, uint8_t *data, uint32_t *size, uint32_t *length);
NTSTATUS rpccli_winreg_ReplaceKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);
NTSTATUS rpccli_winreg_RestoreKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);
NTSTATUS rpccli_winreg_SaveKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);
diff --git a/source3/librpc/gen_ndr/ndr_winreg.c b/source3/librpc/gen_ndr/ndr_winreg.c
index 5dd8fc49be..ca007bb449 100644
--- a/source3/librpc/gen_ndr/ndr_winreg.c
+++ b/source3/librpc/gen_ndr/ndr_winreg.c
@@ -2272,7 +2272,6 @@ _PUBLIC_ void ndr_print_winreg_QueryInfoKey(struct ndr_print *ndr, const char *n
NTSTATUS ndr_push_winreg_QueryValue(struct ndr_push *ndr, int flags, const struct winreg_QueryValue *r)
{
- uint32_t cntr_data_1;
if (flags & NDR_IN) {
if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
@@ -2286,9 +2285,7 @@ NTSTATUS ndr_push_winreg_QueryValue(struct ndr_push *ndr, int flags, const struc
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.size));
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.length));
- for (cntr_data_1 = 0; cntr_data_1 < *r->in.length; cntr_data_1++) {
- NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.data[cntr_data_1]));
- }
+ NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.data, *r->in.length));
}
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.size));
if (r->in.size) {
@@ -2309,9 +2306,7 @@ NTSTATUS ndr_push_winreg_QueryValue(struct ndr_push *ndr, int flags, const struc
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.size));
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.length));
- for (cntr_data_1 = 0; cntr_data_1 < *r->out.length; cntr_data_1++) {
- NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.data[cntr_data_1]));
- }
+ NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.data, *r->out.length));
}
NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.size));
if (r->out.size) {
@@ -2330,14 +2325,11 @@ NTSTATUS ndr_pull_winreg_QueryValue(struct ndr_pull *ndr, int flags, struct winr
{
uint32_t _ptr_type;
uint32_t _ptr_data;
- uint32_t cntr_data_1;
uint32_t _ptr_size;
uint32_t _ptr_length;
TALLOC_CTX *_mem_save_handle_0;
TALLOC_CTX *_mem_save_type_0;
TALLOC_CTX *_mem_save_data_0;
- TALLOC_CTX *_mem_save_data_1;
- TALLOC_CTX *_mem_save_data_2;
TALLOC_CTX *_mem_save_size_0;
TALLOC_CTX *_mem_save_length_0;
if (flags & NDR_IN) {
@@ -2378,17 +2370,7 @@ NTSTATUS ndr_pull_winreg_QueryValue(struct ndr_pull *ndr, int flags, struct winr
return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.data), ndr_get_array_length(ndr, &r->in.data));
}
NDR_PULL_ALLOC_N(ndr, r->in.data, ndr_get_array_size(ndr, &r->in.data));
- _mem_save_data_1 = NDR_PULL_GET_MEM_CTX(ndr);
- NDR_PULL_SET_MEM_CTX(ndr, r->in.data, 0);
- for (cntr_data_1 = 0; cntr_data_1 < *r->in.length; cntr_data_1++) {
- NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data));
- if (_ptr_data) {
- NDR_PULL_ALLOC(ndr, r->in.data[cntr_data_1]);
- } else {
- r->in.data[cntr_data_1] = NULL;
- }
- }
- NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_1, 0);
+ NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->in.data, ndr_get_array_length(ndr, &r->in.data)));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, 0);
}
NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_size));
@@ -2452,17 +2434,7 @@ NTSTATUS ndr_pull_winreg_QueryValue(struct ndr_pull *ndr, int flags, struct winr
return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->out.data), ndr_get_array_length(ndr, &r->out.data));
}
NDR_PULL_ALLOC_N(ndr, r->out.data, ndr_get_array_size(ndr, &r->out.data));
- _mem_save_data_1 = NDR_PULL_GET_MEM_CTX(ndr);
- NDR_PULL_SET_MEM_CTX(ndr, r->out.data, 0);
- for (cntr_data_1 = 0; cntr_data_1 < *r->out.length; cntr_data_1++) {
- NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data));
- if (_ptr_data) {
- NDR_PULL_ALLOC(ndr, r->out.data[cntr_data_1]);
- } else {
- r->out.data[cntr_data_1] = NULL;
- }
- }
- NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_1, 0);
+ NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.data, ndr_get_array_length(ndr, &r->out.data)));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, 0);
}
NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_size));
@@ -2504,7 +2476,6 @@ NTSTATUS ndr_pull_winreg_QueryValue(struct ndr_pull *ndr, int flags, struct winr
_PUBLIC_ void ndr_print_winreg_QueryValue(struct ndr_print *ndr, const char *name, int flags, const struct winreg_QueryValue *r)
{
- uint32_t cntr_data_1;
ndr_print_struct(ndr, name, "winreg_QueryValue");
ndr->depth++;
if (flags & NDR_SET_VALUES) {
@@ -2527,22 +2498,7 @@ _PUBLIC_ void ndr_print_winreg_QueryValue(struct ndr_print *ndr, const char *nam
ndr_print_ptr(ndr, "data", r->in.data);
ndr->depth++;
if (r->in.data) {
- ndr->print(ndr, "%s: ARRAY(%d)", "data", *r->in.length);
- ndr->depth++;
- for (cntr_data_1=0;cntr_data_1<*r->in.length;cntr_data_1++) {
- char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_data_1);
- if (idx_1) {
- ndr_print_ptr(ndr, "data", r->in.data[cntr_data_1]);
- ndr->depth++;
- if (r->in.data[cntr_data_1]) {
- ndr_print_uint8(ndr, "data", *r->in.data[cntr_data_1]);
- }
- ndr->depth--;
- free(idx_1);
- }
- }
- ndr->depth--;
+ ndr_print_array_uint8(ndr, "data", r->in.data, *r->in.length);
}
ndr->depth--;
ndr_print_ptr(ndr, "size", r->in.size);
@@ -2571,22 +2527,7 @@ _PUBLIC_ void ndr_print_winreg_QueryValue(struct ndr_print *ndr, const char *nam
ndr_print_ptr(ndr, "data", r->out.data);
ndr->depth++;
if (r->out.data) {
- ndr->print(ndr, "%s: ARRAY(%d)", "data", *r->out.length);
- ndr->depth++;
- for (cntr_data_1=0;cntr_data_1<*r->out.length;cntr_data_1++) {
- char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_data_1);
- if (idx_1) {
- ndr_print_ptr(ndr, "data", r->out.data[cntr_data_1]);
- ndr->depth++;
- if (r->out.data[cntr_data_1]) {
- ndr_print_uint8(ndr, "data", *r->out.data[cntr_data_1]);
- }
- ndr->depth--;
- free(idx_1);
- }
- }
- ndr->depth--;
+ ndr_print_array_uint8(ndr, "data", r->out.data, *r->out.length);
}
ndr->depth--;
ndr_print_ptr(ndr, "size", r->out.size);
diff --git a/source3/librpc/gen_ndr/srv_winreg.h b/source3/librpc/gen_ndr/srv_winreg.h
index 10a4b6e438..7fd3bfedd1 100644
--- a/source3/librpc/gen_ndr/srv_winreg.h
+++ b/source3/librpc/gen_ndr/srv_winreg.h
@@ -18,7 +18,7 @@ WERROR _winreg_LoadKey(pipes_struct *p, struct policy_handle *handle, struct win
WERROR _winreg_NotifyChangeKeyValue(pipes_struct *p, struct policy_handle *handle, uint8_t watch_subtree, uint32_t notify_filter, uint32_t unknown, struct winreg_String string1, struct winreg_String string2, uint32_t unknown2);
WERROR _winreg_OpenKey(pipes_struct *p, struct policy_handle *parent_handle, struct winreg_String keyname, uint32_t unknown, uint32_t access_mask, struct policy_handle *handle);
WERROR _winreg_QueryInfoKey(pipes_struct *p, struct policy_handle *handle, struct winreg_String class_in, struct winreg_String *class_out, uint32_t *num_subkeys, uint32_t *max_subkeylen, uint32_t *max_subkeysize, uint32_t *num_values, uint32_t *max_valnamelen, uint32_t *max_valbufsize, uint32_t *secdescsize, NTTIME *last_changed_time);
-WERROR _winreg_QueryValue(pipes_struct *p, struct policy_handle *handle, struct winreg_String value_name, enum winreg_Type *type, uint8_t **data, uint32_t *size, uint32_t *length);
+WERROR _winreg_QueryValue(pipes_struct *p, struct policy_handle *handle, struct winreg_String value_name, enum winreg_Type *type, uint8_t *data, uint32_t *size, uint32_t *length);
WERROR _winreg_ReplaceKey(pipes_struct *p);
WERROR _winreg_RestoreKey(pipes_struct *p);
WERROR _winreg_SaveKey(pipes_struct *p);
diff --git a/source3/librpc/gen_ndr/winreg.h b/source3/librpc/gen_ndr/winreg.h
index ff16c37f9c..d895845243 100644
--- a/source3/librpc/gen_ndr/winreg.h
+++ b/source3/librpc/gen_ndr/winreg.h
@@ -334,14 +334,14 @@ struct winreg_QueryValue {
struct policy_handle *handle;/* [ref] */
struct winreg_String value_name;
enum winreg_Type *type;/* [unique] */
- uint8_t **data;/* [unique,length_is(*length),size_is(*size)] */
+ uint8_t *data;/* [unique,length_is(*length),size_is(*size)] */
uint32_t *size;/* [unique] */
uint32_t *length;/* [unique] */
} in;
struct {
enum winreg_Type *type;/* [unique] */
- uint8_t **data;/* [unique,length_is(*length),size_is(*size)] */
+ uint8_t *data;/* [unique,length_is(*length),size_is(*size)] */
uint32_t *size;/* [unique] */
uint32_t *length;/* [unique] */
WERROR result;
diff --git a/source3/librpc/idl/winreg.idl b/source3/librpc/idl/winreg.idl
index 3ddd71ad47..03b034b38f 100644
--- a/source3/librpc/idl/winreg.idl
+++ b/source3/librpc/idl/winreg.idl
@@ -226,7 +226,7 @@
[in,ref] policy_handle *handle,
[in] winreg_String value_name,
[in,out] winreg_Type *type,
- [in,out,size_is(*size),length_is(*length)] uint8 **data,
+ [in,out,size_is(*size),length_is(*length)] uint8 *data,
[in,out] uint32 *size,
[in,out] uint32 *length
);