mirror of
https://github.com/reactos/reactos.git
synced 2024-10-15 05:37:44 +00:00
[KERNEL32]
Fix some broken logic: we can duplicate console handles only if both the source and the target processes are in fact the current process. svn path=/trunk/; revision=59486
This commit is contained in:
parent
542bb5560c
commit
9ff782961b
|
@ -170,7 +170,11 @@ DuplicateHandle(IN HANDLE hSourceProcessHandle,
|
|||
((hSourceHandle != NtCurrentProcess()) &&
|
||||
(hSourceHandle != NtCurrentThread())))
|
||||
{
|
||||
if ((hSourceProcessHandle != NtCurrentProcess()) &&
|
||||
/*
|
||||
* We can duplicate console handles only if both the source
|
||||
* and the target processes are in fact the current process.
|
||||
*/
|
||||
if ((hSourceProcessHandle != NtCurrentProcess()) ||
|
||||
(hTargetProcessHandle != NtCurrentProcess()))
|
||||
{
|
||||
BaseSetLastNTError(STATUS_INVALID_PARAMETER);
|
||||
|
|
Loading…
Reference in a new issue