diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2004-10-29 01:10:40 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:04:58 -0500 |
commit | 7ce7137ad4edb03acf6189568d4c3c4f6d8798fe (patch) | |
tree | c4df8f4525c7cfc671e336bed7ede0bbc7704808 /source4/lib/registry/reg_backend_gconf | |
parent | 10ae6167651bc4fe3169c6c4086eef4920b0d739 (diff) | |
download | samba-7ce7137ad4edb03acf6189568d4c3c4f6d8798fe.tar.gz samba-7ce7137ad4edb03acf6189568d4c3c4f6d8798fe.tar.bz2 samba-7ce7137ad4edb03acf6189568d4c3c4f6d8798fe.zip |
r3348: More registry fixes and additions. The following functions work right now against samba 4, at least with a ldb backend:
winreg_Open*
winreg_OpenKey
winreg_EnumKey
winreg_DeleteKey
winreg_CreateKey
(This used to be commit a71d51dd3b136a1bcde1704fe9830985e06bb01b)
Diffstat (limited to 'source4/lib/registry/reg_backend_gconf')
-rw-r--r-- | source4/lib/registry/reg_backend_gconf/reg_backend_gconf.c | 10 |
1 files changed, 4 insertions, 6 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 d8c8d951c1..4f8cc5466e 100644 --- a/source4/lib/registry/reg_backend_gconf/reg_backend_gconf.c +++ b/source4/lib/registry/reg_backend_gconf/reg_backend_gconf.c @@ -35,8 +35,8 @@ static WERROR reg_open_gconf_hive(TALLOC_CTX *mem_ctx, struct registry_hive *h, if(!h->backend_data) return WERR_FOOBAR; *k = talloc_p(mem_ctx, struct registry_key); - (*k)->name = ""; - (*k)->path = ""; + (*k)->name = talloc_strdup(mem_ctx, ""); + (*k)->path = talloc_strdup(mem_ctx, ""); (*k)->backend_data = talloc_strdup(mem_ctx, "/"); return WERR_OK; } @@ -46,17 +46,15 @@ static WERROR gconf_open_key (TALLOC_CTX *mem_ctx, struct registry_hive *h, cons struct registry_key *ret; char *fullpath; - fullpath = reg_path_win2unix(strdup(name)); + fullpath = talloc_asprintf(mem_ctx, "/%s", reg_path_win2unix(talloc_strdup(mem_ctx, name))); /* Check if key exists */ if(!gconf_client_dir_exists((GConfClient *)h->backend_data, fullpath, NULL)) { - SAFE_FREE(fullpath); return WERR_DEST_NOT_FOUND; } ret = talloc_p(mem_ctx, struct registry_key); - ret->backend_data = talloc_strdup(mem_ctx, fullpath); - SAFE_FREE(fullpath); + ret->backend_data = fullpath; *key = ret; return WERR_OK; |