Author: hpoussin
Date: Sun Nov 2 22:56:53 2014
New Revision: 65204
URL:
http://svn.reactos.org/svn/reactos?rev=65204&view=rev
Log:
[NTFS] Implement IRP_MJ_QUERY_INFORMATION/FileNetworkOpenInformation:
We are now able to execute some binaries on a NTFS partition.
Modified:
trunk/reactos/drivers/filesystems/ntfs/finfo.c
Modified: trunk/reactos/drivers/filesystems/ntfs/finfo.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ntfs/f…
==============================================================================
--- trunk/reactos/drivers/filesystems/ntfs/finfo.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/ntfs/finfo.c [iso-8859-1] Sun Nov 2 22:56:53 2014
@@ -204,6 +204,31 @@
return STATUS_SUCCESS;
}
+static
+NTSTATUS
+NtfsGetNetworkOpenInformation(PNTFS_FCB Fcb,
+ PDEVICE_EXTENSION DeviceExt,
+ PFILE_NETWORK_OPEN_INFORMATION NetworkInfo,
+ PULONG BufferLength)
+{
+ PFILENAME_ATTRIBUTE FileName = &Fcb->Entry;
+
+ if (*BufferLength < sizeof(FILE_NETWORK_OPEN_INFORMATION))
+ return(STATUS_BUFFER_OVERFLOW);
+
+ NetworkInfo->CreationTime.QuadPart = FileName->CreationTime;
+ NetworkInfo->LastAccessTime.QuadPart = FileName->LastAccessTime;
+ NetworkInfo->LastWriteTime.QuadPart = FileName->LastWriteTime;
+ NetworkInfo->ChangeTime.QuadPart = FileName->ChangeTime;
+
+ NetworkInfo->EndOfFile.QuadPart = FileName->AllocatedSize;
+ NetworkInfo->AllocationSize.QuadPart = ROUND_UP(FileName->AllocatedSize,
DeviceExt->NtfsInfo.BytesPerCluster);
+
+ NtfsFileFlagsToAttributes(FileName->FileAttributes,
&NetworkInfo->FileAttributes);
+
+ *BufferLength -= sizeof(FILE_NETWORK_OPEN_INFORMATION);
+ return STATUS_SUCCESS;
+}
/*
* FUNCTION: Retrieve the specified file information
@@ -268,6 +293,13 @@
&BufferLength);
break;
+ case FileNetworkOpenInformation:
+ Status = NtfsGetNetworkOpenInformation(Fcb,
+ DeviceObject->DeviceExtension,
+ SystemBuffer,
+ &BufferLength);
+ break;
+
case FileAlternateNameInformation:
case FileAllInformation:
Status = STATUS_NOT_IMPLEMENTED;