kernel32: Specify the access rights when creating a file object.

Alexandre Julliard julliard at
Fri Jan 13 06:22:24 CST 2012

Dmitry Timoshkov <dmitry at> writes:

> Alexandre Julliard <julliard at> wrote:
>> Requiring extra access rights can break things, especially in such
>> low-level functions. It's not just a harmless cleanup, so you need to
>> either show an app that requires it, or provide a test case that
>> demonstrates that the extra accesses are required on Windows too.
> At least one such a test case exists for the file mappings, and actually
> making it pass has motivated me for this kind of patches. It shows that
> a mapping created with access 0 is not accessible. Since all the objects
> on the server side share a single access check mechanism it's impossible
> to make one test pass without either changing that single mechanism, or
> creating separate access checks for every type of an object.

You shouldn't need to change anything to the access check mechanism. An
access of 0 of course won't satisfy places that require a specific
right. If there are places that don't require a right but should, then
you can fix that, with test cases. If fixing that requires the
corresponding allocation to add some rights, you can do that at the same

Alexandre Julliard
julliard at

More information about the wine-devel mailing list