summaryrefslogtreecommitdiff
path: root/librpc
diff options
context:
space:
mode:
Diffstat (limited to 'librpc')
-rw-r--r--librpc/gen_ndr/cli_winreg.c43
-rw-r--r--librpc/gen_ndr/cli_winreg.h14
-rw-r--r--librpc/gen_ndr/ndr_winreg.c223
-rw-r--r--librpc/gen_ndr/srv_winreg.c17
-rw-r--r--librpc/gen_ndr/winreg.h13
5 files changed, 306 insertions, 4 deletions
diff --git a/librpc/gen_ndr/cli_winreg.c b/librpc/gen_ndr/cli_winreg.c
index 82dbb63ac5..5eb7fb9ccc 100644
--- a/librpc/gen_ndr/cli_winreg.c
+++ b/librpc/gen_ndr/cli_winreg.c
@@ -5366,7 +5366,13 @@ static void rpccli_winreg_QueryMultipleValues2_done(struct tevent_req *subreq);
struct tevent_req *rpccli_winreg_QueryMultipleValues2_send(TALLOC_CTX *mem_ctx,
struct tevent_context *ev,
- struct rpc_pipe_client *cli)
+ struct rpc_pipe_client *cli,
+ struct policy_handle *_key_handle /* [in] [ref] */,
+ struct QueryMultipleValue *_values /* [in,out] [ref,length_is(num_values),size_is(num_values)] */,
+ uint32_t _num_values /* [in] */,
+ uint8_t *_buffer /* [in,out] [unique,length_is(offered),size_is(offered)] */,
+ uint32_t _offered /* [in] */,
+ uint32_t *_needed /* [out] [ref] */)
{
struct tevent_req *req;
struct rpccli_winreg_QueryMultipleValues2_state *state;
@@ -5381,12 +5387,26 @@ struct tevent_req *rpccli_winreg_QueryMultipleValues2_send(TALLOC_CTX *mem_ctx,
state->dispatch_recv = cli->dispatch_recv;
/* In parameters */
+ state->orig.in.key_handle = _key_handle;
+ state->orig.in.values = _values;
+ state->orig.in.num_values = _num_values;
+ state->orig.in.buffer = _buffer;
+ state->orig.in.offered = _offered;
/* Out parameters */
+ state->orig.out.values = _values;
+ state->orig.out.buffer = _buffer;
+ state->orig.out.needed = _needed;
/* Result */
ZERO_STRUCT(state->orig.out.result);
+ state->out_mem_ctx = talloc_named_const(state, 0,
+ "rpccli_winreg_QueryMultipleValues2_out_memory");
+ if (tevent_req_nomem(state->out_mem_ctx, req)) {
+ return tevent_req_post(req, ev);
+ }
+
/* make a temporary copy, that we pass to the dispatch function */
state->tmp = state->orig;
@@ -5424,6 +5444,11 @@ static void rpccli_winreg_QueryMultipleValues2_done(struct tevent_req *subreq)
}
/* Copy out parameters */
+ memcpy(state->orig.out.values, state->tmp.out.values, (state->tmp.in.num_values) * sizeof(*state->orig.out.values));
+ if (state->orig.out.buffer && state->tmp.out.buffer) {
+ memcpy(state->orig.out.buffer, state->tmp.out.buffer, (state->tmp.in.offered) * sizeof(*state->orig.out.buffer));
+ }
+ *state->orig.out.needed = *state->tmp.out.needed;
/* Copy result */
state->orig.out.result = state->tmp.out.result;
@@ -5459,12 +5484,23 @@ NTSTATUS rpccli_winreg_QueryMultipleValues2_recv(struct tevent_req *req,
NTSTATUS rpccli_winreg_QueryMultipleValues2(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
+ struct policy_handle *key_handle /* [in] [ref] */,
+ struct QueryMultipleValue *values /* [in,out] [ref,length_is(num_values),size_is(num_values)] */,
+ uint32_t num_values /* [in] */,
+ uint8_t *buffer /* [in,out] [unique,length_is(offered),size_is(offered)] */,
+ uint32_t offered /* [in] */,
+ uint32_t *needed /* [out] [ref] */,
WERROR *werror)
{
struct winreg_QueryMultipleValues2 r;
NTSTATUS status;
/* In parameters */
+ r.in.key_handle = key_handle;
+ r.in.values = values;
+ r.in.num_values = num_values;
+ r.in.buffer = buffer;
+ r.in.offered = offered;
status = cli->dispatch(cli,
mem_ctx,
@@ -5481,6 +5517,11 @@ NTSTATUS rpccli_winreg_QueryMultipleValues2(struct rpc_pipe_client *cli,
}
/* Return variables */
+ memcpy(values, r.out.values, (r.in.num_values) * sizeof(*values));
+ if (buffer && r.out.buffer) {
+ memcpy(buffer, r.out.buffer, (r.in.offered) * sizeof(*buffer));
+ }
+ *needed = *r.out.needed;
/* Return result */
if (werror) {
diff --git a/librpc/gen_ndr/cli_winreg.h b/librpc/gen_ndr/cli_winreg.h
index 4ed75fdb3e..f6922d4ad9 100644
--- a/librpc/gen_ndr/cli_winreg.h
+++ b/librpc/gen_ndr/cli_winreg.h
@@ -569,12 +569,24 @@ NTSTATUS rpccli_winreg_OpenHKPN(struct rpc_pipe_client *cli,
WERROR *werror);
struct tevent_req *rpccli_winreg_QueryMultipleValues2_send(TALLOC_CTX *mem_ctx,
struct tevent_context *ev,
- struct rpc_pipe_client *cli);
+ struct rpc_pipe_client *cli,
+ struct policy_handle *_key_handle /* [in] [ref] */,
+ struct QueryMultipleValue *_values /* [in,out] [ref,length_is(num_values),size_is(num_values)] */,
+ uint32_t _num_values /* [in] */,
+ uint8_t *_buffer /* [in,out] [unique,length_is(offered),size_is(offered)] */,
+ uint32_t _offered /* [in] */,
+ uint32_t *_needed /* [out] [ref] */);
NTSTATUS rpccli_winreg_QueryMultipleValues2_recv(struct tevent_req *req,
TALLOC_CTX *mem_ctx,
WERROR *result);
NTSTATUS rpccli_winreg_QueryMultipleValues2(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
+ struct policy_handle *key_handle /* [in] [ref] */,
+ struct QueryMultipleValue *values /* [in,out] [ref,length_is(num_values),size_is(num_values)] */,
+ uint32_t num_values /* [in] */,
+ uint8_t *buffer /* [in,out] [unique,length_is(offered),size_is(offered)] */,
+ uint32_t offered /* [in] */,
+ uint32_t *needed /* [out] [ref] */,
WERROR *werror);
struct tevent_req *rpccli_winreg_DeleteKeyEx_send(TALLOC_CTX *mem_ctx,
struct tevent_context *ev,
diff --git a/librpc/gen_ndr/ndr_winreg.c b/librpc/gen_ndr/ndr_winreg.c
index 964b109a8b..0a262cddd5 100644
--- a/librpc/gen_ndr/ndr_winreg.c
+++ b/librpc/gen_ndr/ndr_winreg.c
@@ -235,7 +235,6 @@ _PUBLIC_ void ndr_print_winreg_KeyOptions(struct ndr_print *ndr, const char *nam
{
ndr_print_uint32(ndr, name, r);
ndr->depth++;
- ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "REG_OPTION_NON_VOLATILE", REG_OPTION_NON_VOLATILE, r);
ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "REG_OPTION_VOLATILE", REG_OPTION_VOLATILE, r);
ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "REG_OPTION_CREATE_LINK", REG_OPTION_CREATE_LINK, r);
ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "REG_OPTION_BACKUP_RESTORE", REG_OPTION_BACKUP_RESTORE, r);
@@ -4368,9 +4367,58 @@ _PUBLIC_ void ndr_print_winreg_OpenHKPN(struct ndr_print *ndr, const char *name,
static enum ndr_err_code ndr_push_winreg_QueryMultipleValues2(struct ndr_push *ndr, int flags, const struct winreg_QueryMultipleValues2 *r)
{
+ uint32_t cntr_values_1;
if (flags & NDR_IN) {
+ if (r->in.key_handle == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
+ NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.key_handle));
+ if (r->in.values == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
+ NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.num_values));
+ NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.num_values));
+ for (cntr_values_1 = 0; cntr_values_1 < r->in.num_values; cntr_values_1++) {
+ NDR_CHECK(ndr_push_QueryMultipleValue(ndr, NDR_SCALARS, &r->in.values[cntr_values_1]));
+ }
+ for (cntr_values_1 = 0; cntr_values_1 < r->in.num_values; cntr_values_1++) {
+ NDR_CHECK(ndr_push_QueryMultipleValue(ndr, NDR_BUFFERS, &r->in.values[cntr_values_1]));
+ }
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.num_values));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.buffer));
+ if (r->in.buffer) {
+ NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.offered));
+ NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.offered));
+ NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.buffer, r->in.offered));
+ }
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
}
if (flags & NDR_OUT) {
+ if (r->out.values == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
+ NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.num_values));
+ NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.num_values));
+ for (cntr_values_1 = 0; cntr_values_1 < r->in.num_values; cntr_values_1++) {
+ NDR_CHECK(ndr_push_QueryMultipleValue(ndr, NDR_SCALARS, &r->out.values[cntr_values_1]));
+ }
+ for (cntr_values_1 = 0; cntr_values_1 < r->in.num_values; cntr_values_1++) {
+ NDR_CHECK(ndr_push_QueryMultipleValue(ndr, NDR_BUFFERS, &r->out.values[cntr_values_1]));
+ }
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.buffer));
+ if (r->out.buffer) {
+ NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.offered));
+ NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.offered));
+ NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.buffer, r->in.offered));
+ }
+ if (r->out.needed == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
}
return NDR_ERR_SUCCESS;
@@ -4378,16 +4426,141 @@ static enum ndr_err_code ndr_push_winreg_QueryMultipleValues2(struct ndr_push *n
static enum ndr_err_code ndr_pull_winreg_QueryMultipleValues2(struct ndr_pull *ndr, int flags, struct winreg_QueryMultipleValues2 *r)
{
+ uint32_t cntr_values_1;
+ uint32_t _ptr_buffer;
+ TALLOC_CTX *_mem_save_key_handle_0;
+ TALLOC_CTX *_mem_save_values_1;
+ TALLOC_CTX *_mem_save_buffer_0;
+ TALLOC_CTX *_mem_save_needed_0;
if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.key_handle);
+ }
+ _mem_save_key_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.key_handle, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.key_handle));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_key_handle_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.values));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.values));
+ if (ndr_get_array_length(ndr, &r->in.values) > ndr_get_array_size(ndr, &r->in.values)) {
+ 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.values), ndr_get_array_length(ndr, &r->in.values));
+ }
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC_N(ndr, r->in.values, ndr_get_array_size(ndr, &r->in.values));
+ }
+ memcpy(r->out.values, r->in.values, (ndr_get_array_size(ndr, &r->in.values)) * sizeof(*r->in.values));
+ _mem_save_values_1 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.values, 0);
+ for (cntr_values_1 = 0; cntr_values_1 < ndr_get_array_length(ndr, &r->in.values); cntr_values_1++) {
+ NDR_CHECK(ndr_pull_QueryMultipleValue(ndr, NDR_SCALARS, &r->in.values[cntr_values_1]));
+ }
+ for (cntr_values_1 = 0; cntr_values_1 < ndr_get_array_length(ndr, &r->in.values); cntr_values_1++) {
+ NDR_CHECK(ndr_pull_QueryMultipleValue(ndr, NDR_BUFFERS, &r->in.values[cntr_values_1]));
+ }
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_values_1, 0);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.num_values));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_buffer));
+ if (_ptr_buffer) {
+ NDR_PULL_ALLOC(ndr, r->in.buffer);
+ } else {
+ r->in.buffer = NULL;
+ }
+ if (r->in.buffer) {
+ _mem_save_buffer_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.buffer, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.buffer));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.buffer));
+ if (ndr_get_array_length(ndr, &r->in.buffer) > ndr_get_array_size(ndr, &r->in.buffer)) {
+ 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.buffer), ndr_get_array_length(ndr, &r->in.buffer));
+ }
+ NDR_PULL_ALLOC_N(ndr, r->in.buffer, ndr_get_array_size(ndr, &r->in.buffer));
+ NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->in.buffer, ndr_get_array_length(ndr, &r->in.buffer)));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffer_0, 0);
+ }
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
+ NDR_PULL_ALLOC_N(ndr, r->out.values, r->in.num_values);
+ memcpy(r->out.values, r->in.values, (r->in.num_values) * sizeof(*r->in.values));
+ NDR_PULL_ALLOC(ndr, r->out.needed);
+ ZERO_STRUCTP(r->out.needed);
+ if (r->in.values) {
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.values, r->in.num_values));
+ }
+ if (r->in.values) {
+ NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->in.values, r->in.num_values));
+ }
+ if (r->in.buffer) {
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.buffer, r->in.offered));
+ }
+ if (r->in.buffer) {
+ NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->in.buffer, r->in.offered));
+ }
}
if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->out.values));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->out.values));
+ if (ndr_get_array_length(ndr, &r->out.values) > ndr_get_array_size(ndr, &r->out.values)) {
+ 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.values), ndr_get_array_length(ndr, &r->out.values));
+ }
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC_N(ndr, r->out.values, ndr_get_array_size(ndr, &r->out.values));
+ }
+ memcpy(r->out.values, r->in.values, (ndr_get_array_size(ndr, &r->out.values)) * sizeof(*r->in.values));
+ _mem_save_values_1 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.values, 0);
+ for (cntr_values_1 = 0; cntr_values_1 < ndr_get_array_length(ndr, &r->out.values); cntr_values_1++) {
+ NDR_CHECK(ndr_pull_QueryMultipleValue(ndr, NDR_SCALARS, &r->out.values[cntr_values_1]));
+ }
+ for (cntr_values_1 = 0; cntr_values_1 < ndr_get_array_length(ndr, &r->out.values); cntr_values_1++) {
+ NDR_CHECK(ndr_pull_QueryMultipleValue(ndr, NDR_BUFFERS, &r->out.values[cntr_values_1]));
+ }
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_values_1, 0);
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_buffer));
+ if (_ptr_buffer) {
+ NDR_PULL_ALLOC(ndr, r->out.buffer);
+ } else {
+ r->out.buffer = NULL;
+ }
+ if (r->out.buffer) {
+ _mem_save_buffer_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.buffer, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->out.buffer));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->out.buffer));
+ if (ndr_get_array_length(ndr, &r->out.buffer) > ndr_get_array_size(ndr, &r->out.buffer)) {
+ 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.buffer), ndr_get_array_length(ndr, &r->out.buffer));
+ }
+ NDR_PULL_ALLOC_N(ndr, r->out.buffer, ndr_get_array_size(ndr, &r->out.buffer));
+ NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.buffer, ndr_get_array_length(ndr, &r->out.buffer)));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffer_0, 0);
+ }
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.needed);
+ }
+ _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ if (r->out.values) {
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.values, r->in.num_values));
+ }
+ if (r->out.values) {
+ NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->out.values, r->in.num_values));
+ }
+ if (r->out.buffer) {
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.buffer, r->in.offered));
+ }
+ if (r->out.buffer) {
+ NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->out.buffer, r->in.offered));
+ }
}
return NDR_ERR_SUCCESS;
}
_PUBLIC_ void ndr_print_winreg_QueryMultipleValues2(struct ndr_print *ndr, const char *name, int flags, const struct winreg_QueryMultipleValues2 *r)
{
+ uint32_t cntr_values_1;
ndr_print_struct(ndr, name, "winreg_QueryMultipleValues2");
ndr->depth++;
if (flags & NDR_SET_VALUES) {
@@ -4396,11 +4569,59 @@ _PUBLIC_ void ndr_print_winreg_QueryMultipleValues2(struct ndr_print *ndr, const
if (flags & NDR_IN) {
ndr_print_struct(ndr, "in", "winreg_QueryMultipleValues2");
ndr->depth++;
+ ndr_print_ptr(ndr, "key_handle", r->in.key_handle);
+ ndr->depth++;
+ ndr_print_policy_handle(ndr, "key_handle", r->in.key_handle);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "values", r->in.values);
+ ndr->depth++;
+ ndr->print(ndr, "%s: ARRAY(%d)", "values", (int)r->in.num_values);
+ ndr->depth++;
+ for (cntr_values_1=0;cntr_values_1<r->in.num_values;cntr_values_1++) {
+ char *idx_1=NULL;
+ if (asprintf(&idx_1, "[%d]", cntr_values_1) != -1) {
+ ndr_print_QueryMultipleValue(ndr, "values", &r->in.values[cntr_values_1]);
+ free(idx_1);
+ }
+ }
+ ndr->depth--;
+ ndr->depth--;
+ ndr_print_uint32(ndr, "num_values", r->in.num_values);
+ ndr_print_ptr(ndr, "buffer", r->in.buffer);
+ ndr->depth++;
+ if (r->in.buffer) {
+ ndr_print_array_uint8(ndr, "buffer", r->in.buffer, r->in.offered);
+ }
+ ndr->depth--;
+ ndr_print_uint32(ndr, "offered", r->in.offered);
ndr->depth--;
}
if (flags & NDR_OUT) {
ndr_print_struct(ndr, "out", "winreg_QueryMultipleValues2");
ndr->depth++;
+ ndr_print_ptr(ndr, "values", r->out.values);
+ ndr->depth++;
+ ndr->print(ndr, "%s: ARRAY(%d)", "values", (int)r->in.num_values);
+ ndr->depth++;
+ for (cntr_values_1=0;cntr_values_1<r->in.num_values;cntr_values_1++) {
+ char *idx_1=NULL;
+ if (asprintf(&idx_1, "[%d]", cntr_values_1) != -1) {
+ ndr_print_QueryMultipleValue(ndr, "values", &r->out.values[cntr_values_1]);
+ free(idx_1);
+ }
+ }
+ ndr->depth--;
+ ndr->depth--;
+ ndr_print_ptr(ndr, "buffer", r->out.buffer);
+ ndr->depth++;
+ if (r->out.buffer) {
+ ndr_print_array_uint8(ndr, "buffer", r->out.buffer, r->in.offered);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "needed", r->out.needed);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "needed", *r->out.needed);
+ ndr->depth--;
ndr_print_WERROR(ndr, "result", r->out.result);
ndr->depth--;
}
diff --git a/librpc/gen_ndr/srv_winreg.c b/librpc/gen_ndr/srv_winreg.c
index b5b4adcd88..ce266c7681 100644
--- a/librpc/gen_ndr/srv_winreg.c
+++ b/librpc/gen_ndr/srv_winreg.c
@@ -2684,6 +2684,15 @@ static bool api_winreg_QueryMultipleValues2(pipes_struct *p)
NDR_PRINT_IN_DEBUG(winreg_QueryMultipleValues2, r);
}
+ ZERO_STRUCT(r->out);
+ r->out.values = r->in.values;
+ r->out.buffer = r->in.buffer;
+ r->out.needed = talloc_zero(r, uint32_t);
+ if (r->out.needed == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
r->out.result = _winreg_QueryMultipleValues2(p, r);
if (p->rng_fault_state) {
@@ -3192,6 +3201,14 @@ NTSTATUS rpc_winreg_dispatch(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, c
case NDR_WINREG_QUERYMULTIPLEVALUES2: {
struct winreg_QueryMultipleValues2 *r = (struct winreg_QueryMultipleValues2 *)_r;
+ ZERO_STRUCT(r->out);
+ r->out.values = r->in.values;
+ r->out.buffer = r->in.buffer;
+ r->out.needed = talloc_zero(mem_ctx, uint32_t);
+ if (r->out.needed == NULL) {
+ return NT_STATUS_NO_MEMORY;
+ }
+
r->out.result = _winreg_QueryMultipleValues2(cli->pipes_struct, r);
return NT_STATUS_OK;
}
diff --git a/librpc/gen_ndr/winreg.h b/librpc/gen_ndr/winreg.h
index c0e13d0d17..b412d353b9 100644
--- a/librpc/gen_ndr/winreg.h
+++ b/librpc/gen_ndr/winreg.h
@@ -14,6 +14,7 @@
#define REG_KEY_EXECUTE ( REG_KEY_READ )
#define REG_KEY_WRITE ( (STANDARD_RIGHTS_WRITE_ACCESS|KEY_SET_VALUE|KEY_CREATE_SUB_KEY) )
#define REG_KEY_ALL ( (STANDARD_RIGHTS_REQUIRED_ACCESS|REG_KEY_READ|REG_KEY_WRITE|KEY_CREATE_LINK) )
+#define REG_OPTION_NON_VOLATILE ( 0x00000000 )
/* bitmap winreg_AccessMask */
#define KEY_QUERY_VALUE ( 0x00001 )
#define KEY_SET_VALUE ( 0x00002 )
@@ -43,7 +44,6 @@ struct winreg_SecBuf {
};
/* bitmap winreg_KeyOptions */
-#define REG_OPTION_NON_VOLATILE ( 0x00000000 )
#define REG_OPTION_VOLATILE ( 0x00000001 )
#define REG_OPTION_CREATE_LINK ( 0x00000002 )
#define REG_OPTION_BACKUP_RESTORE ( 0x00000004 )
@@ -621,6 +621,17 @@ struct winreg_OpenHKPN {
struct winreg_QueryMultipleValues2 {
struct {
+ struct policy_handle *key_handle;/* [ref] */
+ uint32_t num_values;
+ uint32_t offered;
+ struct QueryMultipleValue *values;/* [ref,length_is(num_values),size_is(num_values)] */
+ uint8_t *buffer;/* [unique,length_is(offered),size_is(offered)] */
+ } in;
+
+ struct {
+ uint32_t *needed;/* [ref] */
+ struct QueryMultipleValue *values;/* [ref,length_is(num_values),size_is(num_values)] */
+ uint8_t *buffer;/* [unique,length_is(offered),size_is(offered)] */
WERROR result;
} out;