diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2004-05-22 18:49:25 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:53:53 -0500 |
commit | bf52e242f53aeaac33eea69fbdfb3477634b90fb (patch) | |
tree | 76b04dc95e3e7befd45180a661cd7f55d085701e /source4/lib/registry/reg_backend_dir | |
parent | 4e9d01c2a7cd044ac4b466a1039c9a7e3978d6ef (diff) | |
download | samba-bf52e242f53aeaac33eea69fbdfb3477634b90fb.tar.gz samba-bf52e242f53aeaac33eea69fbdfb3477634b90fb.tar.bz2 samba-bf52e242f53aeaac33eea69fbdfb3477634b90fb.zip |
r825: - Introduce support for multiple roots (or 'hives')
- Clean up rpc backend (possible now that multiple hives are supported)
(This used to be commit 8cd1b6bc70510fe576135a66351e9e3ea895c9ff)
Diffstat (limited to 'source4/lib/registry/reg_backend_dir')
-rw-r--r-- | source4/lib/registry/reg_backend_dir/reg_backend_dir.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/source4/lib/registry/reg_backend_dir/reg_backend_dir.c b/source4/lib/registry/reg_backend_dir/reg_backend_dir.c index 517324fdd2..cb61864d0c 100644 --- a/source4/lib/registry/reg_backend_dir/reg_backend_dir.c +++ b/source4/lib/registry/reg_backend_dir/reg_backend_dir.c @@ -38,16 +38,22 @@ static WERROR reg_dir_del_key(REG_KEY *k) return (rmdir((char *)k->backend_data) == 0)?WERR_OK:WERR_GENERAL_FAILURE; } -static WERROR reg_dir_open_key(REG_HANDLE *h, const char *name, REG_KEY **subkey) +static WERROR reg_dir_open_key(REG_HANDLE *h, int hive, const char *name, REG_KEY **subkey) { DIR *d; char *fullpath; REG_KEY *ret; - TALLOC_CTX *mem_ctx = talloc_init("tmp"); + TALLOC_CTX *mem_ctx; + + if(hive != 0) return WERR_NO_MORE_ITEMS; + if(!name) { DEBUG(0, ("NULL pointer passed as directory name!")); return WERR_INVALID_PARAM; } + + + mem_ctx = talloc_init("tmp"); fullpath = talloc_asprintf(mem_ctx, "%s%s", h->location, name); fullpath = reg_path_win2unix(fullpath); |