summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2012-04-23 16:07:21 +0200
committerAndreas Schneider <asn@samba.org>2012-04-25 14:31:12 +0200
commit4b7817aa80c3ea4efe47da91cf71c25e1afc6a6b (patch)
treeb4239ef488c07aaf6bd8cc900ae07305ad5a3c14 /source3
parentbe2cb08e405036532c97e3f7dc50607582c0daeb (diff)
downloadsamba-4b7817aa80c3ea4efe47da91cf71c25e1afc6a6b.tar.gz
samba-4b7817aa80c3ea4efe47da91cf71c25e1afc6a6b.tar.bz2
samba-4b7817aa80c3ea4efe47da91cf71c25e1afc6a6b.zip
s3:registry: use fill_subkey_cache to check exsistence in regkey_open_onelevel().
Pair-Programmed-With: Gregor Beck <gbeck@sernet.de> Signed-off-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'source3')
-rw-r--r--source3/registry/reg_api.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/source3/registry/reg_api.c b/source3/registry/reg_api.c
index f5fea0741b..63cd60f6cc 100644
--- a/source3/registry/reg_api.c
+++ b/source3/registry/reg_api.c
@@ -138,7 +138,6 @@ static WERROR regkey_open_onelevel(TALLOC_CTX *mem_ctx,
WERROR result = WERR_OK;
struct registry_key *regkey;
struct registry_key_handle *key;
- struct regsubkey_ctr *subkeys = NULL;
DEBUG(7,("regkey_open_onelevel: name = [%s]\n", name));
@@ -204,21 +203,13 @@ static WERROR regkey_open_onelevel(TALLOC_CTX *mem_ctx,
goto done;
}
- /* check if the path really exists; failed is indicated by -1 */
- /* if the subkey count failed, bail out */
+ /* FIXME: Existence is currently checked by fetching the subkeys */
- result = regsubkey_ctr_init(key, &subkeys);
+ result = fill_subkey_cache(regkey);
if (!W_ERROR_IS_OK(result)) {
goto done;
}
- if ( fetch_reg_keys( key, subkeys ) == -1 ) {
- result = WERR_BADFILE;
- goto done;
- }
-
- TALLOC_FREE( subkeys );
-
if ( !regkey_access_check( key, access_desired, &key->access_granted,
token ) ) {
result = WERR_ACCESS_DENIED;