mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
Specify correct access rights in NtOpenProcess when sending control events.
svn path=/trunk/; revision=14249
This commit is contained in:
parent
fd19aa00e6
commit
07647a0b62
1 changed files with 3 additions and 2 deletions
|
@ -94,7 +94,8 @@ ConioConsoleCtrlEvent(DWORD Event, PCSRSS_PROCESS_DATA ProcessData)
|
||||||
|
|
||||||
/* using OpenProcess is not optimal due to HANDLE vs. DWORD PIDs... */
|
/* using OpenProcess is not optimal due to HANDLE vs. DWORD PIDs... */
|
||||||
Status = NtOpenProcess(&Process,
|
Status = NtOpenProcess(&Process,
|
||||||
PROCESS_DUP_HANDLE,
|
PROCESS_DUP_HANDLE | PROCESS_VM_OPERATION |
|
||||||
|
PROCESS_VM_WRITE | PROCESS_CREATE_THREAD,
|
||||||
&ObjectAttributes,
|
&ObjectAttributes,
|
||||||
&ClientId);
|
&ClientId);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
|
@ -110,7 +111,7 @@ ConioConsoleCtrlEvent(DWORD Event, PCSRSS_PROCESS_DATA ProcessData)
|
||||||
(PVOID) Event, 0, NULL);
|
(PVOID) Event, 0, NULL);
|
||||||
if (NULL == Thread)
|
if (NULL == Thread)
|
||||||
{
|
{
|
||||||
DPRINT1("Failed thread creation\n");
|
DPRINT1("Failed thread creation (Error: 0x%x)\n", GetLastError());
|
||||||
CloseHandle(Process);
|
CloseHandle(Process);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue