mirror of
https://github.com/reactos/reactos.git
synced 2024-09-11 05:12:43 +00:00
i'm pretty sure a non-inheritable handle _can_ be duplicated! This fixes compiling ros-on-ros w/w2k msvcrt.dll for me.
svn path=/trunk/; revision=12814
This commit is contained in:
parent
7671e20ce8
commit
4e4b7cff0b
|
@ -16,7 +16,7 @@
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*/
|
*/
|
||||||
/* $Id: handle.c,v 1.63 2004/10/22 20:57:39 ekohl Exp $
|
/* $Id$
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
|
@ -353,13 +353,7 @@ NtDuplicateObject (IN HANDLE SourceProcessHandle,
|
||||||
}
|
}
|
||||||
|
|
||||||
KeReleaseSpinLock(&SourceProcess->HandleTable.ListLock, oldIrql);
|
KeReleaseSpinLock(&SourceProcess->HandleTable.ListLock, oldIrql);
|
||||||
if (!((ULONG_PTR)SourceHandleEntry->ObjectBody & OB_HANDLE_FLAG_INHERIT))
|
|
||||||
{
|
|
||||||
ObDereferenceObject(TargetProcess);
|
|
||||||
ObDereferenceObject(SourceProcess);
|
|
||||||
ObDereferenceObject(ObjectBody);
|
|
||||||
return STATUS_INVALID_HANDLE;
|
|
||||||
}
|
|
||||||
ObCreateHandle(TargetProcess,
|
ObCreateHandle(TargetProcess,
|
||||||
ObjectBody,
|
ObjectBody,
|
||||||
DesiredAccess,
|
DesiredAccess,
|
||||||
|
|
Loading…
Reference in a new issue