mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-03 00:55:17 +00:00
server: Prevent unloading a registry hive while the key is in use.
Otherwise, RegUnLoadKey(HKEY_USERS, "S-1-5-21-0-0-0-1000") erases all HKCU registry. The call is actually done by a certain installer. Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
d6d99e59e3
commit
70c77cdfee
|
@ -2261,7 +2261,10 @@ DECL_HANDLER(unload_registry)
|
|||
get_req_path( &name, !req->parent );
|
||||
if ((key = open_key( parent, &name, access, req->attributes )))
|
||||
{
|
||||
delete_key( key, 1 ); /* FIXME */
|
||||
if (key->obj.handle_count)
|
||||
set_error( STATUS_CANNOT_DELETE );
|
||||
else
|
||||
delete_key( key, 1 ); /* FIXME */
|
||||
release_object( key );
|
||||
}
|
||||
release_object( parent );
|
||||
|
|
Loading…
Reference in a new issue