ntdll: Add handing of MEM_EXECUTE_OPTION_PERMANENT.
This commit is contained in:
parent
9476071fd2
commit
ca4c571818
|
@ -420,6 +420,8 @@ NTSTATUS WINAPI NtSetInformationProcess(
|
||||||
case ProcessExecuteFlags:
|
case ProcessExecuteFlags:
|
||||||
if (ProcessInformationLength != sizeof(ULONG))
|
if (ProcessInformationLength != sizeof(ULONG))
|
||||||
return STATUS_INVALID_PARAMETER;
|
return STATUS_INVALID_PARAMETER;
|
||||||
|
else if (execute_flags & MEM_EXECUTE_OPTION_PERMANENT)
|
||||||
|
return STATUS_ACCESS_DENIED;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
BOOL enable;
|
BOOL enable;
|
||||||
|
|
|
@ -1070,12 +1070,12 @@ static void test_dpe_exceptions(void)
|
||||||
/* Try to turn off DEP */
|
/* Try to turn off DEP */
|
||||||
val = MEM_EXECUTE_OPTION_ENABLE;
|
val = MEM_EXECUTE_OPTION_ENABLE;
|
||||||
stat = pNtSetInformationProcess(GetCurrentProcess(), ProcessExecuteFlags, &val, sizeof val);
|
stat = pNtSetInformationProcess(GetCurrentProcess(), ProcessExecuteFlags, &val, sizeof val);
|
||||||
todo_wine ok(stat == STATUS_ACCESS_DENIED, "disabling DEP while permanent: status %08x\n", stat);
|
ok(stat == STATUS_ACCESS_DENIED, "disabling DEP while permanent: status %08x\n", stat);
|
||||||
|
|
||||||
/* Try to turn on DEP */
|
/* Try to turn on DEP */
|
||||||
val = MEM_EXECUTE_OPTION_DISABLE;
|
val = MEM_EXECUTE_OPTION_DISABLE;
|
||||||
stat = pNtSetInformationProcess(GetCurrentProcess(), ProcessExecuteFlags, &val, sizeof val);
|
stat = pNtSetInformationProcess(GetCurrentProcess(), ProcessExecuteFlags, &val, sizeof val);
|
||||||
todo_wine ok(stat == STATUS_ACCESS_DENIED, "enabling DEP while permanent: status %08x\n", stat);
|
ok(stat == STATUS_ACCESS_DENIED, "enabling DEP while permanent: status %08x\n", stat);
|
||||||
}
|
}
|
||||||
|
|
||||||
#elif defined(__x86_64__)
|
#elif defined(__x86_64__)
|
||||||
|
|
Loading…
Reference in New Issue