Commit fa65a248 authored by Aric Stewart's avatar Aric Stewart Committed by Alexandre Julliard

Ignore requested access rights when emulated version is not NT.

parent 2711374b
...@@ -45,9 +45,11 @@ ...@@ -45,9 +45,11 @@
WINE_DEFAULT_DEBUG_CHANNEL(win32); WINE_DEFAULT_DEBUG_CHANNEL(win32);
/* /* check if current version is NT or Win95 */
* Events inline static int is_version_nt(void)
*/ {
return !(GetVersion() & 0x80000000);
}
/*********************************************************************** /***********************************************************************
...@@ -145,6 +147,8 @@ HANDLE WINAPI OpenEventW( DWORD access, BOOL inherit, LPCWSTR name ) ...@@ -145,6 +147,8 @@ HANDLE WINAPI OpenEventW( DWORD access, BOOL inherit, LPCWSTR name )
SetLastError( ERROR_FILENAME_EXCED_RANGE ); SetLastError( ERROR_FILENAME_EXCED_RANGE );
return 0; return 0;
} }
if (!is_version_nt()) access = EVENT_ALL_ACCESS;
SERVER_START_REQ( open_event ) SERVER_START_REQ( open_event )
{ {
req->access = access; req->access = access;
...@@ -327,6 +331,8 @@ HANDLE WINAPI OpenMutexW( DWORD access, BOOL inherit, LPCWSTR name ) ...@@ -327,6 +331,8 @@ HANDLE WINAPI OpenMutexW( DWORD access, BOOL inherit, LPCWSTR name )
SetLastError( ERROR_FILENAME_EXCED_RANGE ); SetLastError( ERROR_FILENAME_EXCED_RANGE );
return 0; return 0;
} }
if (!is_version_nt()) access = MUTEX_ALL_ACCESS;
SERVER_START_REQ( open_mutex ) SERVER_START_REQ( open_mutex )
{ {
req->access = access; req->access = access;
...@@ -446,6 +452,8 @@ HANDLE WINAPI OpenSemaphoreW( DWORD access, BOOL inherit, LPCWSTR name ) ...@@ -446,6 +452,8 @@ HANDLE WINAPI OpenSemaphoreW( DWORD access, BOOL inherit, LPCWSTR name )
SetLastError( ERROR_FILENAME_EXCED_RANGE ); SetLastError( ERROR_FILENAME_EXCED_RANGE );
return 0; return 0;
} }
if (!is_version_nt()) access = SEMAPHORE_ALL_ACCESS;
SERVER_START_REQ( open_semaphore ) SERVER_START_REQ( open_semaphore )
{ {
req->access = access; req->access = access;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment