summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2009-02-24 21:12:26 +0100
committerMichael Adam <obnox@samba.org>2009-02-26 13:22:51 +0100
commit8c1e4034fe2ac956cec3854586d3d2fcec268697 (patch)
treefc78348f1782cd7eb8a520631dc7f083292d939e /source3
parent62b53507d29b0679647f429c8d969167fe25122f (diff)
downloadsamba-8c1e4034fe2ac956cec3854586d3d2fcec268697.tar.gz
samba-8c1e4034fe2ac956cec3854586d3d2fcec268697.tar.bz2
samba-8c1e4034fe2ac956cec3854586d3d2fcec268697.zip
s3:registry: don't directly access key->subkeys->subkeys[] in reg_api.c
Use the reg_objects accessor regsubkey_ctr_specific_key() instead. Michael
Diffstat (limited to 'source3')
-rw-r--r--source3/registry/reg_api.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/source3/registry/reg_api.c b/source3/registry/reg_api.c
index 06796a7fd0..6e0e342dba 100644
--- a/source3/registry/reg_api.c
+++ b/source3/registry/reg_api.c
@@ -312,7 +312,9 @@ WERROR reg_enumkey(TALLOC_CTX *mem_ctx, struct registry_key *key,
return WERR_NO_MORE_ITEMS;
}
- if (!(*name = talloc_strdup(mem_ctx, key->subkeys->subkeys[idx]))) {
+ if (!(*name = talloc_strdup(mem_ctx,
+ regsubkey_ctr_specific_key(key->subkeys, idx))))
+ {
return WERR_NOMEM;
}
@@ -407,7 +409,8 @@ WERROR reg_queryinfokey(struct registry_key *key, uint32_t *num_subkeys,
max_len = 0;
for (i=0; i< regsubkey_ctr_numkeys(key->subkeys); i++) {
- max_len = MAX(max_len, strlen(key->subkeys->subkeys[i]));
+ max_len = MAX(max_len,
+ strlen(regsubkey_ctr_specific_key(key->subkeys, i)));
}
*num_subkeys = regsubkey_ctr_numkeys(key->subkeys);