summaryrefslogtreecommitdiff
path: root/source4/lib/registry/reg_backend_gconf
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2004-05-23 14:18:08 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:53:54 -0500
commit25ed82e7ee84a069661c3dd8b0f808049ee7fa88 (patch)
tree4eeec4de4161a4ac247afabef05362ff9f383099 /source4/lib/registry/reg_backend_gconf
parentf0d7ae39c00627ebc1e43927ae5df42762e73d95 (diff)
downloadsamba-25ed82e7ee84a069661c3dd8b0f808049ee7fa88.tar.gz
samba-25ed82e7ee84a069661c3dd8b0f808049ee7fa88.tar.bz2
samba-25ed82e7ee84a069661c3dd8b0f808049ee7fa88.zip
r834: Fix gconf and dir backends
(This used to be commit fe5166ee88d401cdd493644af4876e803f546aef)
Diffstat (limited to 'source4/lib/registry/reg_backend_gconf')
-rw-r--r--source4/lib/registry/reg_backend_gconf/reg_backend_gconf.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/source4/lib/registry/reg_backend_gconf/reg_backend_gconf.c b/source4/lib/registry/reg_backend_gconf/reg_backend_gconf.c
index 8f9fd6625b..c705a2e3cb 100644
--- a/source4/lib/registry/reg_backend_gconf/reg_backend_gconf.c
+++ b/source4/lib/registry/reg_backend_gconf/reg_backend_gconf.c
@@ -41,10 +41,22 @@ static WERROR reg_close_gconf(REG_HANDLE *h)
return WERR_OK;
}
-static WERROR gconf_open_key (REG_HANDLE *h, const char *name, REG_KEY **key)
+static WERROR gconf_get_hive (REG_HANDLE *h, int hivenum, REG_KEY **key)
+{
+ if(hivenum != 0) return WERR_NO_MORE_ITEMS;
+ *key = reg_key_new_abs("", h, NULL);
+ (*key)->backend_data = talloc_strdup((*key)->mem_ctx, "/");
+ return WERR_OK;
+}
+
+static WERROR gconf_open_key (REG_HANDLE *h, int hivenum, const char *name, REG_KEY **key)
{
REG_KEY *ret;
- char *fullpath = reg_path_win2unix(strdup(name));
+ char *fullpath;
+
+ if(hivenum != 0) return WERR_NO_MORE_ITEMS;
+
+ fullpath = reg_path_win2unix(strdup(name));
/* Check if key exists */
if(!gconf_client_dir_exists((GConfClient *)h->backend_data, fullpath, NULL)) {
@@ -183,6 +195,7 @@ static struct registry_ops reg_backend_gconf = {
.name = "gconf",
.open_registry = reg_open_gconf,
.close_registry = reg_close_gconf,
+ .get_hive = gconf_get_hive,
.open_key = gconf_open_key,
.fetch_subkeys = gconf_fetch_subkeys,
.fetch_values = gconf_fetch_values,