diff options
author | Volker Lendecke <vlendec@samba.org> | 2006-11-23 22:58:50 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:16:03 -0500 |
commit | 015534e254797eb114f1a3bc747b666d8bd65a2e (patch) | |
tree | fd2e142251edb7f01730dab2c7892c710cb62f82 /source3/registry | |
parent | 3f62a1a3eb17b190aa12540304c72028adb66fba (diff) | |
download | samba-015534e254797eb114f1a3bc747b666d8bd65a2e.tar.gz samba-015534e254797eb114f1a3bc747b666d8bd65a2e.tar.bz2 samba-015534e254797eb114f1a3bc747b666d8bd65a2e.zip |
r19872: Move the value cache to srv_winreg_nt.c. Fix some minor issues found while
playing with regedit.exe.
Volker
(This used to be commit 81bd816fa2afe89261aff2f395e8d056b73e515c)
Diffstat (limited to 'source3/registry')
-rw-r--r-- | source3/registry/reg_frontend.c | 54 |
1 files changed, 0 insertions, 54 deletions
diff --git a/source3/registry/reg_frontend.c b/source3/registry/reg_frontend.c index 1c8859982d..b361359985 100644 --- a/source3/registry/reg_frontend.c +++ b/source3/registry/reg_frontend.c @@ -321,60 +321,6 @@ NTSTATUS registry_fetch_values(TALLOC_CTX *mem_ctx, REGISTRY_KEY *key, } /*********************************************************************** - retreive a specific subkey specified by index. Caller is - responsible for freeing memory - ***********************************************************************/ - -BOOL fetch_reg_values_specific( REGISTRY_KEY *key, REGISTRY_VALUE **val, uint32 val_index ) -{ - static REGVAL_CTR *ctr = NULL; - static pstring save_path; - REGISTRY_VALUE *v; - - *val = NULL; - - /* simple caching for performance; very basic heuristic */ - - if ( !ctr ) { - DEBUG(8,("fetch_reg_values_specific: Initializing cache of values for [%s]\n", key->name)); - - if ( !(ctr = TALLOC_ZERO_P( NULL, REGVAL_CTR )) ) { - DEBUG(0,("fetch_reg_values_specific: talloc() failed!\n")); - return False; - } - - pstrcpy( save_path, key->name ); - - if ( fetch_reg_values( key, ctr) == -1 ) - return False; - } - /* clear the cache when val_index == 0 or the path has changed */ - else if ( !val_index || !strequal(save_path, key->name) ) { - - DEBUG(8,("fetch_reg_values_specific: Updating cache of values for [%s]\n", key->name)); - - TALLOC_FREE( ctr ); - - if ( !(ctr = TALLOC_ZERO_P( NULL, REGVAL_CTR )) ) { - DEBUG(0,("fetch_reg_values_specific: talloc() failed!\n")); - return False; - } - - pstrcpy( save_path, key->name ); - - if ( fetch_reg_values( key, ctr) == -1 ) - return False; - } - - if ( !(v = regval_ctr_specific_value( ctr, val_index )) ) - return False; - - *val = dup_registry_value( v ); - - return True; -} - -/*********************************************************************** High level access check for passing the required access mask to the underlying registry backend ***********************************************************************/ |