summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/lib/registry/reg_backend_rpc.c14
-rw-r--r--source4/librpc/idl/winreg.idl24
-rw-r--r--source4/rpc_server/winreg/rpc_winreg.c14
-rw-r--r--source4/torture/rpc/winreg.c8
4 files changed, 30 insertions, 30 deletions
diff --git a/source4/lib/registry/reg_backend_rpc.c b/source4/lib/registry/reg_backend_rpc.c
index 8e70998778..5e0cf303e0 100644
--- a/source4/lib/registry/reg_backend_rpc.c
+++ b/source4/lib/registry/reg_backend_rpc.c
@@ -152,7 +152,7 @@ static WERROR rpc_open_key(TALLOC_CTX *mem_ctx, const struct registry_key *h, co
/* Then, open the handle using the hive */
memset(&r, 0, sizeof(struct winreg_OpenKey));
- r.in.handle = &(((struct rpc_key_data *)h->backend_data)->pol);
+ r.in.parent_handle = &(((struct rpc_key_data *)h->backend_data)->pol);
init_winreg_String(&r.in.keyname, name);
r.in.unknown = 0x00000000;
r.in.access_mask = 0x02000000;
@@ -230,7 +230,7 @@ static WERROR rpc_get_subkey_by_index(TALLOC_CTX *mem_ctx, const struct registry
r.in.handle = &mykeydata->pol;
r.in.enum_index = n;
r.in.name = &namebuf;
- r.in.class = &classbuf;
+ r.in.keyclass = &classbuf;
r.in.last_changed_time = &change_time;
r.out.name = &namebuf;
@@ -249,7 +249,7 @@ static WERROR rpc_add_key(TALLOC_CTX *mem_ctx, const struct registry_key *parent
struct winreg_CreateKey r;
init_winreg_String(&r.in.name, name);
- init_winreg_String(&r.in.class, NULL);
+ init_winreg_String(&r.in.keyclass, NULL);
r.in.handle = parent->backend_data;
r.out.new_handle = talloc(mem_ctx, struct policy_handle);
@@ -292,10 +292,10 @@ static WERROR rpc_query_key(const struct registry_key *k)
}
if (W_ERROR_IS_OK(r.out.result)) {
- mykeydata->num_subkeys = r.out.num_subkeys;
- mykeydata->num_values = r.out.num_values;
- mykeydata->max_valnamelen = r.out.max_valnamelen;
- mykeydata->max_valdatalen = r.out.max_valbufsize;
+ mykeydata->num_subkeys = *r.out.num_subkeys;
+ mykeydata->num_values = *r.out.num_values;
+ mykeydata->max_valnamelen = *r.out.max_valnamelen;
+ mykeydata->max_valdatalen = *r.out.max_valbufsize;
}
return r.out.result;
diff --git a/source4/librpc/idl/winreg.idl b/source4/librpc/idl/winreg.idl
index ab2f94883d..cbe60a96ba 100644
--- a/source4/librpc/idl/winreg.idl
+++ b/source4/librpc/idl/winreg.idl
@@ -109,7 +109,7 @@
WERROR winreg_CreateKey(
[in,ref] policy_handle *handle,
[in] winreg_String name,
- [in] winreg_String class,
+ [in] winreg_String keyclass,
[in] uint32 options,
[in] winreg_AccessMask access_mask,
[in,unique] winreg_SecBuf *secdesc,
@@ -144,7 +144,7 @@
[in,ref] policy_handle *handle,
[in] uint32 enum_index,
[in,out,ref] winreg_StringBuf *name,
- [in,out,unique] winreg_StringBuf *class,
+ [in,out,unique] winreg_StringBuf *keyclass,
[in,out,unique] NTTIME *last_changed_time
);
@@ -198,7 +198,7 @@
/******************/
/* Function: 0x0f */
WERROR winreg_OpenKey(
- [in,ref] policy_handle *handle,
+ [in,ref] policy_handle *parent_handle,
[in] winreg_String keyname,
[in] uint32 unknown,
[in] winreg_AccessMask access_mask,
@@ -211,14 +211,14 @@
[in,ref] policy_handle *handle,
[in] winreg_String class_in,
[out] winreg_String *class_out,
- [out] uint32 num_subkeys,
- [out] uint32 max_subkeylen,
- [out] uint32 max_subkeysize,
- [out] uint32 num_values,
- [out] uint32 max_valnamelen,
- [out] uint32 max_valbufsize,
- [out] uint32 secdescsize,
- [out] NTTIME last_changed_time
+ [out] uint32 *num_subkeys,
+ [out] uint32 *max_subkeylen,
+ [out] uint32 *max_subkeysize,
+ [out] uint32 *num_values,
+ [out] uint32 *max_valnamelen,
+ [out] uint32 *max_valbufsize,
+ [out] uint32 *secdescsize,
+ [out] NTTIME *last_changed_time
);
/******************/
@@ -290,7 +290,7 @@
/* Function: 0x1a */
WERROR winreg_GetVersion(
[in,ref] policy_handle *handle,
- [out] uint32 version
+ [out] uint32 *version
);
/******************/
diff --git a/source4/rpc_server/winreg/rpc_winreg.c b/source4/rpc_server/winreg/rpc_winreg.c
index 17e711e235..86a78a5e9e 100644
--- a/source4/rpc_server/winreg/rpc_winreg.c
+++ b/source4/rpc_server/winreg/rpc_winreg.c
@@ -186,7 +186,7 @@ static WERROR winreg_EnumKey(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem
}
r->out.name->length = 2*strlen_m_term(key->name);
r->out.name->name = key->name;
- r->out.class = talloc_zero(mem_ctx, struct winreg_StringBuf);
+ r->out.keyclass = talloc_zero(mem_ctx, struct winreg_StringBuf);
if (r->in.last_changed_time) {
r->out.last_changed_time = &key->last_mod;
}
@@ -310,7 +310,7 @@ static WERROR winreg_OpenKey(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem
struct dcesrv_handle *h, *newh;
WERROR result;
- DCESRV_PULL_HANDLE_FAULT(h, r->in.handle, HTYPE_REGKEY);
+ DCESRV_PULL_HANDLE_FAULT(h, r->in.parent_handle, HTYPE_REGKEY);
if (r->in.keyname.name && strcmp(r->in.keyname.name, "") == 0) {
newh = talloc_reference(dce_call->context, h);
@@ -345,22 +345,22 @@ static WERROR winreg_QueryInfoKey(struct dcesrv_call_state *dce_call, TALLOC_CTX
k = h->data;
- ret = reg_key_num_subkeys(k, &r->out.num_subkeys);
+ ret = reg_key_num_subkeys(k, r->out.num_subkeys);
if (!W_ERROR_IS_OK(ret)) {
return ret;
}
- ret = reg_key_num_values(k, &r->out.num_values);
+ ret = reg_key_num_values(k, r->out.num_values);
if (!W_ERROR_IS_OK(ret)) {
return ret;
}
- ret = reg_key_subkeysizes(k, &r->out.max_subkeysize, &r->out.max_subkeylen);
+ ret = reg_key_subkeysizes(k, r->out.max_subkeysize, r->out.max_subkeylen);
if (!W_ERROR_IS_OK(ret)) {
return ret;
}
- ret = reg_key_valuesizes(k, &r->out.max_valnamelen, &r->out.max_valbufsize);
+ ret = reg_key_valuesizes(k, r->out.max_valnamelen, r->out.max_valbufsize);
if (!W_ERROR_IS_OK(ret)) {
return ret;
}
@@ -523,7 +523,7 @@ static WERROR winreg_GetVersion(struct dcesrv_call_state *dce_call, TALLOC_CTX *
DCESRV_PULL_HANDLE_FAULT(h, r->in.handle, HTYPE_REGKEY);
- r->out.version = 5;
+ *r->out.version = 5;
return WERR_OK;
}
diff --git a/source4/torture/rpc/winreg.c b/source4/torture/rpc/winreg.c
index 35f9b20181..025411f3bd 100644
--- a/source4/torture/rpc/winreg.c
+++ b/source4/torture/rpc/winreg.c
@@ -118,7 +118,7 @@ static BOOL test_CreateKey(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
r.in.handle = handle;
r.out.new_handle = &newhandle;
init_winreg_String(&r.in.name, name);
- init_winreg_String(&r.in.class, class);
+ init_winreg_String(&r.in.keyclass, class);
r.in.options = 0x0;
r.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED;
r.in.action_taken = r.out.action_taken = &action_taken;
@@ -180,7 +180,7 @@ static BOOL test_CreateKey_sd(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
r.in.handle = handle;
r.out.new_handle = newhandle;
init_winreg_String(&r.in.name, name);
- init_winreg_String(&r.in.class, class);
+ init_winreg_String(&r.in.keyclass, class);
r.in.options = 0x0;
r.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED;
r.in.action_taken = r.out.action_taken = &action_taken;
@@ -305,7 +305,7 @@ static BOOL test_OpenKey(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
printf("\ntesting OpenKey\n");
- r.in.handle = hive_handle;
+ r.in.parent_handle = hive_handle;
init_winreg_String(&r.in.keyname, keyname);
r.in.unknown = 0x00000000;
r.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED;
@@ -412,7 +412,7 @@ static BOOL test_EnumKey(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
r.in.handle = handle;
r.in.enum_index = 0;
r.in.name = &name;
- r.in.class = &class;
+ r.in.keyclass = &class;
r.out.name = &name;
r.in.last_changed_time = &t;