diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2004-12-10 22:28:49 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:06:30 -0500 |
commit | a9fa37d6187eb0d0a074fec2ecffe2915b701188 (patch) | |
tree | 35f08289b3648b80c16580c1d93c0057705845e8 /source4/lib/registry/reg_backend_gconf.c | |
parent | 9f9e9b6477c4037372f871495abe7b81f15fb58c (diff) | |
download | samba-a9fa37d6187eb0d0a074fec2ecffe2915b701188.tar.gz samba-a9fa37d6187eb0d0a074fec2ecffe2915b701188.tar.bz2 samba-a9fa37d6187eb0d0a074fec2ecffe2915b701188.zip |
r4137: Make *_open_key take a registry_key instead of a hive (more efficient
in some cases)
(This used to be commit ddf7a331c58976f2c0b4a00390118f1acf60e3eb)
Diffstat (limited to 'source4/lib/registry/reg_backend_gconf.c')
-rw-r--r-- | source4/lib/registry/reg_backend_gconf.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/source4/lib/registry/reg_backend_gconf.c b/source4/lib/registry/reg_backend_gconf.c index 2fed2417b7..b53d0fedf5 100644 --- a/source4/lib/registry/reg_backend_gconf.c +++ b/source4/lib/registry/reg_backend_gconf.c @@ -42,15 +42,18 @@ static WERROR reg_open_gconf_hive(struct registry_hive *h, struct registry_key * return WERR_OK; } -static WERROR gconf_open_key (TALLOC_CTX *mem_ctx, struct registry_hive *h, const char *name, struct registry_key **key) +static WERROR gconf_open_key (TALLOC_CTX *mem_ctx, struct registry_key *h, const char *name, struct registry_key **key) { struct registry_key *ret; char *fullpath; - fullpath = talloc_asprintf(mem_ctx, "/%s", reg_path_win2unix(talloc_strdup(mem_ctx, name))); + fullpath = talloc_asprintf(mem_ctx, "%s%s%s", + (char *)h->backend_data, + strlen((char *)h->backend_data) == 1?"":"/", + reg_path_win2unix(talloc_strdup(mem_ctx, name))); /* Check if key exists */ - if(!gconf_client_dir_exists((GConfClient *)h->backend_data, fullpath, NULL)) { + if(!gconf_client_dir_exists((GConfClient *)h->hive->backend_data, fullpath, NULL)) { return WERR_DEST_NOT_FOUND; } |