How to fix the permission stuff.

Bill Medland billmedland at
Mon Oct 3 20:03:15 CDT 2005

Advice please.  This looks a little too big to be done without 

This stems from Michael Ost's CreateFile issue and is much more 
fundamental than the SHARE settings.

...CreateFile (.... FILE_READ_DATA...)
...ReadFile (...)

That is sensible and perfectly legal under Windows but fails 
under Wine due to an inadequate handling of the generic vs 
specific permissions.

It seems to me that the fix to this minor problem includes:
a. Extending the server's Object concept (or at least the ops 
structure) to include the relevant GENERIC_MAPPING definition 
for the object.
b. Extend the testing in handle.c so that the test of access 
takes into account the fact that the granted permissions might 
be generic whilst the requested is specific, and vice versa.  
This requires a in order to know how to do the conversion.
c. Fix up calls to be a little more sensible in their requests.  
For example ReadFile does not need GENERIC_READ; it only needs 

Alternatively we could specify that the access settings held for 
a handle in the server are only specific and the appropriate 
object's code is responsible for converting from generic to 

Any comments?
Bill Medland
mailto:billmedland at

More information about the wine-devel mailing list