summaryrefslogtreecommitdiff
path: root/source4/lib/registry/reg_backend_rpc
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2004-04-05 09:17:11 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:50:40 -0500
commit69c19afb6226e93a244490fa582200364a3b7069 (patch)
treefcc1c040cfc6dd878a7f193d568730f264198912 /source4/lib/registry/reg_backend_rpc
parentb087ed482115520a6c18e9a1c02accce0014d80f (diff)
downloadsamba-69c19afb6226e93a244490fa582200364a3b7069.tar.gz
samba-69c19afb6226e93a244490fa582200364a3b7069.tar.bz2
samba-69c19afb6226e93a244490fa582200364a3b7069.zip
r31: More registry updates. regdiff/regpatch work now.
(This used to be commit 98224f5436695eb265f5d997cf4bc9cf735a4fb9)
Diffstat (limited to 'source4/lib/registry/reg_backend_rpc')
-rw-r--r--source4/lib/registry/reg_backend_rpc/reg_backend_rpc.c25
1 files changed, 12 insertions, 13 deletions
diff --git a/source4/lib/registry/reg_backend_rpc/reg_backend_rpc.c b/source4/lib/registry/reg_backend_rpc/reg_backend_rpc.c
index 7e8ad9bf48..796d957076 100644
--- a/source4/lib/registry/reg_backend_rpc/reg_backend_rpc.c
+++ b/source4/lib/registry/reg_backend_rpc/reg_backend_rpc.c
@@ -230,9 +230,8 @@ static BOOL rpc_fetch_subkeys(REG_KEY *parent, int *count, REG_KEY ***subkeys)
static BOOL rpc_fetch_values(REG_KEY *parent, int *count, REG_VAL ***values)
{
struct winreg_EnumValue r;
- struct winreg_EnumValueName name;
struct winreg_Uint8buf value;
- struct winreg_Uint16buf buf;
+ struct winreg_String valuename;
struct rpc_data *mydata = parent->handle->backend_data;
TALLOC_CTX *mem_ctx;
uint32 type, requested_len, returned_len;
@@ -241,6 +240,12 @@ static BOOL rpc_fetch_values(REG_KEY *parent, int *count, REG_VAL ***values)
(*count) = 0;
+ /* Root */
+ if(parent->backend_data == parent->handle->backend_data) {
+ *values = ar;
+ return True;
+ }
+
if(!parent->backend_data) parent->backend_data = rpc_get_key_handle(parent->handle, reg_key_get_path(parent));
if(!parent->backend_data) return False;
@@ -248,16 +253,8 @@ static BOOL rpc_fetch_values(REG_KEY *parent, int *count, REG_VAL ***values)
r.in.handle = parent->backend_data;
r.in.enum_index = 0;
- buf.max_len = 0x7fff;
- buf.offset = 0;
- buf.len = 0;
- buf.buffer = NULL;
-
- name.len = 0;
- name.max_len = buf.max_len *2;
- name.buf = &buf;
-
- r.in.name = r.out.name = &name;
+ init_winreg_String(&valuename, NULL);
+ r.in.name = r.out.name = &valuename;
type = 0;
r.in.type = r.out.type = &type;
@@ -280,7 +277,7 @@ static BOOL rpc_fetch_values(REG_KEY *parent, int *count, REG_VAL ***values)
if(NT_STATUS_IS_OK(status) && W_ERROR_IS_OK(r.out.result)) {
r.in.enum_index++;
ar[(*count)] = reg_val_new(parent, NULL);
- ar[(*count)]->name = strdup((char *)name.buf);
+ ar[(*count)]->name = strdup(r.out.name->name);
ar[(*count)]->data_type = *r.out.type;
ar[(*count)]->data_len = value.len;
ar[(*count)]->data_blk = malloc(value.len);
@@ -292,6 +289,8 @@ static BOOL rpc_fetch_values(REG_KEY *parent, int *count, REG_VAL ***values)
talloc_destroy(mem_ctx);
+ *values = ar;
+
return True;
}