From a23e96316ebf5086a27365d4a9fb63b0e4533f6f Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Fri, 26 Jul 2002 22:40:06 +0000 Subject: 3 things: * normalize all registry key strings before storing or looking up paths in the registry tdb * return the current buffer size for REG_INFO even when not returning actual data * fix a segfault report by metze on #samba-technical so that the user/group object picker works again (was the "ProductType" key lookup that was failing). (This used to be commit 5640e6cdb213502d95fff33e06eaeed5ce3aeb76) --- source3/registry/reg_db.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'source3/registry') diff --git a/source3/registry/reg_db.c b/source3/registry/reg_db.c index 74012263e5..b4c8f60ccf 100644 --- a/source3/registry/reg_db.c +++ b/source3/registry/reg_db.c @@ -163,7 +163,8 @@ BOOL init_registry_db( void ) fstrings The full path to the registry key is used as database after the - \'s are converted to /'s. + \'s are converted to /'s. Key string is also normalized to UPPER + case. ***********************************************************************/ BOOL regdb_store_reg_keys( char *keyname, REGSUBKEY_CTR *ctr ) @@ -178,6 +179,8 @@ BOOL regdb_store_reg_keys( char *keyname, REGSUBKEY_CTR *ctr ) if ( !keyname ) return False; + strupper_m( keyname ); + /* allocate some initial memory */ buffer = malloc(sizeof(pstring)); @@ -245,6 +248,7 @@ int regdb_fetch_reg_keys( char* key, REGSUBKEY_CTR *ctr ) /* convert to key format */ pstring_sub( path, "\\", "/" ); + strupper_m( path ); dbuf = tdb_fetch_by_string( tdb_reg, path ); -- cgit