GSoC 2013 - Registry Merging Project

Guo Jian orzhvs at gmail.com
Fri May 17 06:53:06 CDT 2013


Tests for read-operations has been done.
http://newtestbot.winehq.org/JobDetails.pl?Key=942
All the results are expected:
1. query_value prefer values in hkcu.
2. query_key_info gives the count of subkeys and values distincted.
3. enum_value & enum_key combine result from hkcu & hklm and return in
sorted order
I've looked into server/registry.c to find the subkeys are stored in
alphabet order and is located by binary search. So when enumerating
subkeys or values from hkcr, the two branches hkcu and hklm can be
combined using a algorithm like part of merge_sort.

Had hard time testing what happens using a dumped key handle of hkcr
from another user, as mentioned in last mail. Steps in my test:
1. make sure hkcu/software/classes/subkey1 exist in hkcu of both user1
and user2.
2. program1 of user1 set 'val1' in hkcu/software/classes/subkey1 to 'user1'
3. program1 opens a handle to hkcr/subkey1, print it out then wait but not exit.
3. program2 of user2 dumps the handle from program1 to program2, set
value 'val1' to 'user2' with that handle.
4. program1 continues, open hkcu/classes/subkey1. query and print out
current value of 'val1'.
Here we care what value is eventually set to 'val1' in user1. As we
know a handle is associated with a kernel object. dumped handle points
to same object as original.
- If the final value is 'user1', that denotes operations by user2 with
hckr key objects created from user1 have no effect on user1.
- If the value is 'user2', operations from another user changes
content from owner user, obviously the key-view is associated with the
own user I'm considering to add a field 'owner' in my key view object.
The test code is attached, and output is as following, note that the
second program start running when the first paused.

>runas /user:user1 "testcls 1"
program1 on user1 has pid : 2092
'val1' set to 'user1' on user1
handle of subkey1 opened from hkcr : 000007D2
come back after runing program2 as user2
press any key to continue . .
'val1' on user1 is 'user2' now

>runas /user:user2 "testcls 2"
input pid of program1
2092
input handle of subkey1 in program1
7d2
dumped handle on user2 : 000007B0
'val1' set to 'user2'

The final result turned out to be 'user2'. As expected, isn't it?

Till now, most of my test work has finished. I'm going to make out a
stage conclusion soon then I'll come to the main point - the implement
of merging.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: testcls.c
Type: text/x-csrc
Size: 4532 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20130517/08f05ff5/attachment.c>


More information about the wine-devel mailing list