mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
Implemented IoCheckDesiredAccess() and IoGetInitialStack().
svn path=/trunk/; revision=3300
This commit is contained in:
parent
d6e258cc9e
commit
a79a9cbba6
2 changed files with 212 additions and 180 deletions
|
@ -1,4 +1,22 @@
|
|||
/* $Id: process.c,v 1.11 2000/10/07 13:41:51 dwelch Exp $
|
||||
/*
|
||||
* ReactOS kernel
|
||||
* Copyright (C) 1998, 1999, 2000, 2001 ReactOS Team
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
/* $Id: process.c,v 1.12 2002/07/24 17:49:31 ekohl Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -21,13 +39,13 @@
|
|||
PVOID STDCALL
|
||||
IoGetInitialStack(VOID)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
return(PsGetCurrentThread()->Tcb.InitialStack);
|
||||
}
|
||||
|
||||
|
||||
VOID STDCALL
|
||||
IoGetStackLimits (PULONG LowLimit,
|
||||
PULONG HighLimit)
|
||||
IoGetStackLimits(OUT PULONG LowLimit,
|
||||
OUT PULONG HighLimit)
|
||||
{
|
||||
*LowLimit = (ULONG)NtCurrentTeb()->Tib.StackLimit;
|
||||
*HighLimit = (ULONG)NtCurrentTeb()->Tib.StackBase;
|
||||
|
@ -66,17 +84,9 @@ IoSetThreadHardErrorMode (IN BOOLEAN HardErrorEnabled)
|
|||
{
|
||||
BOOLEAN PreviousHEM = NtCurrentTeb()->HardErrorDisabled;
|
||||
|
||||
NtCurrentTeb ()->HardErrorDisabled = (
|
||||
(TRUE == HardErrorEnabled)
|
||||
? FALSE
|
||||
: TRUE
|
||||
);
|
||||
return (
|
||||
(TRUE == PreviousHEM)
|
||||
? FALSE
|
||||
: TRUE
|
||||
);
|
||||
NtCurrentTeb()->HardErrorDisabled = ((TRUE == HardErrorEnabled) ? FALSE : TRUE);
|
||||
|
||||
return((TRUE == PreviousHEM) ? FALSE : TRUE);
|
||||
}
|
||||
|
||||
|
||||
/* EOF */
|
||||
|
|
|
@ -1,4 +1,22 @@
|
|||
/* $Id: share.c,v 1.5 2002/01/21 11:42:04 ekohl Exp $
|
||||
/*
|
||||
* ReactOS kernel
|
||||
* Copyright (C) 1998, 1999, 2000, 2001 ReactOS Team
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
/* $Id: share.c,v 1.6 2002/07/24 17:49:31 ekohl Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -63,11 +81,11 @@ IoUpdateShareAccess(PFILE_OBJECT FileObject,
|
|||
|
||||
|
||||
NTSTATUS STDCALL
|
||||
IoCheckShareAccess(ACCESS_MASK DesiredAccess,
|
||||
ULONG DesiredShareAccess,
|
||||
PFILE_OBJECT FileObject,
|
||||
PSHARE_ACCESS ShareAccess,
|
||||
BOOLEAN Update)
|
||||
IoCheckShareAccess(IN ACCESS_MASK DesiredAccess,
|
||||
IN ULONG DesiredShareAccess,
|
||||
IN PFILE_OBJECT FileObject,
|
||||
IN PSHARE_ACCESS ShareAccess,
|
||||
IN BOOLEAN Update)
|
||||
{
|
||||
BOOLEAN ReadAccess;
|
||||
BOOLEAN WriteAccess;
|
||||
|
@ -161,8 +179,8 @@ IoCheckShareAccess(ACCESS_MASK DesiredAccess,
|
|||
|
||||
|
||||
VOID STDCALL
|
||||
IoRemoveShareAccess(PFILE_OBJECT FileObject,
|
||||
PSHARE_ACCESS ShareAccess)
|
||||
IoRemoveShareAccess(IN PFILE_OBJECT FileObject,
|
||||
IN PSHARE_ACCESS ShareAccess)
|
||||
{
|
||||
if ((FileObject->ReadAccess == FALSE) &&
|
||||
(FileObject->WriteAccess == FALSE) &&
|
||||
|
@ -206,10 +224,10 @@ IoRemoveShareAccess(PFILE_OBJECT FileObject,
|
|||
|
||||
|
||||
VOID STDCALL
|
||||
IoSetShareAccess(ACCESS_MASK DesiredAccess,
|
||||
ULONG DesiredShareAccess,
|
||||
PFILE_OBJECT FileObject,
|
||||
PSHARE_ACCESS ShareAccess)
|
||||
IoSetShareAccess(IN ACCESS_MASK DesiredAccess,
|
||||
IN ULONG DesiredShareAccess,
|
||||
IN PFILE_OBJECT FileObject,
|
||||
OUT PSHARE_ACCESS ShareAccess)
|
||||
{
|
||||
BOOLEAN ReadAccess;
|
||||
BOOLEAN WriteAccess;
|
||||
|
@ -267,8 +285,12 @@ NTSTATUS STDCALL
|
|||
IoCheckDesiredAccess(IN OUT PACCESS_MASK DesiredAccess,
|
||||
IN ACCESS_MASK GrantedAccess)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
return(STATUS_NOT_IMPLEMENTED);
|
||||
RtlMapGenericMask(DesiredAccess,
|
||||
IoFileObjectType->Mapping);
|
||||
if ((*DesiredAccess & GrantedAccess) != GrantedAccess)
|
||||
return(STATUS_ACCESS_DENIED);
|
||||
|
||||
return(STATUS_SUCCESS);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue