ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
March 2010
----- 2025 -----
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
19 participants
896 discussions
Start a n
N
ew thread
[akhaldi] 46128: [NTIFS] - Group related definitions - Add several Fs*, Io* and DO_* definitions
by akhaldi@svn.reactos.org
Author: akhaldi Date: Fri Mar 12 12:18:35 2010 New Revision: 46128 URL:
http://svn.reactos.org/svn/reactos?rev=46128&view=rev
Log: [NTIFS] - Group related definitions - Add several Fs*, Io* and DO_* definitions Modified: branches/header-work/include/ddk/ntifs.h Modified: branches/header-work/include/ddk/ntifs.h URL:
http://svn.reactos.org/svn/reactos/branches/header-work/include/ddk/ntifs.h…
============================================================================== --- branches/header-work/include/ddk/ntifs.h [iso-8859-1] (original) +++ branches/header-work/include/ddk/ntifs.h [iso-8859-1] Fri Mar 12 12:18:35 2010 @@ -5758,6 +5758,410 @@ PFS_FILTER_COMPLETION_CALLBACK PostReleaseForModifiedPageWriter; } FS_FILTER_CALLBACKS, *PFS_FILTER_CALLBACKS; +#if (NTDDI_VERSION >= NTDDI_WINXP) +NTKERNELAPI +NTSTATUS +NTAPI +FsRtlRegisterFileSystemFilterCallbacks( + IN struct _DRIVER_OBJECT *FilterDriverObject, + IN PFS_FILTER_CALLBACKS Callbacks); +#endif /* (NTDDI_VERSION >= NTDDI_WINXP) */ + +#if (NTDDI_VERSION >= NTDDI_VISTA) +NTKERNELAPI +NTSTATUS +NTAPI +FsRtlNotifyStreamFileObject( + IN struct _FILE_OBJECT * StreamFileObject, + IN struct _DEVICE_OBJECT *DeviceObjectHint OPTIONAL, + IN FS_FILTER_STREAM_FO_NOTIFICATION_TYPE NotificationType, + IN BOOLEAN SafeToRecurse); +#endif /* (NTDDI_VERSION >= NTDDI_VISTA) */ + +#define DO_VERIFY_VOLUME 0x00000002 +#define DO_BUFFERED_IO 0x00000004 +#define DO_EXCLUSIVE 0x00000008 +#define DO_DIRECT_IO 0x00000010 +#define DO_MAP_IO_BUFFER 0x00000020 +#define DO_DEVICE_HAS_NAME 0x00000040 +#define DO_DEVICE_INITIALIZING 0x00000080 +#define DO_SYSTEM_BOOT_PARTITION 0x00000100 +#define DO_LONG_TERM_REQUESTS 0x00000200 +#define DO_NEVER_LAST_DEVICE 0x00000400 +#define DO_SHUTDOWN_REGISTERED 0x00000800 +#define DO_BUS_ENUMERATED_DEVICE 0x00001000 +#define DO_POWER_PAGABLE 0x00002000 +#define DO_POWER_INRUSH 0x00004000 +#define DO_LOW_PRIORITY_FILESYSTEM 0x00010000 +#define DO_SUPPORTS_TRANSACTIONS 0x00040000 +#define DO_FORCE_NEITHER_IO 0x00080000 +#define DO_VOLUME_DEVICE_OBJECT 0x00100000 +#define DO_SYSTEM_SYSTEM_PARTITION 0x00200000 +#define DO_SYSTEM_CRITICAL_PARTITION 0x00400000 +#define DO_DISALLOW_EXECUTE 0x00800000 + +extern KSPIN_LOCK IoStatisticsLock; +extern ULONG IoReadOperationCount; +extern ULONG IoWriteOperationCount; +extern ULONG IoOtherOperationCount; +extern LARGE_INTEGER IoReadTransferCount; +extern LARGE_INTEGER IoWriteTransferCount; +extern LARGE_INTEGER IoOtherTransferCount; + +#define IO_FILE_OBJECT_NON_PAGED_POOL_CHARGE 64 +#define IO_FILE_OBJECT_PAGED_POOL_CHARGE 1024 + +#if (NTDDI_VERSION == NTDDI_WIN2K) +NTKERNELAPI +NTSTATUS +NTAPI +IoRegisterFsRegistrationChangeEx( + IN PDRIVER_OBJECT DriverObject, + IN PDRIVER_FS_NOTIFICATION DriverNotificationRoutine); +#endif + +#if (NTDDI_VERSION >= NTDDI_WIN2K) + +NTKERNELAPI +VOID +NTAPI +IoAcquireVpbSpinLock( + OUT PKIRQL Irql); + +NTKERNELAPI +NTSTATUS +NTAPI +IoCheckDesiredAccess( + IN OUT PACCESS_MASK DesiredAccess, + IN ACCESS_MASK GrantedAccess); + +NTKERNELAPI +NTSTATUS +NTAPI +IoCheckEaBufferValidity( + IN PFILE_FULL_EA_INFORMATION EaBuffer, + IN ULONG EaLength, + OUT PULONG ErrorOffset); + +NTKERNELAPI +NTSTATUS +NTAPI +IoCheckFunctionAccess( + IN ACCESS_MASK GrantedAccess, + IN UCHAR MajorFunction, + IN UCHAR MinorFunction, + IN ULONG IoControlCode, + IN PVOID Argument1 OPTIONAL, + IN PVOID Argument2 OPTIONAL); + +NTKERNELAPI +NTSTATUS +NTAPI +IoCheckQuerySetFileInformation( + IN FILE_INFORMATION_CLASS FileInformationClass, + IN ULONG Length, + IN BOOLEAN SetOperation); + +NTKERNELAPI +NTSTATUS +NTAPI +IoCheckQuerySetVolumeInformation( + IN FS_INFORMATION_CLASS FsInformationClass, + IN ULONG Length, + IN BOOLEAN SetOperation); + +NTKERNELAPI +NTSTATUS +NTAPI +IoCheckQuotaBufferValidity( + IN PFILE_QUOTA_INFORMATION QuotaBuffer, + IN ULONG QuotaLength, + OUT PULONG ErrorOffset); + +NTKERNELAPI +PFILE_OBJECT +NTAPI +IoCreateStreamFileObject( + IN PFILE_OBJECT FileObject OPTIONAL, + IN PDEVICE_OBJECT DeviceObject OPTIONAL); + +NTKERNELAPI +PFILE_OBJECT +NTAPI +IoCreateStreamFileObjectLite( + IN PFILE_OBJECT FileObject OPTIONAL, + IN PDEVICE_OBJECT DeviceObject OPTIONAL); + +NTKERNELAPI +BOOLEAN +NTAPI +IoFastQueryNetworkAttributes( + IN POBJECT_ATTRIBUTES ObjectAttributes, + IN ACCESS_MASK DesiredAccess, + IN ULONG OpenOptions, + OUT PIO_STATUS_BLOCK IoStatus, + OUT PFILE_NETWORK_OPEN_INFORMATION Buffer); + +NTKERNELAPI +NTSTATUS +NTAPI +IoPageRead( + IN PFILE_OBJECT FileObject, + IN PMDL Mdl, + IN PLARGE_INTEGER Offset, + IN PKEVENT Event, + OUT PIO_STATUS_BLOCK IoStatusBlock); + +NTKERNELAPI +PDEVICE_OBJECT +NTAPI +IoGetAttachedDevice( + IN PDEVICE_OBJECT DeviceObject); + +NTKERNELAPI +PDEVICE_OBJECT +NTAPI +IoGetAttachedDeviceReference( + IN PDEVICE_OBJECT DeviceObject); + +NTKERNELAPI +PDEVICE_OBJECT +NTAPI +IoGetBaseFileSystemDeviceObject( + IN PFILE_OBJECT FileObject); + +NTKERNELAPI +PCONFIGURATION_INFORMATION +NTAPI +IoGetConfigurationInformation( + VOID); + +NTKERNELAPI +ULONG +NTAPI +IoGetRequestorProcessId( + IN PIRP Irp); + +NTKERNELAPI +PEPROCESS +NTAPI +IoGetRequestorProcess( + IN PIRP Irp); + +NTKERNELAPI +PIRP +NTAPI +IoGetTopLevelIrp( + VOID); + +NTKERNELAPI +BOOLEAN +NTAPI +IoIsOperationSynchronous( + IN PIRP Irp); + +NTKERNELAPI +BOOLEAN +NTAPI +IoIsSystemThread( + IN PETHREAD Thread); + +NTKERNELAPI +BOOLEAN +NTAPI +IoIsValidNameGraftingBuffer( + IN PIRP Irp, + IN PREPARSE_DATA_BUFFER ReparseBuffer); + +NTKERNELAPI +NTSTATUS +NTAPI +IoQueryFileInformation( + IN PFILE_OBJECT FileObject, + IN FILE_INFORMATION_CLASS FileInformationClass, + IN ULONG Length, + OUT PVOID FileInformation, + OUT PULONG ReturnedLength); + +NTKERNELAPI +NTSTATUS +NTAPI +IoQueryVolumeInformation( + IN PFILE_OBJECT FileObject, + IN FS_INFORMATION_CLASS FsInformationClass, + IN ULONG Length, + OUT PVOID FsInformation, + OUT PULONG ReturnedLength); + +NTKERNELAPI +VOID +NTAPI +IoQueueThreadIrp( + IN PIRP Irp); + +NTKERNELAPI +VOID +NTAPI +IoRegisterFileSystem( + IN PDEVICE_OBJECT DeviceObject); + +NTKERNELAPI +NTSTATUS +NTAPI +IoRegisterFsRegistrationChange( + IN PDRIVER_OBJECT DriverObject, + IN PDRIVER_FS_NOTIFICATION DriverNotificationRoutine); + +NTKERNELAPI +VOID +NTAPI +IoReleaseVpbSpinLock( + IN KIRQL Irql); + +NTKERNELAPI +VOID +NTAPI +IoSetDeviceToVerify( + IN PETHREAD Thread, + IN PDEVICE_OBJECT DeviceObject OPTIONAL); + +NTKERNELAPI +NTSTATUS +NTAPI +IoSetInformation( + IN PFILE_OBJECT FileObject, + IN FILE_INFORMATION_CLASS FileInformationClass, + IN ULONG Length, + IN PVOID FileInformation); + +NTKERNELAPI +VOID +NTAPI +IoSetTopLevelIrp( + IN PIRP Irp OPTIONAL); + +NTKERNELAPI +VOID +NTAPI +IoStartNextPacket( + IN PDEVICE_OBJECT DeviceObject, + IN BOOLEAN Cancelable); + +NTKERNELAPI +VOID +NTAPI +IoStartNextPacketByKey( + IN PDEVICE_OBJECT DeviceObject, + IN BOOLEAN Cancelable, + IN ULONG Key); + +NTKERNELAPI +VOID +IoStartPacket( + IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp, + IN PULONG Key OPTIONAL, + IN PDRIVER_CANCEL CancelFunction OPTIONAL); + +NTKERNELAPI +VOID +NTAPI +IoStartTimer( + IN PDEVICE_OBJECT DeviceObject); + +NTKERNELAPI +VOID +NTAPI +IoStopTimer( + IN PDEVICE_OBJECT DeviceObject); + +NTKERNELAPI +NTSTATUS +NTAPI +IoSynchronousPageWrite( + IN PFILE_OBJECT FileObject, + IN PMDL Mdl, + IN PLARGE_INTEGER FileOffset, + IN PKEVENT Event, + OUT PIO_STATUS_BLOCK IoStatusBlock); + +#endif /* (NTDDI_VERSION >= NTDDI_WIN2K) */ + +#if (NTDDI_VERSION >= NTDDI_WINXP) + +NTKERNELAPI +PFILE_OBJECT +IoCreateStreamFileObjectEx( + IN PFILE_OBJECT FileObject OPTIONAL, + IN PDEVICE_OBJECT DeviceObject OPTIONAL, + OUT PHANDLE FileObjectHandle OPTIONAL); + +NTKERNELAPI +NTSTATUS +NTAPI +IoQueryFileDosDeviceName( + IN PFILE_OBJECT FileObject, + OUT POBJECT_NAME_INFORMATION *ObjectNameInformation); + +VOID +NTAPI +IoSetStartIoAttributes( + IN PDEVICE_OBJECT DeviceObject, + IN BOOLEAN DeferredStartIo, + IN BOOLEAN NonCancelable); + +#endif + +#if (NTDDI_VERSION >= NTDDI_WS03SP1) +NTKERNELAPI +NTSTATUS +NTAPI +IoEnumerateRegisteredFiltersList( + OUT PDRIVER_OBJECT *DriverObjectList, + IN ULONG DriverObjectListSize, + OUT PULONG ActualNumberDriverObjects); +#endif + +#if (NTDDI_VERSION >= NTDDI_WIN7) + +NTKERNELAPI +NTSTATUS +NTAPI +IoRegisterFsRegistrationChangeMountAware( + IN PDRIVER_OBJECT DriverObject, + IN PDRIVER_FS_NOTIFICATION DriverNotificationRoutine, + IN BOOLEAN SynchronizeWithMounts); + +NTKERNELAPI +NTSTATUS +IoReplaceFileObjectName( + IN PFILE_OBJECT FileObject, + IN PWSTR NewFileName, + IN USHORT FileNameLength); + +#endif + +#define IoIsFileOpenedExclusively(FileObject) ( \ + (BOOLEAN) !( \ + (FileObject)->SharedRead || \ + (FileObject)->SharedWrite || \ + (FileObject)->SharedDelete \ + ) \ +) + +#define IoSizeOfIrp( StackSize ) \ + ((USHORT) (sizeof( IRP ) + ((StackSize) * (sizeof( IO_STACK_LOCATION ))))) + + + + + + + + + + + #pragma pack(push,4) @@ -5775,14 +6179,6 @@ #endif extern PACL SePublicDefaultDacl; extern PACL SeSystemDefaultDacl; - -extern KSPIN_LOCK IoStatisticsLock; -extern ULONG IoReadOperationCount; -extern ULONG IoWriteOperationCount; -extern ULONG IoOtherOperationCount; -extern LARGE_INTEGER IoReadTransferCount; -extern LARGE_INTEGER IoWriteTransferCount; -extern LARGE_INTEGER IoOtherTransferCount; #define FS_LFN_APIS 0x00004000 @@ -5848,9 +6244,6 @@ #define IO_ATTACH_DEVICE 0x0400 #define IO_ATTACH_DEVICE_API 0x80000000 - -#define IO_FILE_OBJECT_NON_PAGED_POOL_CHARGE 64 -#define IO_FILE_OBJECT_PAGED_POOL_CHARGE 1024 #define IO_TYPE_APC 18 #define IO_TYPE_DPC 19 @@ -8260,100 +8653,6 @@ OUT PDEVICE_OBJECT *AttachedToDeviceObject ); -NTKERNELAPI -VOID -NTAPI -IoAcquireVpbSpinLock ( - OUT PKIRQL Irql -); - -NTKERNELAPI -NTSTATUS -NTAPI -IoCheckDesiredAccess ( - IN OUT PACCESS_MASK DesiredAccess, - IN ACCESS_MASK GrantedAccess -); - -NTKERNELAPI -NTSTATUS -NTAPI -IoCheckEaBufferValidity ( - IN PFILE_FULL_EA_INFORMATION EaBuffer, - IN ULONG EaLength, - OUT PULONG ErrorOffset -); - -NTKERNELAPI -NTSTATUS -NTAPI -IoCheckFunctionAccess ( - IN ACCESS_MASK GrantedAccess, - IN UCHAR MajorFunction, - IN UCHAR MinorFunction, - IN ULONG IoControlCode, - IN PVOID Argument1 OPTIONAL, - IN PVOID Argument2 OPTIONAL -); - -#if (VER_PRODUCTBUILD >= 2195) - -NTKERNELAPI -NTSTATUS -NTAPI -IoCheckQuotaBufferValidity ( - IN PFILE_QUOTA_INFORMATION QuotaBuffer, - IN ULONG QuotaLength, - OUT PULONG ErrorOffset -); - -#endif /* (VER_PRODUCTBUILD >= 2195) */ - -NTKERNELAPI -PFILE_OBJECT -NTAPI -IoCreateStreamFileObject ( - IN PFILE_OBJECT FileObject OPTIONAL, - IN PDEVICE_OBJECT DeviceObject OPTIONAL -); - -#if (VER_PRODUCTBUILD >= 2195) - -NTKERNELAPI -PFILE_OBJECT -NTAPI -IoCreateStreamFileObjectLite ( - IN PFILE_OBJECT FileObject OPTIONAL, - IN PDEVICE_OBJECT DeviceObject OPTIONAL -); - -#endif /* (VER_PRODUCTBUILD >= 2195) */ - -NTKERNELAPI -BOOLEAN -NTAPI -IoFastQueryNetworkAttributes ( - IN POBJECT_ATTRIBUTES ObjectAttributes, - IN ACCESS_MASK DesiredAccess, - IN ULONG OpenOptions, - OUT PIO_STATUS_BLOCK IoStatus, - OUT PFILE_NETWORK_OPEN_INFORMATION Buffer -); - -NTKERNELAPI -PDEVICE_OBJECT -NTAPI -IoGetAttachedDevice ( - IN PDEVICE_OBJECT DeviceObject -); - -NTKERNELAPI -PDEVICE_OBJECT -NTAPI -IoGetBaseFileSystemDeviceObject ( - IN PFILE_OBJECT FileObject -); - #if (VER_PRODUCTBUILD >= 2600) NTKERNELAPI @@ -8379,167 +8678,6 @@ ); #endif /* (VER_PRODUCTBUILD >= 2600) */ - -NTKERNELAPI -PEPROCESS -NTAPI -IoGetRequestorProcess ( - IN PIRP Irp -); - -#if (VER_PRODUCTBUILD >= 2195) - -NTKERNELAPI -ULONG -NTAPI -IoGetRequestorProcessId ( - IN PIRP Irp -); - -#endif /* (VER_PRODUCTBUILD >= 2195) */ - -NTKERNELAPI -PIRP -NTAPI -IoGetTopLevelIrp ( - VOID -); - -#define IoIsFileOpenedExclusively(FileObject) ( \ - (BOOLEAN) !( \ - (FileObject)->SharedRead || \ - (FileObject)->SharedWrite || \ - (FileObject)->SharedDelete \ - ) \ -) - -NTKERNELAPI -BOOLEAN -NTAPI -IoIsOperationSynchronous ( - IN PIRP Irp -); - -NTKERNELAPI -BOOLEAN -NTAPI -IoIsSystemThread ( - IN PETHREAD Thread -); - -#if (VER_PRODUCTBUILD >= 2195) - -NTKERNELAPI -BOOLEAN -NTAPI -IoIsValidNameGraftingBuffer ( - IN PIRP Irp, - IN PREPARSE_DATA_BUFFER ReparseBuffer -); - -#endif /* (VER_PRODUCTBUILD >= 2195) */ - -NTKERNELAPI -NTSTATUS -NTAPI -IoPageRead ( - IN PFILE_OBJECT FileObject, - IN PMDL Mdl, - IN PLARGE_INTEGER Offset, - IN PKEVENT Event, - OUT PIO_STATUS_BLOCK IoStatusBlock -); - -NTKERNELAPI -NTSTATUS -NTAPI -IoQueryFileInformation ( - IN PFILE_OBJECT FileObject, - IN FILE_INFORMATION_CLASS FileInformationClass, - IN ULONG Length, - OUT PVOID FileInformation, - OUT PULONG ReturnedLength -); - -NTKERNELAPI -NTSTATUS -NTAPI -IoQueryVolumeInformation ( - IN PFILE_OBJECT FileObject, - IN FS_INFORMATION_CLASS FsInformationClass, - IN ULONG Length, - OUT PVOID FsInformation, - OUT PULONG ReturnedLength -); - -NTKERNELAPI -VOID -NTAPI -IoQueueThreadIrp( - IN PIRP Irp -); - -NTKERNELAPI -VOID -NTAPI -IoRegisterFileSystem ( - IN OUT PDEVICE_OBJECT DeviceObject -); - -#if (VER_PRODUCTBUILD >= 1381) - -NTKERNELAPI -NTSTATUS -NTAPI -IoRegisterFsRegistrationChange ( - IN PDRIVER_OBJECT DriverObject, - IN PDRIVER_FS_NOTIFICATION DriverNotificationRoutine -); - -#endif /* (VER_PRODUCTBUILD >= 1381) */ - -NTKERNELAPI -VOID -NTAPI -IoReleaseVpbSpinLock ( - IN KIRQL Irql -); - -NTKERNELAPI -VOID -NTAPI -IoSetDeviceToVerify ( - IN PETHREAD Thread, - IN PDEVICE_OBJECT DeviceObject -); - -NTKERNELAPI -NTSTATUS -NTAPI -IoSetInformation ( - IN PFILE_OBJECT FileObject, - IN FILE_INFORMATION_CLASS FileInformationClass, - IN ULONG Length, - IN PVOID FileInformation -); - -NTKERNELAPI -VOID -NTAPI -IoSetTopLevelIrp ( - IN PIRP Irp -); - -NTKERNELAPI -NTSTATUS -NTAPI -IoSynchronousPageWrite ( - IN PFILE_OBJECT FileObject, - IN PMDL Mdl, - IN PLARGE_INTEGER FileOffset, - IN PKEVENT Event, - OUT PIO_STATUS_BLOCK IoStatusBlock -); NTKERNELAPI PEPROCESS
14 years, 10 months
1
0
0
0
[cgutman] 46127: - Fix acpi_bus_receive_event and acpi_bus_generate_event which will be used for button events later - Uncomment and fix the locking code that protects the event queue and driver list
by cgutman@svn.reactos.org
Author: cgutman Date: Fri Mar 12 05:42:23 2010 New Revision: 46127 URL:
http://svn.reactos.org/svn/reactos?rev=46127&view=rev
Log: - Fix acpi_bus_receive_event and acpi_bus_generate_event which will be used for button events later - Uncomment and fix the locking code that protects the event queue and driver list Modified: trunk/reactos/drivers/bus/acpi/busmgr/bus.c trunk/reactos/drivers/bus/acpi/include/glue.h Modified: trunk/reactos/drivers/bus/acpi/busmgr/bus.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/busmgr/bu…
============================================================================== --- trunk/reactos/drivers/bus/acpi/busmgr/bus.c [iso-8859-1] (original) +++ trunk/reactos/drivers/bus/acpi/busmgr/bus.c [iso-8859-1] Fri Mar 12 05:42:23 2010 @@ -48,7 +48,7 @@ #define HAS_SIBLINGS(d) (((d)->parent) && ((d)->node.next != &(d)->parent->children)) #define NODE_TO_DEVICE(n) (list_entry(n, struct acpi_device, node)) -extern int event_is_open; +int event_is_open; extern void acpi_pic_sci_set_trigger(unsigned int irq, UINT16 trigger); typedef int (*acpi_bus_walk_callback)(struct acpi_device*, int, void*); @@ -57,6 +57,7 @@ KSPIN_LOCK acpi_bus_event_lock; LIST_HEAD(acpi_bus_event_list); //DECLARE_WAIT_QUEUE_HEAD(acpi_bus_event_queue); +KEVENT AcpiEventQueue; static int @@ -463,6 +464,7 @@ { struct acpi_bus_event *event = NULL; //unsigned long flags = 0; + KIRQL OldIrql; DPRINT1("acpi_bus_generate_event"); @@ -470,8 +472,8 @@ return_VALUE(AE_BAD_PARAMETER); /* drop event on the floor if no one's listening */ - //if (!event_is_open) - // return_VALUE(0); + if (!event_is_open) + return_VALUE(0); event = ExAllocatePool(NonPagedPool,sizeof(struct acpi_bus_event)); if (!event) @@ -483,9 +485,12 @@ event->data = data; //spin_lock_irqsave(&acpi_bus_event_lock, flags); + KeAcquireSpinLock(&acpi_bus_event_lock, &OldIrql); list_add_tail(&event->node, &acpi_bus_event_list); + KeReleaseSpinLock(&acpi_bus_event_lock, OldIrql); //spin_unlock_irqrestore(&acpi_bus_event_lock, flags); + KeSetEvent(&AcpiEventQueue, IO_NO_INCREMENT, FALSE); //wake_up_interruptible(&acpi_bus_event_queue); return_VALUE(0); @@ -495,44 +500,43 @@ acpi_bus_receive_event ( struct acpi_bus_event *event) { - //unsigned long flags = 0; - //struct acpi_bus_event *entry = NULL; +// unsigned long flags = 0; + struct acpi_bus_event *entry = NULL; + KIRQL OldIrql; //DECLARE_WAITQUEUE(wait, current); DPRINT1("acpi_bus_receive_event"); - //if (!event) - // return AE_BAD_PARAMETER; - - //if (list_empty(&acpi_bus_event_list)) { - - // set_current_state(TASK_INTERRUPTIBLE); - // add_wait_queue(&acpi_bus_event_queue, &wait); - - // if (list_empty(&acpi_bus_event_list)) - // schedule(); - - // remove_wait_queue(&acpi_bus_event_queue, &wait); - // set_current_state(TASK_RUNNING); - - // if (signal_pending(current)) - // return_VALUE(-ERESTARTSYS); - //} - - //spin_lock_irqsave(&acpi_bus_event_lock, flags); - //entry = list_entry(acpi_bus_event_list.next, struct acpi_bus_event, node); - //if (entry) - // list_del(&entry->node); - //spin_unlock_irqrestore(&acpi_bus_event_lock, flags); - - //if (!entry) - // return_VALUE(AE_NOT_FOUND); - - //memcpy(event, entry, sizeof(struct acpi_bus_event)); - - //kfree(entry); - UNIMPLEMENTED; + if (!event) + return AE_BAD_PARAMETER; + + event_is_open++; + KeWaitForSingleObject(&AcpiEventQueue, + Executive, + KernelMode, + FALSE, + NULL); + event_is_open--; + KeClearEvent(&AcpiEventQueue); + + if (list_empty(&acpi_bus_event_list)) + return_VALUE(AE_NOT_FOUND); + +// spin_lock_irqsave(&acpi_bus_event_lock, flags); + KeAcquireSpinLock(&acpi_bus_event_lock, &OldIrql); + entry = list_entry(acpi_bus_event_list.next, struct acpi_bus_event, node); + if (entry) + list_del(&entry->node); + KeReleaseSpinLock(&acpi_bus_event_lock, OldIrql); +// spin_unlock_irqrestore(&acpi_bus_event_lock, flags); + + if (!entry) + return_VALUE(AE_NOT_FOUND); + + memcpy(event, entry, sizeof(struct acpi_bus_event)); + + ExFreePool(entry); return_VALUE(0); } @@ -789,6 +793,7 @@ static LIST_HEAD(acpi_bus_drivers); //static DECLARE_MUTEX(acpi_bus_drivers_lock); +static FAST_MUTEX acpi_bus_drivers_lock; /** @@ -914,9 +919,9 @@ if (result) return_VALUE(result); - //down(&acpi_bus_drivers_lock); + down(&acpi_bus_drivers_lock); ++driver->references; - //up(&acpi_bus_drivers_lock); + up(&acpi_bus_drivers_lock); return_VALUE(0); } @@ -953,9 +958,9 @@ device->driver = NULL; acpi_driver_data(device) = NULL; - //down(&acpi_bus_drivers_lock); + down(&acpi_bus_drivers_lock); driver->references--; - //up(&acpi_bus_drivers_lock); + up(&acpi_bus_drivers_lock); return_VALUE(0); } @@ -978,7 +983,7 @@ if (!device || device->driver) return_VALUE(AE_BAD_PARAMETER); - //down(&acpi_bus_drivers_lock); + down(&acpi_bus_drivers_lock); list_for_each(entry, &acpi_bus_drivers) { @@ -994,7 +999,7 @@ break; } - //up(&acpi_bus_drivers_lock); + up(&acpi_bus_drivers_lock); return_VALUE(result); } @@ -1016,9 +1021,9 @@ //if (acpi_disabled) // return_VALUE(AE_NOT_FOUND); - //down(&acpi_bus_drivers_lock); + down(&acpi_bus_drivers_lock); list_add_tail(&driver->node, &acpi_bus_drivers); - //up(&acpi_bus_drivers_lock); + up(&acpi_bus_drivers_lock); acpi_bus_walk(acpi_root, acpi_bus_attach, WALK_DOWN, driver); @@ -1045,9 +1050,9 @@ if (driver->references) return; - //down(&acpi_bus_drivers_lock); + down(&acpi_bus_drivers_lock); list_del(&driver->node); - //up(&acpi_bus_drivers_lock); + up(&acpi_bus_drivers_lock); return; } @@ -1786,6 +1791,10 @@ DPRINT("Subsystem revision %08x\n",ACPI_CA_VERSION); + KeInitializeSpinLock(&acpi_bus_event_lock); + KeInitializeEvent(&AcpiEventQueue, NotificationEvent, FALSE); + ExInitializeFastMutex(&acpi_bus_drivers_lock); + result = acpi_bus_init(); //if (!result) { Modified: trunk/reactos/drivers/bus/acpi/include/glue.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/include/g…
============================================================================== --- trunk/reactos/drivers/bus/acpi/include/glue.h [iso-8859-1] (original) +++ trunk/reactos/drivers/bus/acpi/include/glue.h [iso-8859-1] Fri Mar 12 05:42:23 2010 @@ -26,5 +26,7 @@ typedef int (*acpi_table_entry_handler) (ACPI_SUBTABLE_HEADER *header, const unsigned long end); +#define down(mutex) ExAcquireFastMutex(mutex) +#define up(mutex) ExReleaseFastMutex(mutex) #endif
14 years, 10 months
1
0
0
0
[akhaldi] 46126: [NTIFS] - Group related definitions - Update PsDereferencePrimaryToken and PsDereferenceImpersonationToken - PsChargePoolQuota, PsReturnPoolQuota and PsChargeProcessPoolQuota : SIZE_T Amount -> ULONG_PTR Amount - Add several missing IO_* and FS_FILTER_* definitions - DRIVER_FS_NOTIFICATION : DriverActive -> FsActive
by akhaldi@svn.reactos.org
Author: akhaldi Date: Fri Mar 12 01:08:20 2010 New Revision: 46126 URL:
http://svn.reactos.org/svn/reactos?rev=46126&view=rev
Log: [NTIFS] - Group related definitions - Update PsDereferencePrimaryToken and PsDereferenceImpersonationToken - PsChargePoolQuota, PsReturnPoolQuota and PsChargeProcessPoolQuota : SIZE_T Amount -> ULONG_PTR Amount - Add several missing IO_* and FS_FILTER_* definitions - DRIVER_FS_NOTIFICATION : DriverActive -> FsActive Modified: branches/header-work/include/ddk/ntifs.h Modified: branches/header-work/include/ddk/ntifs.h URL:
http://svn.reactos.org/svn/reactos/branches/header-work/include/ddk/ntifs.h…
============================================================================== --- branches/header-work/include/ddk/ntifs.h [iso-8859-1] (original) +++ branches/header-work/include/ddk/ntifs.h [iso-8859-1] Fri Mar 12 01:08:20 2010 @@ -5555,6 +5555,211 @@ } #endif +#if (NTDDI_VERSION >= NTDDI_WIN2K) + +NTKERNELAPI +PACCESS_TOKEN +NTAPI +PsReferenceImpersonationToken( + IN OUT PETHREAD Thread, + OUT PBOOLEAN CopyOnOpen, + OUT PBOOLEAN EffectiveOnly, + OUT PSECURITY_IMPERSONATION_LEVEL ImpersonationLevel); + +NTKERNELAPI +LARGE_INTEGER +NTAPI +PsGetProcessExitTime( + VOID); + +NTKERNELAPI +BOOLEAN +NTAPI +PsIsThreadTerminating( + IN PETHREAD Thread); + +NTKERNELAPI +NTSTATUS +NTAPI +PsImpersonateClient( + IN OUT PETHREAD Thread, + IN PACCESS_TOKEN Token, + IN BOOLEAN CopyOnOpen, + IN BOOLEAN EffectiveOnly, + IN SECURITY_IMPERSONATION_LEVEL ImpersonationLevel); + +NTKERNELAPI +BOOLEAN +NTAPI +PsDisableImpersonation( + IN OUT PETHREAD Thread, + IN OUT PSE_IMPERSONATION_STATE ImpersonationState); + +NTKERNELAPI +VOID +NTAPI +PsRestoreImpersonation( + IN PETHREAD Thread, + IN PSE_IMPERSONATION_STATE ImpersonationState); + +NTKERNELAPI +VOID +NTAPI +PsRevertToSelf( + VOID); + +NTKERNELAPI +VOID +NTAPI +PsChargePoolQuota( + IN PEPROCESS Process, + IN POOL_TYPE PoolType, + IN ULONG_PTR Amount); + +NTKERNELAPI +VOID +NTAPI +PsReturnPoolQuota( + IN PEPROCESS Process, + IN POOL_TYPE PoolType, + IN ULONG_PTR Amount); + +#endif + +#if (NTDDI_VERSION >= NTDDI_WINXP) + +NTKERNELAPI +VOID +NTAPI +PsDereferencePrimaryToken( + IN PACCESS_TOKEN PrimaryToken); + +NTKERNELAPI +VOID +PsDereferenceImpersonationToken( + IN PACCESS_TOKEN ImpersonationToken); + +NTKERNELAPI +NTSTATUS +NTAPI +PsChargeProcessPoolQuota( + IN PEPROCESS Process, + IN POOL_TYPE PoolType, + IN ULONG_PTR Amount); + +NTKERNELAPI +BOOLEAN +NTAPI +PsIsSystemThread( + IN PETHREAD Thread); + +#endif + +NTKERNELAPI +NTSTATUS +NTAPI +PsLookupProcessByProcessId( + IN HANDLE ProcessId, + OUT PEPROCESS *Process); + +NTKERNELAPI +NTSTATUS +NTAPI +PsLookupThreadByThreadId( + IN HANDLE UniqueThreadId, + OUT PETHREAD *Thread); + +#define IO_OPEN_PAGING_FILE 0x0002 +#define IO_OPEN_TARGET_DIRECTORY 0x0004 +#define IO_STOP_ON_SYMLINK 0x0008 +#define IO_MM_PAGING_FILE 0x0010 + +typedef VOID +(NTAPI *PDRIVER_FS_NOTIFICATION) ( + IN PDEVICE_OBJECT DeviceObject, + IN BOOLEAN FsActive); + +typedef enum _FS_FILTER_SECTION_SYNC_TYPE { + SyncTypeOther = 0, + SyncTypeCreateSection +} FS_FILTER_SECTION_SYNC_TYPE, *PFS_FILTER_SECTION_SYNC_TYPE; + +typedef enum _FS_FILTER_STREAM_FO_NOTIFICATION_TYPE { + NotifyTypeCreate = 0, + NotifyTypeRetired +} FS_FILTER_STREAM_FO_NOTIFICATION_TYPE, *PFS_FILTER_STREAM_FO_NOTIFICATION_TYPE; + +typedef union _FS_FILTER_PARAMETERS { + struct { + PLARGE_INTEGER EndingOffset; + PERESOURCE *ResourceToRelease; + } AcquireForModifiedPageWriter; + struct { + PERESOURCE ResourceToRelease; + } ReleaseForModifiedPageWriter; + struct { + FS_FILTER_SECTION_SYNC_TYPE SyncType; + ULONG PageProtection; + } AcquireForSectionSynchronization; + struct { + FS_FILTER_STREAM_FO_NOTIFICATION_TYPE NotificationType; + BOOLEAN POINTER_ALIGNMENT SafeToRecurse; + } NotifyStreamFileObject; + struct { + PVOID Argument1; + PVOID Argument2; + PVOID Argument3; + PVOID Argument4; + PVOID Argument5; + } Others; +} FS_FILTER_PARAMETERS, *PFS_FILTER_PARAMETERS; + +#define FS_FILTER_ACQUIRE_FOR_SECTION_SYNCHRONIZATION (UCHAR)-1 +#define FS_FILTER_RELEASE_FOR_SECTION_SYNCHRONIZATION (UCHAR)-2 +#define FS_FILTER_ACQUIRE_FOR_MOD_WRITE (UCHAR)-3 +#define FS_FILTER_RELEASE_FOR_MOD_WRITE (UCHAR)-4 +#define FS_FILTER_ACQUIRE_FOR_CC_FLUSH (UCHAR)-5 +#define FS_FILTER_RELEASE_FOR_CC_FLUSH (UCHAR)-6 + +typedef struct _FS_FILTER_CALLBACK_DATA { + ULONG SizeOfFsFilterCallbackData; + UCHAR Operation; + UCHAR Reserved; + struct _DEVICE_OBJECT *DeviceObject; + struct _FILE_OBJECT *FileObject; + FS_FILTER_PARAMETERS Parameters; +} FS_FILTER_CALLBACK_DATA, *PFS_FILTER_CALLBACK_DATA; + +typedef NTSTATUS +(NTAPI *PFS_FILTER_CALLBACK) ( + IN PFS_FILTER_CALLBACK_DATA Data, + OUT PVOID *CompletionContext); + +typedef VOID +(NTAPI *PFS_FILTER_COMPLETION_CALLBACK) ( + IN PFS_FILTER_CALLBACK_DATA Data, + IN NTSTATUS OperationStatus, + IN PVOID CompletionContext); + +typedef struct _FS_FILTER_CALLBACKS { + ULONG SizeOfFsFilterCallbacks; + ULONG Reserved; + PFS_FILTER_CALLBACK PreAcquireForSectionSynchronization; + PFS_FILTER_COMPLETION_CALLBACK PostAcquireForSectionSynchronization; + PFS_FILTER_CALLBACK PreReleaseForSectionSynchronization; + PFS_FILTER_COMPLETION_CALLBACK PostReleaseForSectionSynchronization; + PFS_FILTER_CALLBACK PreAcquireForCcFlush; + PFS_FILTER_COMPLETION_CALLBACK PostAcquireForCcFlush; + PFS_FILTER_CALLBACK PreReleaseForCcFlush; + PFS_FILTER_COMPLETION_CALLBACK PostReleaseForCcFlush; + PFS_FILTER_CALLBACK PreAcquireForModifiedPageWriter; + PFS_FILTER_COMPLETION_CALLBACK PostAcquireForModifiedPageWriter; + PFS_FILTER_CALLBACK PreReleaseForModifiedPageWriter; + PFS_FILTER_COMPLETION_CALLBACK PostReleaseForModifiedPageWriter; +} FS_FILTER_CALLBACKS, *PFS_FILTER_CALLBACKS; + + + #pragma pack(push,4) #ifndef VER_PRODUCTBUILD @@ -6422,84 +6627,6 @@ IN PVOID FilterContext ); -typedef enum _FS_FILTER_SECTION_SYNC_TYPE { - SyncTypeOther = 0, - SyncTypeCreateSection -} FS_FILTER_SECTION_SYNC_TYPE, *PFS_FILTER_SECTION_SYNC_TYPE; - -typedef enum _FS_FILTER_STREAM_FO_NOTIFICATION_TYPE { - NotifyTypeCreate = 0, - NotifyTypeRetired -} FS_FILTER_STREAM_FO_NOTIFICATION_TYPE, *PFS_FILTER_STREAM_FO_NOTIFICATION_TYPE; - -typedef union _FS_FILTER_PARAMETERS { - struct { - PLARGE_INTEGER EndingOffset; - PERESOURCE *ResourceToRelease; - } AcquireForModifiedPageWriter; - - struct { - PERESOURCE ResourceToRelease; - } ReleaseForModifiedPageWriter; - - struct { - FS_FILTER_SECTION_SYNC_TYPE SyncType; - ULONG PageProtection; - } AcquireForSectionSynchronization; - - struct { - FS_FILTER_STREAM_FO_NOTIFICATION_TYPE NotificationType; - BOOLEAN POINTER_ALIGNMENT SafeToRecurse; - } NotifyStreamFileObject; - - struct { - PVOID Argument1; - PVOID Argument2; - PVOID Argument3; - PVOID Argument4; - PVOID Argument5; - } Others; -} FS_FILTER_PARAMETERS, *PFS_FILTER_PARAMETERS; - -typedef struct _FS_FILTER_CALLBACK_DATA { - ULONG SizeOfFsFilterCallbackData; - UCHAR Operation; - UCHAR Reserved; - struct _DEVICE_OBJECT *DeviceObject; - struct _FILE_OBJECT *FileObject; - FS_FILTER_PARAMETERS Parameters; -} FS_FILTER_CALLBACK_DATA, *PFS_FILTER_CALLBACK_DATA; - -typedef NTSTATUS -(NTAPI *PFS_FILTER_CALLBACK) ( - IN PFS_FILTER_CALLBACK_DATA Data, - OUT PVOID *CompletionContext -); - -typedef VOID -(NTAPI *PFS_FILTER_COMPLETION_CALLBACK) ( - IN PFS_FILTER_CALLBACK_DATA Data, - IN NTSTATUS OperationStatus, - IN PVOID CompletionContext -); - -typedef struct _FS_FILTER_CALLBACKS { - ULONG SizeOfFsFilterCallbacks; - ULONG Reserved; - PFS_FILTER_CALLBACK PreAcquireForSectionSynchronization; - PFS_FILTER_COMPLETION_CALLBACK PostAcquireForSectionSynchronization; - PFS_FILTER_CALLBACK PreReleaseForSectionSynchronization; - PFS_FILTER_COMPLETION_CALLBACK PostReleaseForSectionSynchronization; - PFS_FILTER_CALLBACK PreAcquireForCcFlush; - PFS_FILTER_COMPLETION_CALLBACK PostAcquireForCcFlush; - PFS_FILTER_CALLBACK PreReleaseForCcFlush; - PFS_FILTER_COMPLETION_CALLBACK PostReleaseForCcFlush; - PFS_FILTER_CALLBACK PreAcquireForModifiedPageWriter; - PFS_FILTER_COMPLETION_CALLBACK PostAcquireForModifiedPageWriter; - PFS_FILTER_CALLBACK PreReleaseForModifiedPageWriter; - PFS_FILTER_COMPLETION_CALLBACK PostReleaseForModifiedPageWriter; -} FS_FILTER_CALLBACKS, *PFS_FILTER_CALLBACKS; - typedef struct _READ_LIST { PFILE_OBJECT FileObject; ULONG NumberOfEntries; @@ -8361,11 +8488,6 @@ #if (VER_PRODUCTBUILD >= 1381) -typedef VOID (NTAPI *PDRIVER_FS_NOTIFICATION) ( - IN PDEVICE_OBJECT DeviceObject, - IN BOOLEAN DriverActive -); - NTKERNELAPI NTSTATUS NTAPI @@ -8590,31 +8712,22 @@ OUT PVOID *Object ); -NTKERNELAPI -NTSTATUS -NTAPI -PsAssignImpersonationToken ( - IN PETHREAD Thread, - IN HANDLE Token -); - -NTKERNELAPI -VOID -NTAPI -PsChargePoolQuota ( - IN PEPROCESS Process, - IN POOL_TYPE PoolType, - IN SIZE_T Amount -); - -NTKERNELAPI -NTSTATUS -NTAPI -PsChargeProcessPoolQuota ( - IN PEPROCESS Process, - IN POOL_TYPE PoolType, - IN SIZE_T Amount -); +#if (NTDDI_VERSION >= NTDDI_WIN2K) + +NTKERNELAPI +NTSTATUS +NTAPI +PsAssignImpersonationToken( + IN PETHREAD Thread, + IN HANDLE Token OPTIONAL); + +NTKERNELAPI +HANDLE +NTAPI +PsReferencePrimaryToken( + IN OUT PEPROCESS Process); + +#endif #define PsDereferenceImpersonationToken(T) \ {if (ARGUMENT_PRESENT(T)) { \ @@ -8624,56 +8737,6 @@ } \ } -#define PsDereferencePrimaryToken(T) (ObDereferenceObject((T))) - -NTKERNELAPI -BOOLEAN -NTAPI -PsDisableImpersonation( - IN PETHREAD Thread, - IN PSE_IMPERSONATION_STATE ImpersonationState -); - -NTKERNELAPI -LARGE_INTEGER -NTAPI -PsGetProcessExitTime ( - VOID -); - -NTKERNELAPI -NTSTATUS -NTAPI -PsImpersonateClient( - IN PETHREAD Thread, - IN PACCESS_TOKEN Token, - IN BOOLEAN CopyOnOpen, - IN BOOLEAN EffectiveOnly, - IN SECURITY_IMPERSONATION_LEVEL ImpersonationLevel -); - -NTKERNELAPI -BOOLEAN -NTAPI -PsIsSystemThread( - IN PETHREAD Thread -); - -NTKERNELAPI -BOOLEAN -NTAPI -PsIsThreadTerminating ( - IN PETHREAD Thread -); - -NTKERNELAPI -NTSTATUS -NTAPI -PsLookupProcessByProcessId ( - IN HANDLE ProcessId, - OUT PEPROCESS *Process -); - NTKERNELAPI NTSTATUS NTAPI @@ -8681,55 +8744,6 @@ IN PCLIENT_ID Cid, OUT PEPROCESS *Process OPTIONAL, OUT PETHREAD *Thread -); - -NTKERNELAPI -NTSTATUS -NTAPI -PsLookupThreadByThreadId ( - IN HANDLE UniqueThreadId, - OUT PETHREAD *Thread -); - -NTKERNELAPI -PACCESS_TOKEN -NTAPI -PsReferenceImpersonationToken ( - IN PETHREAD Thread, - OUT PBOOLEAN CopyOnUse, - OUT PBOOLEAN EffectiveOnly, - OUT PSECURITY_IMPERSONATION_LEVEL Level -); - -NTKERNELAPI -HANDLE -NTAPI -PsReferencePrimaryToken ( - IN PEPROCESS Process -); - -NTKERNELAPI -VOID -NTAPI -PsRestoreImpersonation( - IN PETHREAD Thread, - IN PSE_IMPERSONATION_STATE ImpersonationState -); - -NTKERNELAPI -VOID -NTAPI -PsReturnPoolQuota ( - IN PEPROCESS Process, - IN POOL_TYPE PoolType, - IN SIZE_T Amount -); - -NTKERNELAPI -VOID -NTAPI -PsRevertToSelf ( - VOID ); NTSYSAPI
14 years, 10 months
1
0
0
0
[tkreuzer] 46125: [NTDDK] - move pHalGetAcpiTable, PCI_ERROR_HANDLER_CALLBACK, pHalSetPciErrorHandlerCallback, pHalIoAssignDriveLetters - Add HAL_DISPATCH::pHalIoAssignDriveLetters - add pre vista versions of pKdMapPhysicalMemory64 and pKdUnmapVirtualAddress - Fix definition of HalDispatchTable
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Fri Mar 12 00:54:57 2010 New Revision: 46125 URL:
http://svn.reactos.org/svn/reactos?rev=46125&view=rev
Log: [NTDDK] - move pHalGetAcpiTable, PCI_ERROR_HANDLER_CALLBACK, pHalSetPciErrorHandlerCallback, pHalIoAssignDriveLetters - Add HAL_DISPATCH::pHalIoAssignDriveLetters - add pre vista versions of pKdMapPhysicalMemory64 and pKdUnmapVirtualAddress - Fix definition of HalDispatchTable Modified: branches/header-work/include/ddk/ntddk.h Modified: branches/header-work/include/ddk/ntddk.h URL:
http://svn.reactos.org/svn/reactos/branches/header-work/include/ddk/ntddk.h…
============================================================================== --- branches/header-work/include/ddk/ntddk.h [iso-8859-1] (original) +++ branches/header-work/include/ddk/ntddk.h [iso-8859-1] Fri Mar 12 00:54:57 2010 @@ -608,10 +608,18 @@ IN ULONG Signature); typedef +PVOID +(NTAPI *pHalGetAcpiTable)( + IN ULONG Signature, + IN PCSTR OemId OPTIONAL, + IN PCSTR OemTableId OPTIONAL); + +typedef VOID (NTAPI *pKdCheckPowerButton)( VOID); +#if (NTDDI_VERSION >= NTDDI_VISTA) typedef PVOID (NTAPI *pKdMapPhysicalMemory64)( @@ -625,6 +633,20 @@ IN PVOID VirtualAddress, IN ULONG NumberPages, IN BOOLEAN FlushCurrentTLB); +#else +typedef +PVOID +(NTAPI *pKdMapPhysicalMemory64)( + IN PHYSICAL_ADDRESS PhysicalAddress, + IN ULONG NumberPages); + +typedef +VOID +(NTAPI *pKdUnmapVirtualAddress)( + IN PVOID VirtualAddress, + IN ULONG NumberPages); +#endif + typedef ULONG @@ -649,13 +671,35 @@ IN ULONG Columns, IN ULONG Rows); -typedef struct _HAL_DISPATCH { +typedef +VOID +(NTAPI *PCI_ERROR_HANDLER_CALLBACK)( + VOID); + +typedef +VOID +(NTAPI *pHalSetPciErrorHandlerCallback)( + IN PCI_ERROR_HANDLER_CALLBACK Callback); + +#if 1 /* Not present in WDK 7600 */ +typedef VOID +(FASTCALL *pHalIoAssignDriveLetters)( + IN struct _LOADER_PARAMETER_BLOCK *LoaderBlock, + IN PSTRING NtDeviceName, + OUT PUCHAR NtSystemPath, + OUT PSTRING NtSystemPathString); +#endif + +typedef struct { ULONG Version; pHalQuerySystemInformation HalQuerySystemInformation; pHalSetSystemInformation HalSetSystemInformation; pHalQueryBusSlots HalQueryBusSlots; ULONG Spare1; pHalExamineMBR HalExamineMBR; +#if 1 /* Not present in WDK 7600 */ + pHalIoAssignDriveLetters HalIoAssignDriveLetters; +#endif pHalIoReadPartitionTable HalIoReadPartitionTable; pHalIoSetPartitionInformation HalIoSetPartitionInformation; pHalIoWritePartitionTable HalIoWritePartitionTable; @@ -672,26 +716,25 @@ pHalEndOfBoot HalEndOfBoot; pHalMirrorVerify HalMirrorVerify; pHalGetAcpiTable HalGetCachedAcpiTable; - pHalSetPciErrorHandlerCallback HalSetPciErrorHandlerCallback; + pHalSetPciErrorHandlerCallback HalSetPciErrorHandlerCallback; #if defined(_IA64_) pHalGetErrorCapList HalGetErrorCapList; pHalInjectError HalInjectError; #endif } HAL_DISPATCH, *PHAL_DISPATCH; -#if defined(_NTDRIVER_) || defined(_NTDDK_) || defined(_NTIFS_) || defined(_NTHAL_) - -extern PHAL_DISPATCH HalDispatchTable; +/* GCC/MSVC and WDK compatible declaration */ +extern NTKERNELAPI HAL_DISPATCH HalDispatchTable; + +#if defined(_NTOSKRNL_) || defined(_BLDR_) +#define HALDISPATCH (&HalDispatchTable) +#else +/* This is a WDK compatibility definition */ +#define HalDispatchTable (&HalDispatchTable) #define HALDISPATCH HalDispatchTable - -#else - -extern HAL_DISPATCH HalDispatchTable; -#define HALDISPATCH (&HalDispatchTable) - -#endif - -#define HAL_DISPATCH_VERSION 3 +#endif + +#define HAL_DISPATCH_VERSION 3 /* FIXME: when to use 4? */ #define HalDispatchTableVersion HALDISPATCH->Version #define HalQuerySystemInformation HALDISPATCH->HalQuerySystemInformation #define HalSetSystemInformation HALDISPATCH->HalSetSystemInformation @@ -1648,32 +1691,6 @@ PVOID Reserved[4]; } PCIBUSDATA, *PPCIBUSDATA; -typedef -PVOID -(NTAPI *pHalGetAcpiTable)( - IN ULONG Signature, - IN PCSTR OemId OPTIONAL, - IN PCSTR OemTableId OPTIONAL); - -typedef -VOID -(NTAPI *PCI_ERROR_HANDLER_CALLBACK)( - VOID); - -typedef -VOID -(NTAPI *pHalSetPciErrorHandlerCallback)( - IN PCI_ERROR_HANDLER_CALLBACK Callback); - -#if 1 /* Not present in WDK 7600 */ -typedef VOID -(FASTCALL *pHalIoAssignDriveLetters)( - IN struct _LOADER_PARAMETER_BLOCK *LoaderBlock, - IN PSTRING NtDeviceName, - OUT PUCHAR NtSystemPath, - OUT PSTRING NtSystemPathString); -#endif - /* Hardware Abstraction Layer Functions */ #if !defined(NO_LEGACY_DRIVERS)
14 years, 10 months
1
0
0
0
[akhaldi] 46124: [NTIFS] - Group related definitions - SeSetSecurityDescriptorInfo : SecurityDescriptor -> ModificationDescriptor - SeAuditingFileOrGlobalEvents : SubjectContext -> SubjectSecurityContext - Add SeAuditHardLinkCreation, SeAuditHardLinkCreationWithTransaction, SeAuditTransactionStateChange, SeAuditingFileEventsWithContext, SeAuditingAnyFileEventsWithContext, SeAuditingHardLinkEvents, SeAuditingHardLinkEventsWithContext, SeExamineGlobalSacl and SeMaximumAuditMaskFromGlobalSacl
by akhaldi@svn.reactos.org
Author: akhaldi Date: Fri Mar 12 00:36:06 2010 New Revision: 46124 URL:
http://svn.reactos.org/svn/reactos?rev=46124&view=rev
Log: [NTIFS] - Group related definitions - SeSetSecurityDescriptorInfo : SecurityDescriptor -> ModificationDescriptor - SeAuditingFileOrGlobalEvents : SubjectContext -> SubjectSecurityContext - Add SeAuditHardLinkCreation, SeAuditHardLinkCreationWithTransaction, SeAuditTransactionStateChange, SeAuditingFileEventsWithContext, SeAuditingAnyFileEventsWithContext, SeAuditingHardLinkEvents, SeAuditingHardLinkEventsWithContext, SeExamineGlobalSacl and SeMaximumAuditMaskFromGlobalSacl Modified: branches/header-work/include/ddk/ntifs.h Modified: branches/header-work/include/ddk/ntifs.h URL:
http://svn.reactos.org/svn/reactos/branches/header-work/include/ddk/ntifs.h…
============================================================================== --- branches/header-work/include/ddk/ntifs.h [iso-8859-1] (original) +++ branches/header-work/include/ddk/ntifs.h [iso-8859-1] Fri Mar 12 00:36:06 2010 @@ -5252,12 +5252,99 @@ IN OUT PULONG Length, IN OUT PSECURITY_DESCRIPTOR *ObjectsSecurityDescriptor); +NTKERNELAPI +NTSTATUS +NTAPI +SeSetSecurityDescriptorInfo( + IN PVOID Object OPTIONAL, + IN PSECURITY_INFORMATION SecurityInformation, + IN PSECURITY_DESCRIPTOR SecurityDescriptor, + IN OUT PSECURITY_DESCRIPTOR *ObjectsSecurityDescriptor, + IN POOL_TYPE PoolType, + IN PGENERIC_MAPPING GenericMapping); + +NTKERNELAPI +NTSTATUS +NTAPI +SeSetSecurityDescriptorInfoEx( + IN PVOID Object OPTIONAL, + IN PSECURITY_INFORMATION SecurityInformation, + IN PSECURITY_DESCRIPTOR ModificationDescriptor, + IN OUT PSECURITY_DESCRIPTOR *ObjectsSecurityDescriptor, + IN ULONG AutoInheritFlags, + IN POOL_TYPE PoolType, + IN PGENERIC_MAPPING GenericMapping); + +NTKERNELAPI +NTSTATUS +NTAPI +SeAppendPrivileges( + IN OUT PACCESS_STATE AccessState, + IN PPRIVILEGE_SET Privileges); + +NTKERNELAPI +BOOLEAN +NTAPI +SeAuditingFileEvents( + IN BOOLEAN AccessGranted, + IN PSECURITY_DESCRIPTOR SecurityDescriptor); + +NTKERNELAPI +BOOLEAN +NTAPI +SeAuditingFileOrGlobalEvents( + IN BOOLEAN AccessGranted, + IN PSECURITY_DESCRIPTOR SecurityDescriptor, + IN PSECURITY_SUBJECT_CONTEXT SubjectSecurityContext); + +VOID +NTAPI +SeSetAccessStateGenericMapping( + IN OUT PACCESS_STATE AccessState, + IN PGENERIC_MAPPING GenericMapping); + +NTKERNELAPI +NTSTATUS +NTAPI +SeRegisterLogonSessionTerminatedRoutine( + IN PSE_LOGON_SESSION_TERMINATED_ROUTINE CallbackRoutine); + +NTKERNELAPI +NTSTATUS +NTAPI +SeUnregisterLogonSessionTerminatedRoutine( + IN PSE_LOGON_SESSION_TERMINATED_ROUTINE CallbackRoutine); + +NTKERNELAPI +NTSTATUS +NTAPI +SeMarkLogonSessionForTerminationNotification( + IN PLUID LogonId); + +NTKERNELAPI +NTSTATUS +NTAPI +SeQueryInformationToken( + IN PACCESS_TOKEN Token, + IN TOKEN_INFORMATION_CLASS TokenInformationClass, + OUT PVOID *TokenInformation); + #endif /* (NTDDI_VERSION >= NTDDI_WIN2K) */ +#if (NTDDI_VERSION >= NTDDI_WIN2KSP3) +NTKERNELAPI +BOOLEAN +NTAPI +SeAuditingHardLinkEvents( + IN BOOLEAN AccessGranted, + IN PSECURITY_DESCRIPTOR SecurityDescriptor); +#endif + #if (NTDDI_VERSION >= NTDDI_WINXP) NTKERNELAPI NTSTATUS +NTAPI SeFilterToken( IN PACCESS_TOKEN ExistingToken, IN ULONG Flags, @@ -5266,7 +5353,35 @@ IN PTOKEN_GROUPS RestrictedSids OPTIONAL, OUT PACCESS_TOKEN *FilteredToken); +NTKERNELAPI +VOID +NTAPI +SeAuditHardLinkCreation( + IN PUNICODE_STRING FileName, + IN PUNICODE_STRING LinkName, + IN BOOLEAN bSuccess); + #endif /* (NTDDI_VERSION >= NTDDI_WINXP) */ + +#if (NTDDI_VERSION >= NTDDI_WINXPSP2) + +NTKERNELAPI +BOOLEAN +NTAPI +SeAuditingFileEventsWithContext( + IN BOOLEAN AccessGranted, + IN PSECURITY_DESCRIPTOR SecurityDescriptor, + IN PSECURITY_SUBJECT_CONTEXT SubjectSecurityContext OPTIONAL); + +NTKERNELAPI +BOOLEAN +NTAPI +SeAuditingHardLinkEventsWithContext( + IN BOOLEAN AccessGranted, + IN PSECURITY_DESCRIPTOR SecurityDescriptor, + IN PSECURITY_SUBJECT_CONTEXT SubjectSecurityContext OPTIONAL); + +#endif #if (NTDDI_VERSION >= NTDDI_VISTA) @@ -5333,13 +5448,62 @@ IN PACCESS_TOKEN Token, IN ULONG SessionId); +NTKERNELAPI +VOID +NTAPI +SeAuditHardLinkCreationWithTransaction( + IN PUNICODE_STRING FileName, + IN PUNICODE_STRING LinkName, + IN BOOLEAN bSuccess, + IN GUID *TransactionId OPTIONAL); + +NTKERNELAPI +VOID +NTAPI +SeAuditTransactionStateChange( + IN GUID *TransactionId, + IN GUID *ResourceManagerId, + IN ULONG NewTransactionState); + #endif /* (NTDDI_VERSION >= NTDDI_VISTA) */ #if (NTDDI_VERSION >= NTDDI_VISTA || (NTDDI_VERSION >= NTDDI_WINXPSP2 && NTDDI_VERSION < NTDDI_WS03)) NTKERNELAPI BOOLEAN +NTAPI SeTokenIsWriteRestricted( IN PACCESS_TOKEN Token); +#endif + +#if (NTDDI_VERSION >= NTDDI_WIN7) + +NTKERNELAPI +BOOLEAN +NTAPI +SeAuditingAnyFileEventsWithContext( + IN PSECURITY_DESCRIPTOR SecurityDescriptor, + IN PSECURITY_SUBJECT_CONTEXT SubjectSecurityContext OPTIONAL); + +NTKERNELAPI +VOID +NTAPI +SeExamineGlobalSacl( + IN PUNICODE_STRING ObjectType, + IN PACCESS_TOKEN Token, + IN ACCESS_MASK DesiredAccess, + IN BOOLEAN AccessGranted, + IN OUT PBOOLEAN GenerateAudit, + IN OUT PBOOLEAN GenerateAlarm OPTIONAL); + +NTKERNELAPI +VOID +NTAPI +SeMaximumAuditMaskFromGlobalSacl( + IN PUNICODE_STRING ObjectTypeName OPTIONAL, + IN ACCESS_MASK GrantedAccess, + IN PACCESS_TOKEN Token, + IN OUT PACCESS_MASK AuditMask); + #endif NTSTATUS @@ -5371,6 +5535,25 @@ SeFreePrivileges( IN PPRIVILEGE_SET Privileges); +NTSTATUS +NTAPI +SeLocateProcessImageName( + IN OUT PEPROCESS Process, + OUT PUNICODE_STRING *pImageFileName); + +extern NTKERNELAPI PSE_EXPORTS SeExports; + +#if !defined(_PSGETCURRENTTHREAD_) +#define _PSGETCURRENTTHREAD_ + +FORCEINLINE +PETHREAD +PsGetCurrentThread( + VOID) +{ + return (PETHREAD)KeGetCurrentThread(); +} +#endif #pragma pack(push,4) @@ -6210,8 +6393,6 @@ LPC_PVOID ViewBase; } REMOTE_PORT_VIEW, *PREMOTE_PORT_VIEW; -extern PSE_EXPORTS SeExports; - typedef struct _TUNNEL { FAST_MUTEX Mutex; PRTL_SPLAY_LINKS Cache; @@ -8668,110 +8849,7 @@ // RTL time functions // -NTKERNELAPI -NTSTATUS -NTAPI -SeAppendPrivileges ( - PACCESS_STATE AccessState, - PPRIVILEGE_SET Privileges -); - -NTKERNELAPI -BOOLEAN -NTAPI -SeAuditingFileEvents ( - IN BOOLEAN AccessGranted, - IN PSECURITY_DESCRIPTOR SecurityDescriptor -); - -NTKERNELAPI -BOOLEAN -NTAPI -SeAuditingFileOrGlobalEvents ( - IN BOOLEAN AccessGranted, - IN PSECURITY_DESCRIPTOR SecurityDescriptor, - IN PSECURITY_SUBJECT_CONTEXT SubjectContext -); - #define SeEnableAccessToExports() SeExports = *(PSE_EXPORTS *)SeExports; - -NTKERNELAPI -NTSTATUS -NTAPI -SeMarkLogonSessionForTerminationNotification ( - IN PLUID LogonId -); - -#if (VER_PRODUCTBUILD >= 2195) - -NTKERNELAPI -NTSTATUS -NTAPI -SeQueryInformationToken ( - IN PACCESS_TOKEN Token, - IN TOKEN_INFORMATION_CLASS TokenInformationClass, - OUT PVOID *TokenInformation -); - -#endif /* (VER_PRODUCTBUILD >= 2195) */ - -NTKERNELAPI -NTSTATUS -NTAPI -SeRegisterLogonSessionTerminatedRoutine ( - IN PSE_LOGON_SESSION_TERMINATED_ROUTINE CallbackRoutine -); - -NTKERNELAPI -VOID -NTAPI -SeSetAccessStateGenericMapping ( - PACCESS_STATE AccessState, - PGENERIC_MAPPING GenericMapping -); - -NTKERNELAPI -NTSTATUS -NTAPI -SeSetSecurityDescriptorInfo ( - IN PVOID Object OPTIONAL, - IN PSECURITY_INFORMATION SecurityInformation, - IN PSECURITY_DESCRIPTOR SecurityDescriptor, - IN OUT PSECURITY_DESCRIPTOR *ObjectsSecurityDescriptor, - IN POOL_TYPE PoolType, - IN PGENERIC_MAPPING GenericMapping -); - -#if (VER_PRODUCTBUILD >= 2195) - -NTKERNELAPI -NTSTATUS -NTAPI -SeSetSecurityDescriptorInfoEx ( - IN PVOID Object OPTIONAL, - IN PSECURITY_INFORMATION SecurityInformation, - IN PSECURITY_DESCRIPTOR ModificationDescriptor, - IN OUT PSECURITY_DESCRIPTOR *ObjectsSecurityDescriptor, - IN ULONG AutoInheritFlags, - IN POOL_TYPE PoolType, - IN PGENERIC_MAPPING GenericMapping -); - -NTSTATUS -NTAPI -SeLocateProcessImageName( - IN PEPROCESS Process, - OUT PUNICODE_STRING *pImageFileName -); - -#endif /* (VER_PRODUCTBUILD >= 2195) */ - -NTKERNELAPI -NTSTATUS -NTAPI -SeUnregisterLogonSessionTerminatedRoutine ( - IN PSE_LOGON_SESSION_TERMINATED_ROUTINE CallbackRoutine -); #if (VER_PRODUCTBUILD >= 2195)
14 years, 10 months
1
0
0
0
[khornicek] 46123: [WIN32K] Prevent a possible memory leak. Use SURFACE_FreeSurfaceByHandle so we don't hit the "Object must not have a handle!" assert in GDIOBJ_FreeObj.
by khornicek@svn.reactos.org
Author: khornicek Date: Fri Mar 12 00:11:00 2010 New Revision: 46123 URL:
http://svn.reactos.org/svn/reactos?rev=46123&view=rev
Log: [WIN32K] Prevent a possible memory leak. Use SURFACE_FreeSurfaceByHandle so we don't hit the "Object must not have a handle!" assert in GDIOBJ_FreeObj. Modified: trunk/reactos/subsystems/win32/win32k/eng/surface.c Modified: trunk/reactos/subsystems/win32/win32k/eng/surface.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/en…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/eng/surface.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/eng/surface.c [iso-8859-1] Fri Mar 12 00:11:00 2010 @@ -466,6 +466,7 @@ SURFOBJ *pso; PSURFACE psurf; SIZEL LocalSize; + BOOLEAN AllocatedLocally = FALSE; /* * First, check the format so we can get the aligned scanline width. @@ -526,7 +527,7 @@ Size = BitmapInfo->Height * ScanLine; } - if (Size) + if (Size) { /* Check for allocation flag */ if (BitmapInfo->Flags & BMF_USERMEM) @@ -541,7 +542,7 @@ Size, TAG_DIB); } - + AllocatedLocally = TRUE; /* Bail out if that failed */ if (!Bits) return NULL; } @@ -554,14 +555,24 @@ /* Allocate the actual surface object structure */ psurf = SURFACE_AllocSurfaceWithHandle(); - if (!psurf) return NULL; - + if (!psurf) + { + if(Bits && AllocatedLocally) + { + if(BitmapInfo->Flags & BMF_USERMEM) + EngFreeUserMem(Bits); + else + EngFreeMem(Bits); + } + return NULL; + } + /* Lock down the surface */ if (!SURFACE_InitBitsLock(psurf)) { /* Bail out if that failed */ SURFACE_UnlockSurface(psurf); - SURFACE_FreeSurface(psurf); + SURFACE_FreeSurfaceByHandle(psurf->BaseObject.hHmgr); return NULL; }
14 years, 10 months
1
0
0
0
[akhaldi] 46122: [NTIFS] - Group related definitions - Add SeOpenObjectAuditAlarmWithTransaction, SeOpenObjectForDeleteAuditAlarmWithTransaction, SeExamineSacl, SeDeleteObjectAuditAlarmWithTransaction, SeTokenIsWriteRestricted, SeFilterToken, SeQueryTokenIntegrity and SeSetSessionIdToken - SeQueryAuthenticationIdToken : LogonId -> AuthenticationId - SeCreateClientSecurity : Fix parameters' names - SeCreateClientSecurityFromSubjectContext : QualityOfService -> ClientSecurityQos
by akhaldi@svn.reactos.org
Author: akhaldi Date: Fri Mar 12 00:07:52 2010 New Revision: 46122 URL:
http://svn.reactos.org/svn/reactos?rev=46122&view=rev
Log: [NTIFS] - Group related definitions - Add SeOpenObjectAuditAlarmWithTransaction, SeOpenObjectForDeleteAuditAlarmWithTransaction, SeExamineSacl, SeDeleteObjectAuditAlarmWithTransaction, SeTokenIsWriteRestricted, SeFilterToken, SeQueryTokenIntegrity and SeSetSessionIdToken - SeQueryAuthenticationIdToken : LogonId -> AuthenticationId - SeCreateClientSecurity : Fix parameters' names - SeCreateClientSecurityFromSubjectContext : QualityOfService -> ClientSecurityQos Modified: branches/header-work/include/ddk/ntifs.h Modified: branches/header-work/include/ddk/ntifs.h URL:
http://svn.reactos.org/svn/reactos/branches/header-work/include/ddk/ntifs.h…
============================================================================== --- branches/header-work/include/ddk/ntifs.h [iso-8859-1] (original) +++ branches/header-work/include/ddk/ntifs.h [iso-8859-1] Fri Mar 12 00:07:52 2010 @@ -5144,6 +5144,202 @@ IN PSECURITY_SUBJECT_CONTEXT SubjectContext, IN KPROCESSOR_MODE AccessMode); +NTKERNELAPI +VOID +NTAPI +SeOpenObjectAuditAlarm( + IN PUNICODE_STRING ObjectTypeName, + IN PVOID Object OPTIONAL, + IN PUNICODE_STRING AbsoluteObjectName OPTIONAL, + IN PSECURITY_DESCRIPTOR SecurityDescriptor, + IN PACCESS_STATE AccessState, + IN BOOLEAN ObjectCreated, + IN BOOLEAN AccessGranted, + IN KPROCESSOR_MODE AccessMode, + OUT PBOOLEAN GenerateOnClose); + +NTKERNELAPI +VOID +NTAPI +SeOpenObjectForDeleteAuditAlarm( + IN PUNICODE_STRING ObjectTypeName, + IN PVOID Object OPTIONAL, + IN PUNICODE_STRING AbsoluteObjectName OPTIONAL, + IN PSECURITY_DESCRIPTOR SecurityDescriptor, + IN PACCESS_STATE AccessState, + IN BOOLEAN ObjectCreated, + IN BOOLEAN AccessGranted, + IN KPROCESSOR_MODE AccessMode, + OUT PBOOLEAN GenerateOnClose); + +NTKERNELAPI +VOID +NTAPI +SeDeleteObjectAuditAlarm( + IN PVOID Object, + IN HANDLE Handle); + +NTKERNELAPI +TOKEN_TYPE +NTAPI +SeTokenType( + IN PACCESS_TOKEN Token); + +NTKERNELAPI +BOOLEAN +NTAPI +SeTokenIsAdmin( + IN PACCESS_TOKEN Token); + +NTKERNELAPI +BOOLEAN +NTAPI +SeTokenIsRestricted( + IN PACCESS_TOKEN Token); + +NTKERNELAPI +NTSTATUS +NTAPI +SeQueryAuthenticationIdToken( + IN PACCESS_TOKEN Token, + OUT PLUID AuthenticationId); + +NTKERNELAPI +NTSTATUS +NTAPI +SeQuerySessionIdToken( + IN PACCESS_TOKEN Token, + OUT PULONG SessionId); + +NTKERNELAPI +NTSTATUS +NTAPI +SeCreateClientSecurity( + IN PETHREAD ClientThread, + IN PSECURITY_QUALITY_OF_SERVICE ClientSecurityQos, + IN BOOLEAN RemoteSession, + OUT PSECURITY_CLIENT_CONTEXT ClientContext); + +NTKERNELAPI +VOID +NTAPI +SeImpersonateClient( + IN PSECURITY_CLIENT_CONTEXT ClientContext, + IN PETHREAD ServerThread OPTIONAL); + +NTKERNELAPI +NTSTATUS +NTAPI +SeImpersonateClientEx( + IN PSECURITY_CLIENT_CONTEXT ClientContext, + IN PETHREAD ServerThread OPTIONAL); + +NTKERNELAPI +NTSTATUS +NTAPI +SeCreateClientSecurityFromSubjectContext( + IN PSECURITY_SUBJECT_CONTEXT SubjectContext, + IN PSECURITY_QUALITY_OF_SERVICE ClientSecurityQos, + IN BOOLEAN ServerIsRemote, + OUT PSECURITY_CLIENT_CONTEXT ClientContext); + +NTKERNELAPI +NTSTATUS +NTAPI +SeQuerySecurityDescriptorInfo( + IN PSECURITY_INFORMATION SecurityInformation, + OUT PSECURITY_DESCRIPTOR SecurityDescriptor, + IN OUT PULONG Length, + IN OUT PSECURITY_DESCRIPTOR *ObjectsSecurityDescriptor); + +#endif /* (NTDDI_VERSION >= NTDDI_WIN2K) */ + +#if (NTDDI_VERSION >= NTDDI_WINXP) + +NTKERNELAPI +NTSTATUS +SeFilterToken( + IN PACCESS_TOKEN ExistingToken, + IN ULONG Flags, + IN PTOKEN_GROUPS SidsToDisable OPTIONAL, + IN PTOKEN_PRIVILEGES PrivilegesToDelete OPTIONAL, + IN PTOKEN_GROUPS RestrictedSids OPTIONAL, + OUT PACCESS_TOKEN *FilteredToken); + +#endif /* (NTDDI_VERSION >= NTDDI_WINXP) */ + +#if (NTDDI_VERSION >= NTDDI_VISTA) + +NTKERNELAPI +VOID +NTAPI +SeOpenObjectAuditAlarmWithTransaction( + IN PUNICODE_STRING ObjectTypeName, + IN PVOID Object OPTIONAL, + IN PUNICODE_STRING AbsoluteObjectName OPTIONAL, + IN PSECURITY_DESCRIPTOR SecurityDescriptor, + IN PACCESS_STATE AccessState, + IN BOOLEAN ObjectCreated, + IN BOOLEAN AccessGranted, + IN KPROCESSOR_MODE AccessMode, + IN GUID *TransactionId OPTIONAL, + OUT PBOOLEAN GenerateOnClose); + +NTKERNELAPI +VOID +NTAPI +SeOpenObjectForDeleteAuditAlarmWithTransaction( + IN PUNICODE_STRING ObjectTypeName, + IN PVOID Object OPTIONAL, + IN PUNICODE_STRING AbsoluteObjectName OPTIONAL, + IN PSECURITY_DESCRIPTOR SecurityDescriptor, + IN PACCESS_STATE AccessState, + IN BOOLEAN ObjectCreated, + IN BOOLEAN AccessGranted, + IN KPROCESSOR_MODE AccessMode, + IN GUID *TransactionId OPTIONAL, + OUT PBOOLEAN GenerateOnClose); + +NTKERNELAPI +VOID +NTAPI +SeExamineSacl( + IN PACL Sacl, + IN PACCESS_TOKEN Token, + IN ACCESS_MASK DesiredAccess, + IN BOOLEAN AccessGranted, + OUT PBOOLEAN GenerateAudit, + OUT PBOOLEAN GenerateAlarm); + +NTKERNELAPI +VOID +NTAPI +SeDeleteObjectAuditAlarmWithTransaction( + IN PVOID Object, + IN HANDLE Handle, + IN GUID *TransactionId OPTIONAL); + +NTKERNELAPI +VOID +NTAPI +SeQueryTokenIntegrity( + IN PACCESS_TOKEN Token, + IN OUT PSID_AND_ATTRIBUTES IntegritySA); + +NTKERNELAPI +NTSTATUS +NTAPI +SeSetSessionIdToken( + IN PACCESS_TOKEN Token, + IN ULONG SessionId); + +#endif /* (NTDDI_VERSION >= NTDDI_VISTA) */ + +#if (NTDDI_VERSION >= NTDDI_VISTA || (NTDDI_VERSION >= NTDDI_WINXPSP2 && NTDDI_VERSION < NTDDI_WS03)) +NTKERNELAPI +BOOLEAN +SeTokenIsWriteRestricted( + IN PACCESS_TOKEN Token); #endif NTSTATUS @@ -5156,6 +5352,7 @@ IN ULONG AuditSubcategoryId); BOOLEAN +NTAPI SeAccessCheckFromState( IN PSECURITY_DESCRIPTOR SecurityDescriptor, IN PTOKEN_ACCESS_INFORMATION PrimaryTokenInformation, @@ -8496,103 +8693,13 @@ IN PSECURITY_SUBJECT_CONTEXT SubjectContext ); -NTKERNELAPI -NTSTATUS -NTAPI -SeCreateClientSecurity ( - IN PETHREAD Thread, - IN PSECURITY_QUALITY_OF_SERVICE QualityOfService, - IN BOOLEAN RemoteClient, - OUT PSECURITY_CLIENT_CONTEXT ClientContext -); - -#if (VER_PRODUCTBUILD >= 2195) - -NTKERNELAPI -NTSTATUS -NTAPI -SeCreateClientSecurityFromSubjectContext ( - IN PSECURITY_SUBJECT_CONTEXT SubjectContext, - IN PSECURITY_QUALITY_OF_SERVICE QualityOfService, - IN BOOLEAN ServerIsRemote, - OUT PSECURITY_CLIENT_CONTEXT ClientContext -); - -#endif /* (VER_PRODUCTBUILD >= 2195) */ - -NTKERNELAPI -VOID -NTAPI -SeDeleteObjectAuditAlarm ( - IN PVOID Object, - IN HANDLE Handle -); - #define SeEnableAccessToExports() SeExports = *(PSE_EXPORTS *)SeExports; - -NTKERNELAPI -VOID -NTAPI -SeImpersonateClient ( - IN PSECURITY_CLIENT_CONTEXT ClientContext, - IN PETHREAD ServerThread OPTIONAL -); - -#if (VER_PRODUCTBUILD >= 2195) - -NTKERNELAPI -NTSTATUS -NTAPI -SeImpersonateClientEx ( - IN PSECURITY_CLIENT_CONTEXT ClientContext, - IN PETHREAD ServerThread OPTIONAL -); - -#endif /* (VER_PRODUCTBUILD >= 2195) */ NTKERNELAPI NTSTATUS NTAPI SeMarkLogonSessionForTerminationNotification ( IN PLUID LogonId -); - -NTKERNELAPI -VOID -NTAPI -SeOpenObjectAuditAlarm ( - IN PUNICODE_STRING ObjectTypeName, - IN PVOID Object OPTIONAL, - IN PUNICODE_STRING AbsoluteObjectName OPTIONAL, - IN PSECURITY_DESCRIPTOR SecurityDescriptor, - IN PACCESS_STATE AccessState, - IN BOOLEAN ObjectCreated, - IN BOOLEAN AccessGranted, - IN KPROCESSOR_MODE AccessMode, - OUT PBOOLEAN GenerateOnClose -); - -NTKERNELAPI -VOID -NTAPI -SeOpenObjectForDeleteAuditAlarm ( - IN PUNICODE_STRING ObjectTypeName, - IN PVOID Object OPTIONAL, - IN PUNICODE_STRING AbsoluteObjectName OPTIONAL, - IN PSECURITY_DESCRIPTOR SecurityDescriptor, - IN PACCESS_STATE AccessState, - IN BOOLEAN ObjectCreated, - IN BOOLEAN AccessGranted, - IN KPROCESSOR_MODE AccessMode, - OUT PBOOLEAN GenerateOnClose -); - -NTKERNELAPI -NTSTATUS -NTAPI -SeQueryAuthenticationIdToken ( - IN PACCESS_TOKEN Token, - OUT PLUID LogonId ); #if (VER_PRODUCTBUILD >= 2195) @@ -8604,28 +8711,6 @@ IN PACCESS_TOKEN Token, IN TOKEN_INFORMATION_CLASS TokenInformationClass, OUT PVOID *TokenInformation -); - -#endif /* (VER_PRODUCTBUILD >= 2195) */ - -NTKERNELAPI -NTSTATUS -NTAPI -SeQuerySecurityDescriptorInfo ( - IN PSECURITY_INFORMATION SecurityInformation, - OUT PSECURITY_DESCRIPTOR SecurityDescriptor, - IN OUT PULONG Length, - IN PSECURITY_DESCRIPTOR *ObjectsSecurityDescriptor -); - -#if (VER_PRODUCTBUILD >= 2195) - -NTKERNELAPI -NTSTATUS -NTAPI -SeQuerySessionIdToken ( - IN PACCESS_TOKEN Token, - IN PULONG SessionId ); #endif /* (VER_PRODUCTBUILD >= 2195) */ @@ -8672,21 +8757,6 @@ IN PGENERIC_MAPPING GenericMapping ); -NTKERNELAPI -BOOLEAN -NTAPI -SeTokenIsAdmin ( - IN PACCESS_TOKEN Token -); - -NTKERNELAPI -BOOLEAN -NTAPI -SeTokenIsRestricted ( - IN PACCESS_TOKEN Token -); - - NTSTATUS NTAPI SeLocateProcessImageName( @@ -8695,13 +8765,6 @@ ); #endif /* (VER_PRODUCTBUILD >= 2195) */ - -NTKERNELAPI -TOKEN_TYPE -NTAPI -SeTokenType ( - IN PACCESS_TOKEN Token -); NTKERNELAPI NTSTATUS
14 years, 10 months
1
0
0
0
[cgutman] 46121: - Use the possible resources not the current resources for IRP_MN_QUERY_RESOURCE_REQUIREMENTS - Initialize MaximumVector for IRQs, MaximumChannel for DMA, and Alignment for Port
by cgutman@svn.reactos.org
Author: cgutman Date: Thu Mar 11 23:36:22 2010 New Revision: 46121 URL:
http://svn.reactos.org/svn/reactos?rev=46121&view=rev
Log: - Use the possible resources not the current resources for IRP_MN_QUERY_RESOURCE_REQUIREMENTS - Initialize MaximumVector for IRQs, MaximumChannel for DMA, and Alignment for Port Modified: trunk/reactos/drivers/bus/acpi/buspdo.c Modified: trunk/reactos/drivers/bus/acpi/buspdo.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/buspdo.c?…
============================================================================== --- trunk/reactos/drivers/bus/acpi/buspdo.c [iso-8859-1] (original) +++ trunk/reactos/drivers/bus/acpi/buspdo.c [iso-8859-1] Thu Mar 11 23:36:22 2010 @@ -695,25 +695,25 @@ { ResourceDescriptor->Type = CmResourceTypeDma; ResourceDescriptor->Flags = 0; - switch (dma_data->Type) - { - case ACPI_TYPE_A: ResourceDescriptor->Flags |= CM_RESOURCE_DMA_TYPE_A; break; - case ACPI_TYPE_B: ResourceDescriptor->Flags |= CM_RESOURCE_DMA_TYPE_B; break; - case ACPI_TYPE_F: ResourceDescriptor->Flags |= CM_RESOURCE_DMA_TYPE_F; break; + switch (dma_data->Type) + { + case ACPI_TYPE_A: ResourceDescriptor->Flags |= CM_RESOURCE_DMA_TYPE_A; break; + case ACPI_TYPE_B: ResourceDescriptor->Flags |= CM_RESOURCE_DMA_TYPE_B; break; + case ACPI_TYPE_F: ResourceDescriptor->Flags |= CM_RESOURCE_DMA_TYPE_F; break; + } + if (dma_data->BusMaster == ACPI_BUS_MASTER) + ResourceDescriptor->Flags |= CM_RESOURCE_DMA_BUS_MASTER; + switch (dma_data->Transfer) + { + case ACPI_TRANSFER_8: ResourceDescriptor->Flags |= CM_RESOURCE_DMA_8; break; + case ACPI_TRANSFER_16: ResourceDescriptor->Flags |= CM_RESOURCE_DMA_16; break; + case ACPI_TRANSFER_8_16: ResourceDescriptor->Flags |= CM_RESOURCE_DMA_8_AND_16; break; + } + ResourceDescriptor->u.Dma.Channel = dma_data->Channels[i]; + + ResourceDescriptor++; } - if (dma_data->BusMaster == ACPI_BUS_MASTER) - ResourceDescriptor->Flags |= CM_RESOURCE_DMA_BUS_MASTER; - switch (dma_data->Transfer) - { - case ACPI_TRANSFER_8: ResourceDescriptor->Flags |= CM_RESOURCE_DMA_8; break; - case ACPI_TRANSFER_16: ResourceDescriptor->Flags |= CM_RESOURCE_DMA_16; break; - case ACPI_TRANSFER_8_16: ResourceDescriptor->Flags |= CM_RESOURCE_DMA_8_AND_16; break; - } - ResourceDescriptor->u.Dma.Channel = dma_data->Channels[i]; - - ResourceDescriptor++; - } - break; + break; } case ACPI_RESOURCE_TYPE_IO: { @@ -757,24 +757,39 @@ ULONG i, RequirementsListSize; PIO_RESOURCE_REQUIREMENTS_LIST RequirementsList; PIO_RESOURCE_DESCRIPTOR RequirementDescriptor; + BOOLEAN CurrentRes = FALSE; PAGED_CODE (); /* Get current resources */ - Buffer.Length = 0; - AcpiStatus = AcpiGetCurrentResources(DeviceData->AcpiHandle, &Buffer); - if ((!ACPI_SUCCESS(AcpiStatus) && AcpiStatus != AE_BUFFER_OVERFLOW) || - Buffer.Length == 0) + while (TRUE) { - return Irp->IoStatus.Status; + Buffer.Length = 0; + if (CurrentRes) + AcpiStatus = AcpiGetCurrentResources(DeviceData->AcpiHandle, &Buffer); + else + AcpiStatus = AcpiGetPossibleResources(DeviceData->AcpiHandle, &Buffer); + if ((!ACPI_SUCCESS(AcpiStatus) && AcpiStatus != AE_BUFFER_OVERFLOW) || + Buffer.Length == 0) + { + if (!CurrentRes) + CurrentRes = TRUE; + else + return Irp->IoStatus.Status; + } + else + break; } Buffer.Pointer = ExAllocatePool(PagedPool, Buffer.Length); if (!Buffer.Pointer) return STATUS_INSUFFICIENT_RESOURCES; - AcpiStatus = AcpiGetCurrentResources(DeviceData->AcpiHandle, &Buffer); + if (CurrentRes) + AcpiStatus = AcpiGetCurrentResources(DeviceData->AcpiHandle, &Buffer); + else + AcpiStatus = AcpiGetPossibleResources(DeviceData->AcpiHandle, &Buffer); if (!ACPI_SUCCESS(AcpiStatus)) { DPRINT1("AcpiGetCurrentResources #2 failed (0x%x)\n", AcpiStatus); @@ -841,11 +856,12 @@ ACPI_RESOURCE_IRQ *irq_data = (ACPI_RESOURCE_IRQ*) &resource->Data; for (i = 0; i < irq_data->InterruptCount; i++) { - RequirementDescriptor->Option = 0; /* Required */ + RequirementDescriptor->Option = CurrentRes ? 0 : IO_RESOURCE_PREFERRED; RequirementDescriptor->Type = CmResourceTypeInterrupt; RequirementDescriptor->ShareDisposition = (irq_data->Sharable == ACPI_SHARED ? CmResourceShareShared : CmResourceShareDeviceExclusive); RequirementDescriptor->Flags =(irq_data->Triggering == ACPI_LEVEL_SENSITIVE ? CM_RESOURCE_INTERRUPT_LEVEL_SENSITIVE : CM_RESOURCE_INTERRUPT_LATCHED); - RequirementDescriptor->u.Interrupt.MinimumVector = irq_data->Interrupts[i]; + RequirementDescriptor->u.Interrupt.MinimumVector = + RequirementDescriptor->u.Interrupt.MaximumVector = irq_data->Interrupts[i]; RequirementDescriptor++; } @@ -858,27 +874,28 @@ { RequirementDescriptor->Type = CmResourceTypeDma; RequirementDescriptor->Flags = 0; - switch (dma_data->Type) - { - case ACPI_TYPE_A: RequirementDescriptor->Flags |= CM_RESOURCE_DMA_TYPE_A; break; - case ACPI_TYPE_B: RequirementDescriptor->Flags |= CM_RESOURCE_DMA_TYPE_B; break; - case ACPI_TYPE_F: RequirementDescriptor->Flags |= CM_RESOURCE_DMA_TYPE_F; break; + switch (dma_data->Type) + { + case ACPI_TYPE_A: RequirementDescriptor->Flags |= CM_RESOURCE_DMA_TYPE_A; break; + case ACPI_TYPE_B: RequirementDescriptor->Flags |= CM_RESOURCE_DMA_TYPE_B; break; + case ACPI_TYPE_F: RequirementDescriptor->Flags |= CM_RESOURCE_DMA_TYPE_F; break; + } + if (dma_data->BusMaster == ACPI_BUS_MASTER) + RequirementDescriptor->Flags |= CM_RESOURCE_DMA_BUS_MASTER; + switch (dma_data->Transfer) + { + case ACPI_TRANSFER_8: RequirementDescriptor->Flags |= CM_RESOURCE_DMA_8; break; + case ACPI_TRANSFER_16: RequirementDescriptor->Flags |= CM_RESOURCE_DMA_16; break; + case ACPI_TRANSFER_8_16: RequirementDescriptor->Flags |= CM_RESOURCE_DMA_8_AND_16; break; + } + + RequirementDescriptor->Option = CurrentRes ? 0 : IO_RESOURCE_PREFERRED; + RequirementDescriptor->ShareDisposition = CmResourceShareDriverExclusive; + RequirementDescriptor->u.Dma.MinimumChannel = + RequirementDescriptor->u.Dma.MaximumChannel = dma_data->Channels[i]; + RequirementDescriptor++; } - if (dma_data->BusMaster == ACPI_BUS_MASTER) - RequirementDescriptor->Flags |= CM_RESOURCE_DMA_BUS_MASTER; - switch (dma_data->Transfer) - { - case ACPI_TRANSFER_8: RequirementDescriptor->Flags |= CM_RESOURCE_DMA_8; break; - case ACPI_TRANSFER_16: RequirementDescriptor->Flags |= CM_RESOURCE_DMA_16; break; - case ACPI_TRANSFER_8_16: RequirementDescriptor->Flags |= CM_RESOURCE_DMA_8_AND_16; break; - } - - RequirementDescriptor->Option = 0; /* Required */ - RequirementDescriptor->ShareDisposition = CmResourceShareDriverExclusive; - RequirementDescriptor->u.Dma.MinimumChannel = dma_data->Channels[i]; - RequirementDescriptor++; - } - break; + break; } case ACPI_RESOURCE_TYPE_IO: { @@ -891,10 +908,10 @@ RequirementDescriptor->u.Port.Length = io_data->AddressLength; - RequirementDescriptor->Option = 0; /* Required */ + RequirementDescriptor->Option = CurrentRes ? 0 : IO_RESOURCE_PREFERRED; RequirementDescriptor->Type = CmResourceTypePort; RequirementDescriptor->ShareDisposition = CmResourceShareDriverExclusive; - RequirementDescriptor->u.Port.Alignment = 1; /* Start address is specified, so it doesn't matter */ + RequirementDescriptor->u.Port.Alignment = io_data->Alignment; RequirementDescriptor->u.Port.MinimumAddress.QuadPart = io_data->Minimum; RequirementDescriptor->u.Port.MaximumAddress.QuadPart = io_data->Maximum;
14 years, 10 months
1
0
0
0
[akhaldi] 46120: [NTIFS] - Group related definitions - Add ExInitializePushLock, SeReportSecurityEventWithSubCategory, SeAccessCheckFromState, SeStopImpersonatingClient and TOKEN_* definitions - Update SE_EXPORTS
by akhaldi@svn.reactos.org
Author: akhaldi Date: Thu Mar 11 23:33:08 2010 New Revision: 46120 URL:
http://svn.reactos.org/svn/reactos?rev=46120&view=rev
Log: [NTIFS] - Group related definitions - Add ExInitializePushLock, SeReportSecurityEventWithSubCategory, SeAccessCheckFromState, SeStopImpersonatingClient and TOKEN_* definitions - Update SE_EXPORTS Modified: branches/header-work/include/ddk/ntifs.h Modified: branches/header-work/include/ddk/ntifs.h URL:
http://svn.reactos.org/svn/reactos/branches/header-work/include/ddk/ntifs.h…
============================================================================== --- branches/header-work/include/ddk/ntifs.h [iso-8859-1] (original) +++ branches/header-work/include/ddk/ntifs.h [iso-8859-1] Thu Mar 11 23:33:08 2010 @@ -4972,6 +4972,10 @@ #define EX_PUSH_LOCK ULONG_PTR #define PEX_PUSH_LOCK PULONG_PTR +VOID +ExInitializePushLock ( + OUT PEX_PUSH_LOCK PushLock); + #if (NTDDI_VERSION >= NTDDI_WINXP) PSLIST_ENTRY FASTCALL @@ -4999,6 +5003,176 @@ #endif /* #endif */ +#define TOKEN_HAS_TRAVERSE_PRIVILEGE 0x0001 +#define TOKEN_HAS_BACKUP_PRIVILEGE 0x0002 +#define TOKEN_HAS_RESTORE_PRIVILEGE 0x0004 +#define TOKEN_WRITE_RESTRICTED 0x0008 +#define TOKEN_IS_RESTRICTED 0x0010 +#define TOKEN_SESSION_NOT_REFERENCED 0x0020 +#define TOKEN_SANDBOX_INERT 0x0040 +#define TOKEN_HAS_IMPERSONATE_PRIVILEGE 0x0080 +#define SE_BACKUP_PRIVILEGES_CHECKED 0x0100 +#define TOKEN_VIRTUALIZE_ALLOWED 0x0200 +#define TOKEN_VIRTUALIZE_ENABLED 0x0400 +#define TOKEN_IS_FILTERED 0x0800 +#define TOKEN_UIACCESS 0x1000 +#define TOKEN_NOT_LOW 0x2000 + +typedef struct _SE_EXPORTS { + LUID SeCreateTokenPrivilege; + LUID SeAssignPrimaryTokenPrivilege; + LUID SeLockMemoryPrivilege; + LUID SeIncreaseQuotaPrivilege; + LUID SeUnsolicitedInputPrivilege; + LUID SeTcbPrivilege; + LUID SeSecurityPrivilege; + LUID SeTakeOwnershipPrivilege; + LUID SeLoadDriverPrivilege; + LUID SeCreatePagefilePrivilege; + LUID SeIncreaseBasePriorityPrivilege; + LUID SeSystemProfilePrivilege; + LUID SeSystemtimePrivilege; + LUID SeProfileSingleProcessPrivilege; + LUID SeCreatePermanentPrivilege; + LUID SeBackupPrivilege; + LUID SeRestorePrivilege; + LUID SeShutdownPrivilege; + LUID SeDebugPrivilege; + LUID SeAuditPrivilege; + LUID SeSystemEnvironmentPrivilege; + LUID SeChangeNotifyPrivilege; + LUID SeRemoteShutdownPrivilege; + PSID SeNullSid; + PSID SeWorldSid; + PSID SeLocalSid; + PSID SeCreatorOwnerSid; + PSID SeCreatorGroupSid; + PSID SeNtAuthoritySid; + PSID SeDialupSid; + PSID SeNetworkSid; + PSID SeBatchSid; + PSID SeInteractiveSid; + PSID SeLocalSystemSid; + PSID SeAliasAdminsSid; + PSID SeAliasUsersSid; + PSID SeAliasGuestsSid; + PSID SeAliasPowerUsersSid; + PSID SeAliasAccountOpsSid; + PSID SeAliasSystemOpsSid; + PSID SeAliasPrintOpsSid; + PSID SeAliasBackupOpsSid; + PSID SeAuthenticatedUsersSid; + PSID SeRestrictedSid; + PSID SeAnonymousLogonSid; + LUID SeUndockPrivilege; + LUID SeSyncAgentPrivilege; + LUID SeEnableDelegationPrivilege; + PSID SeLocalServiceSid; + PSID SeNetworkServiceSid; + LUID SeManageVolumePrivilege; + LUID SeImpersonatePrivilege; + LUID SeCreateGlobalPrivilege; + LUID SeTrustedCredManAccessPrivilege; + LUID SeRelabelPrivilege; + LUID SeIncreaseWorkingSetPrivilege; + LUID SeTimeZonePrivilege; + LUID SeCreateSymbolicLinkPrivilege; + PSID SeIUserSid; + PSID SeUntrustedMandatorySid; + PSID SeLowMandatorySid; + PSID SeMediumMandatorySid; + PSID SeHighMandatorySid; + PSID SeSystemMandatorySid; + PSID SeOwnerRightsSid; +} SE_EXPORTS, *PSE_EXPORTS; + +typedef NTSTATUS +(NTAPI *PSE_LOGON_SESSION_TERMINATED_ROUTINE)( + IN PLUID LogonId); + +#define SeLengthSid( Sid ) \ + (8 + (4 * ((SID *)Sid)->SubAuthorityCount)) + +#define SeDeleteClientSecurity(C) { \ + if (SeTokenType((C)->ClientToken) == TokenPrimary) { \ + PsDereferencePrimaryToken( (C)->ClientToken ); \ + } else { \ + PsDereferenceImpersonationToken( (C)->ClientToken ); \ + } \ +} + +#define SeStopImpersonatingClient() PsRevertToSelf() + +#define SeQuerySubjectContextToken( SubjectContext ) \ + ( ARGUMENT_PRESENT( \ + ((PSECURITY_SUBJECT_CONTEXT) SubjectContext)->ClientToken \ + ) ? \ + ((PSECURITY_SUBJECT_CONTEXT) SubjectContext)->ClientToken : \ + ((PSECURITY_SUBJECT_CONTEXT) SubjectContext)->PrimaryToken ) + +#if (NTDDI_VERSION >= NTDDI_WIN2K) + +NTKERNELAPI +VOID +NTAPI +SeCaptureSubjectContext( + OUT PSECURITY_SUBJECT_CONTEXT SubjectContext); + +NTKERNELAPI +VOID +NTAPI +SeLockSubjectContext( + IN PSECURITY_SUBJECT_CONTEXT SubjectContext); + +NTKERNELAPI +VOID +NTAPI +SeUnlockSubjectContext( + IN PSECURITY_SUBJECT_CONTEXT SubjectContext); + +NTKERNELAPI +VOID +NTAPI +SeReleaseSubjectContext( + IN PSECURITY_SUBJECT_CONTEXT SubjectContext); + +NTKERNELAPI +BOOLEAN +NTAPI +SePrivilegeCheck( + IN OUT PPRIVILEGE_SET RequiredPrivileges, + IN PSECURITY_SUBJECT_CONTEXT SubjectContext, + IN KPROCESSOR_MODE AccessMode); + +#endif + +NTSTATUS +NTAPI +SeReportSecurityEventWithSubCategory( + IN ULONG Flags, + IN PUNICODE_STRING SourceName, + IN PSID UserSid OPTIONAL, + IN PSE_ADT_PARAMETER_ARRAY AuditParameters, + IN ULONG AuditSubcategoryId); + +BOOLEAN +SeAccessCheckFromState( + IN PSECURITY_DESCRIPTOR SecurityDescriptor, + IN PTOKEN_ACCESS_INFORMATION PrimaryTokenInformation, + IN PTOKEN_ACCESS_INFORMATION ClientTokenInformation OPTIONAL, + IN ACCESS_MASK DesiredAccess, + IN ACCESS_MASK PreviouslyGrantedAccess, + OUT PPRIVILEGE_SET *Privileges OPTIONAL, + IN PGENERIC_MAPPING GenericMapping, + IN KPROCESSOR_MODE AccessMode, + OUT PACCESS_MASK GrantedAccess, + OUT PNTSTATUS AccessStatus); + +NTKERNELAPI +VOID +NTAPI +SeFreePrivileges( + IN PPRIVILEGE_SET Privileges); #pragma pack(push,4) @@ -5147,13 +5321,7 @@ /* end winnt.h */ -#define TOKEN_HAS_TRAVERSE_PRIVILEGE 0x01 -#define TOKEN_HAS_BACKUP_PRIVILEGE 0x02 -#define TOKEN_HAS_RESTORE_PRIVILEGE 0x04 #define TOKEN_HAS_ADMIN_GROUP 0x08 -#define TOKEN_WRITE_RESTRICTED 0x08 -#define TOKEN_IS_RESTRICTED 0x10 -#define SE_BACKUP_PRIVILEGES_CHECKED 0x0100 #define VACB_MAPPING_GRANULARITY (0x40000) #define VACB_OFFSET_SHIFT (18) @@ -5845,64 +6013,6 @@ LPC_PVOID ViewBase; } REMOTE_PORT_VIEW, *PREMOTE_PORT_VIEW; -typedef struct _SE_EXPORTS { - - LUID SeCreateTokenPrivilege; - LUID SeAssignPrimaryTokenPrivilege; - LUID SeLockMemoryPrivilege; - LUID SeIncreaseQuotaPrivilege; - LUID SeUnsolicitedInputPrivilege; - LUID SeTcbPrivilege; - LUID SeSecurityPrivilege; - LUID SeTakeOwnershipPrivilege; - LUID SeLoadDriverPrivilege; - LUID SeCreatePagefilePrivilege; - LUID SeIncreaseBasePriorityPrivilege; - LUID SeSystemProfilePrivilege; - LUID SeSystemtimePrivilege; - LUID SeProfileSingleProcessPrivilege; - LUID SeCreatePermanentPrivilege; - LUID SeBackupPrivilege; - LUID SeRestorePrivilege; - LUID SeShutdownPrivilege; - LUID SeDebugPrivilege; - LUID SeAuditPrivilege; - LUID SeSystemEnvironmentPrivilege; - LUID SeChangeNotifyPrivilege; - LUID SeRemoteShutdownPrivilege; - - PSID SeNullSid; - PSID SeWorldSid; - PSID SeLocalSid; - PSID SeCreatorOwnerSid; - PSID SeCreatorGroupSid; - - PSID SeNtAuthoritySid; - PSID SeDialupSid; - PSID SeNetworkSid; - PSID SeBatchSid; - PSID SeInteractiveSid; - PSID SeLocalSystemSid; - PSID SeAliasAdminsSid; - PSID SeAliasUsersSid; - PSID SeAliasGuestsSid; - PSID SeAliasPowerUsersSid; - PSID SeAliasAccountOpsSid; - PSID SeAliasSystemOpsSid; - PSID SeAliasPrintOpsSid; - PSID SeAliasBackupOpsSid; - - PSID SeAuthenticatedUsersSid; - - PSID SeRestrictedSid; - PSID SeAnonymousLogonSid; - - LUID SeUndockPrivilege; - LUID SeSyncAgentPrivilege; - LUID SeEnableDelegationPrivilege; - -} SE_EXPORTS, *PSE_EXPORTS; - extern PSE_EXPORTS SeExports; typedef struct _TUNNEL { @@ -8387,13 +8497,6 @@ ); NTKERNELAPI -VOID -NTAPI -SeCaptureSubjectContext ( - OUT PSECURITY_SUBJECT_CONTEXT SubjectContext -); - -NTKERNELAPI NTSTATUS NTAPI SeCreateClientSecurity ( @@ -8417,18 +8520,6 @@ #endif /* (VER_PRODUCTBUILD >= 2195) */ - -#define SeLengthSid( Sid ) \ - (8 + (4 * ((SID *)Sid)->SubAuthorityCount)) - -#define SeDeleteClientSecurity(C) { \ - if (SeTokenType((C)->ClientToken) == TokenPrimary) { \ - PsDereferencePrimaryToken( (C)->ClientToken ); \ - } else { \ - PsDereferenceImpersonationToken( (C)->ClientToken ); \ - } \ -} - NTKERNELAPI VOID NTAPI @@ -8442,13 +8533,6 @@ NTKERNELAPI VOID NTAPI -SeFreePrivileges ( - IN PPRIVILEGE_SET Privileges -); - -NTKERNELAPI -VOID -NTAPI SeImpersonateClient ( IN PSECURITY_CLIENT_CONTEXT ClientContext, IN PETHREAD ServerThread OPTIONAL @@ -8465,13 +8549,6 @@ ); #endif /* (VER_PRODUCTBUILD >= 2195) */ - -NTKERNELAPI -VOID -NTAPI -SeLockSubjectContext ( - IN PSECURITY_SUBJECT_CONTEXT SubjectContext -); NTKERNELAPI NTSTATUS @@ -8511,15 +8588,6 @@ ); NTKERNELAPI -BOOLEAN -NTAPI -SePrivilegeCheck ( - IN OUT PPRIVILEGE_SET RequiredPrivileges, - IN PSECURITY_SUBJECT_CONTEXT SubjectContext, - IN KPROCESSOR_MODE AccessMode -); - -NTKERNELAPI NTSTATUS NTAPI SeQueryAuthenticationIdToken ( @@ -8562,29 +8630,11 @@ #endif /* (VER_PRODUCTBUILD >= 2195) */ -#define SeQuerySubjectContextToken( SubjectContext ) \ - ( ARGUMENT_PRESENT( \ - ((PSECURITY_SUBJECT_CONTEXT) SubjectContext)->ClientToken \ - ) ? \ - ((PSECURITY_SUBJECT_CONTEXT) SubjectContext)->ClientToken : \ - ((PSECURITY_SUBJECT_CONTEXT) SubjectContext)->PrimaryToken ) - -typedef NTSTATUS (NTAPI *PSE_LOGON_SESSION_TERMINATED_ROUTINE) ( - IN PLUID LogonId -); - NTKERNELAPI NTSTATUS NTAPI SeRegisterLogonSessionTerminatedRoutine ( IN PSE_LOGON_SESSION_TERMINATED_ROUTINE CallbackRoutine -); - -NTKERNELAPI -VOID -NTAPI -SeReleaseSubjectContext ( - IN PSECURITY_SUBJECT_CONTEXT SubjectContext ); NTKERNELAPI @@ -8651,13 +8701,6 @@ NTAPI SeTokenType ( IN PACCESS_TOKEN Token -); - -NTKERNELAPI -VOID -NTAPI -SeUnlockSubjectContext ( - IN PSECURITY_SUBJECT_CONTEXT SubjectContext ); NTKERNELAPI
14 years, 10 months
1
0
0
0
[cgutman] 46119: - Fix the resource parsing loops to correct a memory corruption issue - Return the correct failure status if ExAllocatePool fails
by cgutman@svn.reactos.org
Author: cgutman Date: Thu Mar 11 23:15:21 2010 New Revision: 46119 URL:
http://svn.reactos.org/svn/reactos?rev=46119&view=rev
Log: - Fix the resource parsing loops to correct a memory corruption issue - Return the correct failure status if ExAllocatePool fails Modified: trunk/reactos/drivers/bus/acpi/buspdo.c Modified: trunk/reactos/drivers/bus/acpi/buspdo.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/buspdo.c?…
============================================================================== --- trunk/reactos/drivers/bus/acpi/buspdo.c [iso-8859-1] (original) +++ trunk/reactos/drivers/bus/acpi/buspdo.c [iso-8859-1] Thu Mar 11 23:15:21 2010 @@ -585,7 +585,6 @@ PPDO_DEVICE_DATA DeviceData, PIRP Irp ) { - BOOLEAN Done; ULONG NumberOfResources = 0; PCM_RESOURCE_LIST ResourceList; PCM_PARTIAL_RESOURCE_DESCRIPTOR ResourceDescriptor; @@ -595,7 +594,6 @@ ULONG ResourceListSize; ULONG i; - /* Get current resources */ Buffer.Length = 0; AcpiStatus = AcpiGetCurrentResources(DeviceData->AcpiHandle, &Buffer); @@ -619,8 +617,7 @@ resource= Buffer.Pointer; /* Count number of resources */ - Done = FALSE; - while (!Done) + while (resource->Type != ACPI_RESOURCE_TYPE_END_TAG) { switch (resource->Type) { @@ -641,13 +638,9 @@ NumberOfResources++; break; } - case ACPI_RESOURCE_TYPE_END_TAG: - { - Done = TRUE; - break; - } default: { + DPRINT1("Unknown resource type: %d\n", resource->Type); break; } } @@ -659,7 +652,10 @@ ResourceList = (PCM_RESOURCE_LIST)ExAllocatePool(PagedPool, ResourceListSize); if (!ResourceList) - return FALSE; + { + ExFreePool(Buffer.Pointer); + return STATUS_INSUFFICIENT_RESOURCES; + } ResourceList->Count = 1; ResourceList->List[0].InterfaceType = Internal; /* FIXME */ ResourceList->List[0].BusNumber = 0; /* We're the only ACPI bus device in the system */ @@ -669,8 +665,7 @@ ResourceDescriptor = ResourceList->List[0].PartialResourceList.PartialDescriptors; /* Fill resources list structure */ - Done = FALSE; - while (!Done) + while (resource->Type != ACPI_RESOURCE_TYPE_END_TAG) { switch (resource->Type) { @@ -737,14 +732,8 @@ ResourceDescriptor++; break; } - case ACPI_RESOURCE_TYPE_END_TAG: - { - Done = TRUE; - break; - } default: { - DPRINT1("Unhandled resource type\n"); break; } } @@ -761,7 +750,6 @@ PPDO_DEVICE_DATA DeviceData, PIRP Irp ) { - BOOLEAN Done; ULONG NumberOfResources = 0; ACPI_STATUS AcpiStatus; ACPI_BUFFER Buffer; @@ -796,8 +784,7 @@ resource= Buffer.Pointer; /* Count number of resources */ - Done = FALSE; - while (!Done) + while (resource->Type != ACPI_RESOURCE_TYPE_END_TAG) { switch (resource->Type) { @@ -818,11 +805,6 @@ NumberOfResources++; break; } - case ACPI_RESOURCE_TYPE_END_TAG: - { - Done = TRUE; - break; - } default: { break; @@ -837,7 +819,7 @@ if (!RequirementsList) { ExFreePool(Buffer.Pointer); - return STATUS_SUCCESS; + return STATUS_INSUFFICIENT_RESOURCES; } RequirementsList->ListSize = RequirementsListSize; RequirementsList->InterfaceType = Internal; @@ -850,8 +832,7 @@ RequirementDescriptor = RequirementsList->List[0].Descriptors; /* Fill resources list structure */ - Done = FALSE; - while (!Done) + while (resource->Type != ACPI_RESOURCE_TYPE_END_TAG) { switch (resource->Type) { @@ -920,14 +901,8 @@ RequirementDescriptor++; break; } - case ACPI_RESOURCE_TYPE_END_TAG: - { - Done = TRUE; - break; - } default: { - DPRINT1("Unhandled resource type\n"); break; } }
14 years, 10 months
1
0
0
0
← Newer
1
...
48
49
50
51
52
53
54
...
90
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
Results per page:
10
25
50
100
200