diff options
author | Michael Adam <obnox@samba.org> | 2009-07-08 16:16:18 +0200 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2009-07-15 14:01:40 +0200 |
commit | d554c0d7a923f1194463481f0bd829042cee574a (patch) | |
tree | 568c932245bff67c6ea9cb98acba41289f417ffa /source3/registry | |
parent | 3071b0712211b17b464f62d544fa16da5a128b01 (diff) | |
download | samba-d554c0d7a923f1194463481f0bd829042cee574a.tar.gz samba-d554c0d7a923f1194463481f0bd829042cee574a.tar.bz2 samba-d554c0d7a923f1194463481f0bd829042cee574a.zip |
s3:registry: don't store differently cased entries for the same keys.
This happened for instance during registry initialization, when
entries for HKLM\Software and HKLM\SOFTWARE were created.
Searching these entries was case insensitive though.
But the entries ended up in the subkey-lists anyways.
This is solved by making the subkeys_hash in the regsubkey_container
structs case insensitive (using the new _bystring_upper() wrappers).
Michael
Diffstat (limited to 'source3/registry')
-rw-r--r-- | source3/registry/reg_objects.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source3/registry/reg_objects.c b/source3/registry/reg_objects.c index 5ae1cd8aa7..a592c76e1d 100644 --- a/source3/registry/reg_objects.c +++ b/source3/registry/reg_objects.c @@ -89,7 +89,7 @@ static WERROR regsubkey_ctr_hash_keyname(struct regsubkey_ctr *ctr, { WERROR werr; - werr = ntstatus_to_werror(dbwrap_store_bystring(ctr->subkeys_hash, + werr = ntstatus_to_werror(dbwrap_store_bystring_upper(ctr->subkeys_hash, keyname, make_tdb_data((uint8 *)&idx, sizeof(idx)), @@ -107,7 +107,7 @@ static WERROR regsubkey_ctr_unhash_keyname(struct regsubkey_ctr *ctr, { WERROR werr; - werr = ntstatus_to_werror(dbwrap_delete_bystring(ctr->subkeys_hash, + werr = ntstatus_to_werror(dbwrap_delete_bystring_upper(ctr->subkeys_hash, keyname)); if (!W_ERROR_IS_OK(werr)) { DEBUG(1, ("error unhashing key '%s' in container: %s\n", @@ -127,7 +127,7 @@ static WERROR regsubkey_ctr_index_for_keyname(struct regsubkey_ctr *ctr, return WERR_INVALID_PARAM; } - data = dbwrap_fetch_bystring(ctr->subkeys_hash, ctr, keyname); + data = dbwrap_fetch_bystring_upper(ctr->subkeys_hash, ctr, keyname); if (data.dptr == NULL) { return WERR_NOT_FOUND; } |