server: Fix generic access mapping for a process.
This commit is contained in:
parent
531c2b398e
commit
53847fd6a1
|
@ -5053,12 +5053,10 @@ static void test_process_access(void)
|
|||
switch (map[i].generic)
|
||||
{
|
||||
case GENERIC_READ:
|
||||
todo_wine
|
||||
ok(access == map[i].mapped || access == (map[i].mapped | PROCESS_QUERY_LIMITED_INFORMATION) /* Vista+ */,
|
||||
"%d: expected %#x, got %#x\n", i, map[i].mapped, access);
|
||||
break;
|
||||
case GENERIC_WRITE:
|
||||
todo_wine
|
||||
ok(access == map[i].mapped || access == (map[i].mapped | PROCESS_TERMINATE) /* before Vista */,
|
||||
"%d: expected %#x, got %#x\n", i, map[i].mapped, access);
|
||||
break;
|
||||
|
|
|
@ -448,9 +448,10 @@ static int process_signaled( struct object *obj, struct wait_queue_entry *entry
|
|||
|
||||
static unsigned int process_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 | SYNCHRONIZE;
|
||||
if (access & GENERIC_EXECUTE) access |= STANDARD_RIGHTS_EXECUTE;
|
||||
if (access & GENERIC_READ) access |= STANDARD_RIGHTS_READ | PROCESS_QUERY_INFORMATION | PROCESS_VM_READ;
|
||||
if (access & GENERIC_WRITE) access |= STANDARD_RIGHTS_WRITE | PROCESS_SET_QUOTA | PROCESS_SET_INFORMATION | PROCESS_SUSPEND_RESUME |
|
||||
PROCESS_VM_WRITE | PROCESS_DUP_HANDLE | PROCESS_CREATE_PROCESS | PROCESS_CREATE_THREAD | PROCESS_VM_OPERATION;
|
||||
if (access & GENERIC_EXECUTE) access |= STANDARD_RIGHTS_EXECUTE | SYNCHRONIZE | PROCESS_TERMINATE;
|
||||
if (access & GENERIC_ALL) access |= PROCESS_ALL_ACCESS;
|
||||
return access & ~(GENERIC_READ | GENERIC_WRITE | GENERIC_EXECUTE | GENERIC_ALL);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue