diff options
author | Gerald Carter <jerry@samba.org> | 2002-07-20 02:42:04 +0000 |
---|---|---|
committer | Gerald Carter <jerry@samba.org> | 2002-07-20 02:42:04 +0000 |
commit | 2050859f03493d5135984ce1e42baf8f1f2566b9 (patch) | |
tree | 492c559100f0e5d0fc8a6aec99b5179da75c01be /source/registry/reg_cachehook.c | |
parent | 432b9f8d7c20fbf3b2a0906c8a93272abbe43fb6 (diff) | |
download | samba-2050859f03493d5135984ce1e42baf8f1f2566b9.tar.gz samba-2050859f03493d5135984ce1e42baf8f1f2566b9.tar.xz samba-2050859f03493d5135984ce1e42baf8f1f2566b9.zip |
fixed a logic error in the sorted_tree_find_child() routine
that caused a valid search to fail. The printing registry
view now works again.
Diffstat (limited to 'source/registry/reg_cachehook.c')
-rw-r--r-- | source/registry/reg_cachehook.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/registry/reg_cachehook.c b/source/registry/reg_cachehook.c index e2444d8d17e..2139fa70668 100644 --- a/source/registry/reg_cachehook.c +++ b/source/registry/reg_cachehook.c @@ -74,6 +74,8 @@ REGISTRY_HOOK* reghook_cache_find( char *keyname ) if ( !keyname ) return NULL; + /* prepend the string with a '\' character */ + len = strlen( keyname ); if ( !(key = malloc( len + 2 )) ) { DEBUG(0,("reghook_cache_find: malloc failed for string [%s] !?!?!\n", @@ -84,6 +86,8 @@ REGISTRY_HOOK* reghook_cache_find( char *keyname ) *key = '\\'; strncpy( key+1, keyname, len+1); + /* swap to a form understood by the SORTED_TREE */ + string_sub( key, "\\", "/", 0 ); DEBUG(10,("reghook_cache_find: Searching for keyname [%s]\n", key)); |