ntdll: Add handing of MEM_EXECUTE_OPTION_PERMANENT.

This commit is contained in:
Michael Karcher 2009-08-18 01:20:54 +02:00 committed by Alexandre Julliard
parent 9476071fd2
commit ca4c571818
2 changed files with 4 additions and 2 deletions

View File

@ -420,6 +420,8 @@ NTSTATUS WINAPI NtSetInformationProcess(
case ProcessExecuteFlags:
if (ProcessInformationLength != sizeof(ULONG))
return STATUS_INVALID_PARAMETER;
else if (execute_flags & MEM_EXECUTE_OPTION_PERMANENT)
return STATUS_ACCESS_DENIED;
else
{
BOOL enable;

View File

@ -1070,12 +1070,12 @@ static void test_dpe_exceptions(void)
/* Try to turn off DEP */
val = MEM_EXECUTE_OPTION_ENABLE;
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 */
val = MEM_EXECUTE_OPTION_DISABLE;
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__)