summaryrefslogtreecommitdiff
path: root/source4/lib/registry/reg_backend_gconf
diff options
context:
space:
mode:
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,