From 4e4b7cff0b3517dd80a188849b185775893b87f4 Mon Sep 17 00:00:00 2001 From: Gunnar Dalsnes Date: Wed, 5 Jan 2005 02:50:50 +0000 Subject: [PATCH] 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 --- reactos/ntoskrnl/ob/handle.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/reactos/ntoskrnl/ob/handle.c b/reactos/ntoskrnl/ob/handle.c index 8bf7368db9f..7e2306a3ddd 100644 --- a/reactos/ntoskrnl/ob/handle.c +++ b/reactos/ntoskrnl/ob/handle.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * 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 * PROJECT: ReactOS kernel @@ -353,13 +353,7 @@ NtDuplicateObject (IN HANDLE SourceProcessHandle, } 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, ObjectBody, DesiredAccess,