[2/4] kernel32: Create a temp file with full access rights.

Dmitry Timoshkov dmitry at codeweavers.com
Tue Mar 15 11:47:28 CDT 2011


Nikolay Sivov <nsivov at codeweavers.com> wrote:

> > @@ -703,7 +703,7 @@ UINT WINAPI GetTempFileNameW( LPCWSTR path, LPCWSTR prefix, UINT unique, LPWSTR
> >           do
> >           {
> >               sprintfW( p, formatW, unique );
> > -            handle = CreateFileW( buffer, GENERIC_WRITE, 0, NULL,
> > +            handle = CreateFileW( buffer, GENERIC_READ|GENERIC_WRITE|GENERIC_EXECUTE, 0, NULL,
> >                                     CREATE_NEW, FILE_ATTRIBUTE_NORMAL, 0 );
> >               if (handle != INVALID_HANDLE_VALUE)
> >               {  /* We created it */
> Is it possible to add a test for that?

The problem is that wineserver directly maps access bits into the unix file
mode and then unix mode to file access rights. So the only way right now
to propagate exec rights to unix mode is to specify GENERIC_EXECUTE in
CreateFile, and it doesn't matter what Windows does here, it shouldn't
change anything.

-- 
Dmitry.



More information about the wine-devel mailing list