mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 18:15:11 +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
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
|
@ -21,13 +39,13 @@
|
||||||
PVOID STDCALL
|
PVOID STDCALL
|
||||||
IoGetInitialStack(VOID)
|
IoGetInitialStack(VOID)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED;
|
return(PsGetCurrentThread()->Tcb.InitialStack);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
VOID STDCALL
|
VOID STDCALL
|
||||||
IoGetStackLimits (PULONG LowLimit,
|
IoGetStackLimits(OUT PULONG LowLimit,
|
||||||
PULONG HighLimit)
|
OUT PULONG HighLimit)
|
||||||
{
|
{
|
||||||
*LowLimit = (ULONG)NtCurrentTeb()->Tib.StackLimit;
|
*LowLimit = (ULONG)NtCurrentTeb()->Tib.StackLimit;
|
||||||
*HighLimit = (ULONG)NtCurrentTeb()->Tib.StackBase;
|
*HighLimit = (ULONG)NtCurrentTeb()->Tib.StackBase;
|
||||||
|
@ -66,17 +84,9 @@ IoSetThreadHardErrorMode (IN BOOLEAN HardErrorEnabled)
|
||||||
{
|
{
|
||||||
BOOLEAN PreviousHEM = NtCurrentTeb()->HardErrorDisabled;
|
BOOLEAN PreviousHEM = NtCurrentTeb()->HardErrorDisabled;
|
||||||
|
|
||||||
NtCurrentTeb ()->HardErrorDisabled = (
|
NtCurrentTeb()->HardErrorDisabled = ((TRUE == HardErrorEnabled) ? FALSE : TRUE);
|
||||||
(TRUE == HardErrorEnabled)
|
|
||||||
? FALSE
|
return((TRUE == PreviousHEM) ? FALSE : TRUE);
|
||||||
: TRUE
|
|
||||||
);
|
|
||||||
return (
|
|
||||||
(TRUE == PreviousHEM)
|
|
||||||
? FALSE
|
|
||||||
: TRUE
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* EOF */
|
/* 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
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
|
@ -63,11 +81,11 @@ IoUpdateShareAccess(PFILE_OBJECT FileObject,
|
||||||
|
|
||||||
|
|
||||||
NTSTATUS STDCALL
|
NTSTATUS STDCALL
|
||||||
IoCheckShareAccess(ACCESS_MASK DesiredAccess,
|
IoCheckShareAccess(IN ACCESS_MASK DesiredAccess,
|
||||||
ULONG DesiredShareAccess,
|
IN ULONG DesiredShareAccess,
|
||||||
PFILE_OBJECT FileObject,
|
IN PFILE_OBJECT FileObject,
|
||||||
PSHARE_ACCESS ShareAccess,
|
IN PSHARE_ACCESS ShareAccess,
|
||||||
BOOLEAN Update)
|
IN BOOLEAN Update)
|
||||||
{
|
{
|
||||||
BOOLEAN ReadAccess;
|
BOOLEAN ReadAccess;
|
||||||
BOOLEAN WriteAccess;
|
BOOLEAN WriteAccess;
|
||||||
|
@ -161,8 +179,8 @@ IoCheckShareAccess(ACCESS_MASK DesiredAccess,
|
||||||
|
|
||||||
|
|
||||||
VOID STDCALL
|
VOID STDCALL
|
||||||
IoRemoveShareAccess(PFILE_OBJECT FileObject,
|
IoRemoveShareAccess(IN PFILE_OBJECT FileObject,
|
||||||
PSHARE_ACCESS ShareAccess)
|
IN PSHARE_ACCESS ShareAccess)
|
||||||
{
|
{
|
||||||
if ((FileObject->ReadAccess == FALSE) &&
|
if ((FileObject->ReadAccess == FALSE) &&
|
||||||
(FileObject->WriteAccess == FALSE) &&
|
(FileObject->WriteAccess == FALSE) &&
|
||||||
|
@ -206,10 +224,10 @@ IoRemoveShareAccess(PFILE_OBJECT FileObject,
|
||||||
|
|
||||||
|
|
||||||
VOID STDCALL
|
VOID STDCALL
|
||||||
IoSetShareAccess(ACCESS_MASK DesiredAccess,
|
IoSetShareAccess(IN ACCESS_MASK DesiredAccess,
|
||||||
ULONG DesiredShareAccess,
|
IN ULONG DesiredShareAccess,
|
||||||
PFILE_OBJECT FileObject,
|
IN PFILE_OBJECT FileObject,
|
||||||
PSHARE_ACCESS ShareAccess)
|
OUT PSHARE_ACCESS ShareAccess)
|
||||||
{
|
{
|
||||||
BOOLEAN ReadAccess;
|
BOOLEAN ReadAccess;
|
||||||
BOOLEAN WriteAccess;
|
BOOLEAN WriteAccess;
|
||||||
|
@ -267,8 +285,12 @@ NTSTATUS STDCALL
|
||||||
IoCheckDesiredAccess(IN OUT PACCESS_MASK DesiredAccess,
|
IoCheckDesiredAccess(IN OUT PACCESS_MASK DesiredAccess,
|
||||||
IN ACCESS_MASK GrantedAccess)
|
IN ACCESS_MASK GrantedAccess)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED;
|
RtlMapGenericMask(DesiredAccess,
|
||||||
return(STATUS_NOT_IMPLEMENTED);
|
IoFileObjectType->Mapping);
|
||||||
|
if ((*DesiredAccess & GrantedAccess) != GrantedAccess)
|
||||||
|
return(STATUS_ACCESS_DENIED);
|
||||||
|
|
||||||
|
return(STATUS_SUCCESS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue