From 49d54f0298de9dcee8d0fcb7e193429b80a8c8b1 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 12 Apr 2004 17:43:22 +0000 Subject: r181: Parsing windows '95 registry files now works (including values) (This used to be commit 4d6ce648567060b9922343971d7aafd545341439) --- source4/lib/registry/common/reg_interface.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'source4/lib/registry/common') 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); -- cgit