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:
Gunnar Dalsnes 2005-01-05 02:50:50 +00:00
parent 7671e20ce8
commit 4e4b7cff0b

View file

@ -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,