Bernhard Loos : server: Correct mapping of mutex access rights.
Alexandre Julliard
julliard at winehq.org
Fri Sep 23 10:56:52 CDT 2011
Module: wine
Branch: master
Commit: 527a985a3d7154dac549ce5170f5d0a099163362
URL: http://source.winehq.org/git/wine.git/?a=commit;h=527a985a3d7154dac549ce5170f5d0a099163362
Author: Bernhard Loos <bernhardloos at googlemail.com>
Date: Wed Sep 14 14:49:09 2011 +0200
server: Correct mapping of mutex access rights.
---
dlls/kernel32/tests/sync.c | 4 ++--
server/mutex.c | 6 +++---
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/dlls/kernel32/tests/sync.c b/dlls/kernel32/tests/sync.c
index 1695713..98d996f 100644
--- a/dlls/kernel32/tests/sync.c
+++ b/dlls/kernel32/tests/sync.c
@@ -140,7 +140,7 @@ static void test_mutex(void)
hOpened = OpenMutex(GENERIC_EXECUTE, FALSE, "WineTestMutex");
ok(hOpened != NULL, "OpenMutex failed with error %d\n", GetLastError());
wait_ret = WaitForSingleObject(hOpened, INFINITE);
- todo_wine ok(wait_ret == WAIT_OBJECT_0, "WaitForSingleObject failed with error %d\n", GetLastError());
+ ok(wait_ret == WAIT_OBJECT_0, "WaitForSingleObject failed with error %d\n", GetLastError());
CloseHandle(hOpened);
for(i=0; i < 31; i++)
@@ -152,7 +152,7 @@ static void test_mutex(void)
hOpened = OpenMutex(GENERIC_READ | GENERIC_WRITE, FALSE, "WineTestMutex");
ok(hOpened != NULL, "OpenMutex failed with error %d\n", GetLastError());
wait_ret = WaitForSingleObject(hOpened, INFINITE);
- todo_wine ok(wait_ret == WAIT_FAILED, "WaitForSingleObject succeeded\n");
+ ok(wait_ret == WAIT_FAILED, "WaitForSingleObject succeeded\n");
CloseHandle(hOpened);
for (i = 0; i < 32; i++)
diff --git a/server/mutex.c b/server/mutex.c
index d21f341..7c9700d 100644
--- a/server/mutex.c
+++ b/server/mutex.c
@@ -163,9 +163,9 @@ static int mutex_satisfied( struct object *obj, struct thread *thread )
static unsigned int mutex_map_access( struct object *obj, unsigned int access )
{
- if (access & GENERIC_READ) access |= STANDARD_RIGHTS_READ | SYNCHRONIZE;
- if (access & GENERIC_WRITE) access |= STANDARD_RIGHTS_WRITE | MUTEX_MODIFY_STATE;
- if (access & GENERIC_EXECUTE) access |= STANDARD_RIGHTS_EXECUTE;
+ if (access & GENERIC_READ) access |= STANDARD_RIGHTS_READ;
+ if (access & GENERIC_WRITE) access |= STANDARD_RIGHTS_WRITE;
+ if (access & GENERIC_EXECUTE) access |= STANDARD_RIGHTS_EXECUTE | SYNCHRONIZE;
if (access & GENERIC_ALL) access |= STANDARD_RIGHTS_ALL | MUTEX_ALL_ACCESS;
return access & ~(GENERIC_READ | GENERIC_WRITE | GENERIC_EXECUTE | GENERIC_ALL);
}
More information about the wine-cvs
mailing list