diff options
-rw-r--r-- | source3/librpc/idl/winreg.idl | 6 | ||||
-rw-r--r-- | source4/lib/registry/rpc.c | 2 | ||||
-rw-r--r-- | source4/librpc/idl/winreg.idl | 8 | ||||
-rw-r--r-- | source4/rpc_server/winreg/rpc_winreg.c | 14 | ||||
-rw-r--r-- | source4/torture/ndr/winreg.c | 10 | ||||
-rw-r--r-- | source4/torture/rpc/winreg.c | 7 |
6 files changed, 24 insertions, 23 deletions
diff --git a/source3/librpc/idl/winreg.idl b/source3/librpc/idl/winreg.idl index ba9e935640..dc4b1bafa8 100644 --- a/source3/librpc/idl/winreg.idl +++ b/source3/librpc/idl/winreg.idl @@ -2,7 +2,7 @@ winreg interface definition */ -import "lsa.idl", "initshutdown.idl", "security.idl"; +import "lsa.idl", "security.idl"; [ uuid("338cd001-2244-31f1-aaaa-900038001003"), @@ -251,9 +251,9 @@ import "lsa.idl", "initshutdown.idl", "security.idl"; [in,ref] policy_handle *handle, [in,ref] winreg_String *value_name, [in,out,unique] winreg_Type *type, - [in,out,unique,size_is(*data_size),length_is(*value_length)] uint8 *data, + [in,out,unique,size_is(*data_size),length_is(*data_length)] uint8 *data, [in,out,unique] uint32 *data_size, - [in,out,unique] uint32 *value_length + [in,out,unique] uint32 *data_length ); /******************/ diff --git a/source4/lib/registry/rpc.c b/source4/lib/registry/rpc.c index 6429a390db..6563fe02b0 100644 --- a/source4/lib/registry/rpc.c +++ b/source4/lib/registry/rpc.c @@ -260,7 +260,7 @@ static WERROR rpc_get_value_by_name(TALLOC_CTX *mem_ctx, ZERO_STRUCT(r); r.in.handle = &mykeydata->pol; - r.in.value_name = name; + r.in.value_name = &name; r.in.type = type; r.in.data = &value; r.in.size = &val_size; diff --git a/source4/librpc/idl/winreg.idl b/source4/librpc/idl/winreg.idl index dfa0f654d0..643dc9e458 100644 --- a/source4/librpc/idl/winreg.idl +++ b/source4/librpc/idl/winreg.idl @@ -240,11 +240,11 @@ import "lsa.idl", "security.idl"; /* Function: 0x11 */ [public] WERROR winreg_QueryValue( [in,ref] policy_handle *handle, - [in] winreg_String value_name, + [in,ref] winreg_String *value_name, [in,out,unique] winreg_Type *type, - [in,out,unique,size_is(*size),length_is(*length)] uint8 *data, - [in,out,unique] uint32 *size, - [in,out,unique] uint32 *length + [in,out,unique,size_is(*data_size),length_is(*data_length)] uint8 *data, + [in,out,unique] uint32 *data_size, + [in,out,unique] uint32 *data_length ); /******************/ diff --git a/source4/rpc_server/winreg/rpc_winreg.c b/source4/rpc_server/winreg/rpc_winreg.c index 22c60c354c..e295634c62 100644 --- a/source4/rpc_server/winreg/rpc_winreg.c +++ b/source4/rpc_server/winreg/rpc_winreg.c @@ -457,7 +457,7 @@ static WERROR dcesrv_winreg_QueryValue(struct dcesrv_call_state *dce_call, case SECURITY_USER: key = h->data; - result = reg_key_get_value_by_name(mem_ctx, key, r->in.value_name.name, + result = reg_key_get_value_by_name(mem_ctx, key, r->in.value_name->name, &value_type, &value_data); if (!W_ERROR_IS_OK(result)) { @@ -470,16 +470,16 @@ static WERROR dcesrv_winreg_QueryValue(struct dcesrv_call_state *dce_call, return WERR_NOMEM; } *r->out.type = value_type; - r->out.length = talloc(mem_ctx, uint32_t); - if (!r->out.length) { + r->out.data_length = talloc(mem_ctx, uint32_t); + if (!r->out.data_length) { return WERR_NOMEM; } - *r->out.length = value_data.length; + *r->out.data_length = value_data.length; if (r->in.data == NULL) { - r->out.size = talloc(mem_ctx, uint32_t); - *r->out.size = value_data.length; + r->out.data_size = talloc(mem_ctx, uint32_t); + *r->out.data_size = value_data.length; } else { - r->out.size = r->in.size; + r->out.data_size = r->in.data_size; r->out.data = value_data.data; } diff --git a/source4/torture/ndr/winreg.c b/source4/torture/ndr/winreg.c index ab256a7152..60a3230d25 100644 --- a/source4/torture/ndr/winreg.c +++ b/source4/torture/ndr/winreg.c @@ -197,10 +197,10 @@ static const uint8_t queryvalue_in_data[] = { static bool queryvalue_in_check(struct torture_context *tctx, struct winreg_QueryValue *r) { - torture_assert_str_equal(tctx, r->in.value_name.name, "HOMEPATH", "name"); + torture_assert_str_equal(tctx, r->in.value_name->name, "HOMEPATH", "name"); torture_assert_int_equal(tctx, *r->in.type, 0, "type"); - torture_assert_int_equal(tctx, *r->in.size, 4095, "size"); - torture_assert_int_equal(tctx, *r->in.length, 0, "length"); + torture_assert_int_equal(tctx, *r->in.data_size, 4095, "size"); + torture_assert_int_equal(tctx, *r->in.data_length, 0, "length"); torture_assert(tctx, r->in.data == NULL, "data pointer"); return true; @@ -218,8 +218,8 @@ static bool queryvalue_out_check(struct torture_context *tctx, torture_assert_werr_ok(tctx, r->out.result, "return code"); torture_assert_int_equal(tctx, *r->out.type, 1, "type"); torture_assert(tctx, r->out.data == NULL, "data pointer"); - torture_assert_int_equal(tctx, *r->out.size, 76, "size"); - torture_assert_int_equal(tctx, *r->out.length, 0, "length"); + torture_assert_int_equal(tctx, *r->out.data_size, 76, "size"); + torture_assert_int_equal(tctx, *r->out.data_length, 0, "length"); return true; } diff --git a/source4/torture/rpc/winreg.c b/source4/torture/rpc/winreg.c index aa81aa011b..bd897f0ada 100644 --- a/source4/torture/rpc/winreg.c +++ b/source4/torture/rpc/winreg.c @@ -1539,10 +1539,11 @@ static bool test_QueryValue(struct dcerpc_pipe *p, ZERO_STRUCT(r); r.in.handle = handle; r.in.data = NULL; - r.in.value_name.name = valuename; + r.in.value_name = talloc_zero(tctx, struct winreg_String); + r.in.value_name->name = valuename; r.in.type = &zero_type; - r.in.size = &offered; - r.in.length = &zero; + r.in.data_size = &offered; + r.in.data_length = &zero; status = dcerpc_winreg_QueryValue(p, tctx, &r); if (NT_STATUS_IS_ERR(status)) { |