Author: dchapyshev Date: Sat Aug 15 11:39:56 2009 New Revision: 42684
URL: http://svn.reactos.org/svn/reactos?rev=42684&view=rev Log: - Handle query security descriptor - Add SEH protection
Modified: trunk/reactos/ntoskrnl/io/iomgr/file.c
Modified: trunk/reactos/ntoskrnl/io/iomgr/file.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/iomgr/file.c?re... ============================================================================== --- trunk/reactos/ntoskrnl/io/iomgr/file.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/io/iomgr/file.c [iso-8859-1] Sat Aug 15 11:39:56 2009 @@ -1107,8 +1107,10 @@ /* Check what kind of request this was */ if (OperationCode == QuerySecurityDescriptor) { - DPRINT1("FIXME: Device Query security descriptor UNHANDLED\n"); - return STATUS_SUCCESS; + return SeQuerySecurityDescriptorInfo(SecurityInformation, + SecurityDescriptor, + BufferLength, + &DeviceObject->SecurityDescriptor); } else if (OperationCode == DeleteSecurityDescriptor) { @@ -1262,8 +1264,16 @@ /* Callers usually expect the normalized form */ if (Status == STATUS_BUFFER_OVERFLOW) Status = STATUS_BUFFER_TOO_SMALL;
- /* Return length */ - *BufferLength = IoStatusBlock.Information; + _SEH2_TRY + { + /* Return length */ + *BufferLength = IoStatusBlock.Information; + } + _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) + { + Status = _SEH2_GetExceptionCode(); + } + _SEH2_END; }
/* Return Status */