diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2004-04-12 17:43:22 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:51:15 -0500 |
commit | 49d54f0298de9dcee8d0fcb7e193429b80a8c8b1 (patch) | |
tree | 9cd55409f86c354957721403c5896c01c1ca8510 /source4/lib/registry/common/reg_interface.c | |
parent | 24cd656ab0cd6501e321661883ae564c8d548298 (diff) | |
download | samba-49d54f0298de9dcee8d0fcb7e193429b80a8c8b1.tar.gz samba-49d54f0298de9dcee8d0fcb7e193429b80a8c8b1.tar.bz2 samba-49d54f0298de9dcee8d0fcb7e193429b80a8c8b1.zip |
r181: Parsing windows '95 registry files now works (including values)
(This used to be commit 4d6ce648567060b9922343971d7aafd545341439)
Diffstat (limited to 'source4/lib/registry/common/reg_interface.c')
-rw-r--r-- | source4/lib/registry/common/reg_interface.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/source4/lib/registry/common/reg_interface.c b/source4/lib/registry/common/reg_interface.c index 917b03cf32..696a504d87 100644 --- a/source4/lib/registry/common/reg_interface.c +++ b/source4/lib/registry/common/reg_interface.c @@ -268,7 +268,10 @@ WERROR reg_key_get_subkey_by_index(REG_KEY *key, int idx, REG_KEY **subkey) { if(!key) return WERR_INVALID_PARAM; - if(!key->handle->functions->get_subkey_by_index) { + if(key->handle->functions->get_subkey_by_index) { + WERROR status = key->handle->functions->get_subkey_by_index(key, idx, subkey); + if(!NT_STATUS_IS_OK(status)) return status; + } else if(key->handle->functions->fetch_subkeys) { if(!key->cache_subkeys) key->handle->functions->fetch_subkeys(key, &key->cache_subkeys_count, &key->cache_subkeys); @@ -278,8 +281,7 @@ WERROR reg_key_get_subkey_by_index(REG_KEY *key, int idx, REG_KEY **subkey) return WERR_NO_MORE_ITEMS; } } else { - WERROR status = key->handle->functions->get_subkey_by_index(key, idx, subkey); - if(!NT_STATUS_IS_OK(status)) return status; + return WERR_NOT_SUPPORTED; } (*subkey)->path = talloc_asprintf((*subkey)->mem_ctx, "%s%s%s", key->path, key->path[strlen(key->path)-1] == '\\'?"":"\\", (*subkey)->name); |