mirror of
https://github.com/reactos/reactos.git
synced 2024-09-11 05:12:43 +00:00
Fixed the real bug
svn path=/trunk/; revision=1308
This commit is contained in:
parent
1aa74074a2
commit
7c29439d2b
|
@ -1,4 +1,4 @@
|
|||
/* $Id: device.c,v 1.19 2000/08/19 00:02:55 ekohl Exp $
|
||||
/* $Id: device.c,v 1.20 2000/08/19 01:20:52 ekohl Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -136,7 +136,7 @@ IoGetDeviceObjectPointer (
|
|||
return Status;
|
||||
|
||||
Status = ObReferenceObjectByHandle (FileHandle,
|
||||
DesiredAccess,
|
||||
0,
|
||||
IoFileObjectType,
|
||||
KernelMode,
|
||||
(PVOID*)&LocalFileObject,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: handle.c,v 1.23 2000/07/04 08:52:46 dwelch Exp $
|
||||
/* $Id: handle.c,v 1.24 2000/08/19 01:21:17 ekohl Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -552,8 +552,9 @@ NTSTATUS STDCALL ObReferenceObjectByHandle(HANDLE Handle,
|
|||
DPRINT("Reference from %x\n", ((PULONG)&Handle)[-1]);
|
||||
}
|
||||
|
||||
if (!(GrantedAccess & DesiredAccess) &&
|
||||
!((~GrantedAccess) & DesiredAccess))
|
||||
if ((AccessMode == UserMode) &&
|
||||
(!(GrantedAccess & DesiredAccess) &&
|
||||
!((~GrantedAccess) & DesiredAccess)))
|
||||
{
|
||||
CHECKPOINT;
|
||||
return(STATUS_ACCESS_DENIED);
|
||||
|
|
Loading…
Reference in a new issue