CreateFile access/sharing problem

Robert Shearman rob at
Wed Oct 5 17:56:10 CDT 2005

Dmitry Timoshkov wrote:

>"Vitaliy Margolen" <wine-devel at> wrote:
>>It is an additional flags to the rest of the file flags because they are
>>transferred all the way to the kernel. And being translated into specific access
>>rights by an object manager according to the object type. It has array of the
>>generic attributes mappings.
>Does the ntdll export RtlMapGenericMask have anything to do with mapping GENERIC_xxxx
>flags into STANDARD_RIGHTS_xxxx? Is there any information regarding that?

Yes, it is exactly that. There is a port of that function into 
wineserver in server/token.c called map_generic_mask that I used for the 
purpose of mapping generic access rights in the token functions. The 
problem with translating from generic access rights is that they don't 
map onto Unix access rights very well. I suspect that the best solution 
is to request read access if any of the NT read rights are requested and 
similarly for the write rights.

Rob Shearman

More information about the wine-devel mailing list