kernel32.dll: Reduce Registry access to KEY_READ or MAXIMUM_ALLOWED wherever possible (try 2)
Rob Shearman
robertshearman at gmail.com
Sat Nov 28 16:10:37 CST 2009
2009/11/27 Paul Chitescu <paulc at voip.null.ro>:
> --- ./dlls/kernel32/locale.c.orig 2009-11-02 05:45:10.000000000 +0200
> +++ ./dlls/kernel32/locale.c 2009-11-26 19:35:39.000000000 +0200
> @@ -3017,7 +3017,7 @@
> RtlInitUnicodeString( &keyName, szKeyName );
> InitializeObjectAttributes(&attr, &keyName, 0, hRootKey, NULL);
>
> - if (NtOpenKey( &hkey, KEY_ALL_ACCESS, &attr ) != STATUS_SUCCESS)
> + if (NtOpenKey( &hkey, MAXIMUM_ALLOWED, &attr ) != STATUS_SUCCESS)
> hkey = 0;
>
> return hkey;
This is ugly. The function should be changed to allow the required
access rights to be specified.
--
Rob Shearman
More information about the wine-devel
mailing list