Skip to content
Snippets Groups Projects
Commit fa65a248 authored by Aric Stewart's avatar Aric Stewart Committed by Alexandre Julliard
Browse files

Ignore requested access rights when emulated version is not NT.

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