summaryrefslogtreecommitdiff
path: root/filesys
diff options
context:
space:
mode:
authorkarlf <[email protected]>2016-08-11 13:28:13 -0700
committerkarlf <[email protected]>2016-08-11 13:28:13 -0700
commit96eb96dfb613e4c745db6bd1f53a92fe7e2290fc (patch)
treead5f3ede5cbcd6b598677ce41bcf8318471bdd92 /filesys
parent687b274aa38fd05c8c26e3068932121876d7f745 (diff)
Updated for "Windows 10 Anniversary Update" (Version 1607)
Diffstat (limited to 'filesys')
-rw-r--r--filesys/cdfs/cdfs.sln18
-rw-r--r--filesys/cdfs/cdfs.vcxproj4
-rw-r--r--filesys/cdfs/cdfs.vcxproj.Filters8
-rw-r--r--filesys/cdfs/cdstruc.h13
-rw-r--r--filesys/cdfs/fsctrl.c17
-rw-r--r--filesys/fastfat/allocsup.c257
-rw-r--r--filesys/fastfat/cachesup.c7
-rw-r--r--filesys/fastfat/cleanup.c12
-rw-r--r--filesys/fastfat/create.c398
-rw-r--r--filesys/fastfat/deviosup.c119
-rw-r--r--filesys/fastfat/dirctrl.c1
-rw-r--r--filesys/fastfat/dirsup.c103
-rw-r--r--filesys/fastfat/fastfat.sln18
-rw-r--r--filesys/fastfat/fastfat.vcxproj4
-rw-r--r--filesys/fastfat/fastfat.vcxproj.Filters8
-rw-r--r--filesys/fastfat/fatdata.c21
-rw-r--r--filesys/fastfat/fatdata.h7
-rw-r--r--filesys/fastfat/fatprocs.h38
-rw-r--r--filesys/fastfat/fatstruc.h77
-rw-r--r--filesys/fastfat/fileinfo.c170
-rw-r--r--filesys/fastfat/filobsup.c30
-rw-r--r--filesys/fastfat/flush.c25
-rw-r--r--filesys/fastfat/fsctrl.c172
-rw-r--r--filesys/fastfat/namesup.c75
-rw-r--r--filesys/fastfat/read.c1
-rw-r--r--filesys/fastfat/strucsup.c9
-rw-r--r--filesys/fastfat/verfysup.c74
-rw-r--r--filesys/fastfat/write.c8
-rw-r--r--filesys/miniFilter/MetadataManager/MetadataManager.sln18
-rw-r--r--filesys/miniFilter/MetadataManager/fmm.vcxproj4
-rw-r--r--filesys/miniFilter/MetadataManager/fmm.vcxproj.Filters8
-rw-r--r--filesys/miniFilter/NameChanger/NameChanger.sln18
-rw-r--r--filesys/miniFilter/NameChanger/NameChanger.vcxproj4
-rw-r--r--filesys/miniFilter/NameChanger/NameChanger.vcxproj.Filters8
-rw-r--r--filesys/miniFilter/NameChanger/nc.c4
-rw-r--r--filesys/miniFilter/NameChanger/ncfileinfo.c31
-rw-r--r--filesys/miniFilter/avscan/avscan.sln44
-rw-r--r--filesys/miniFilter/avscan/filter/avscan.vcxproj4
-rw-r--r--filesys/miniFilter/avscan/filter/avscan.vcxproj.Filters8
-rw-r--r--filesys/miniFilter/avscan/user/avscan.vcxproj4
-rw-r--r--filesys/miniFilter/avscan/user/avscan.vcxproj.Filters6
-rw-r--r--filesys/miniFilter/cancelSafe/cancelSafe.sln18
-rw-r--r--filesys/miniFilter/cancelSafe/cancelSafe.vcxproj4
-rw-r--r--filesys/miniFilter/cancelSafe/cancelSafe.vcxproj.Filters8
-rw-r--r--filesys/miniFilter/cdo/cdo.sln18
-rw-r--r--filesys/miniFilter/cdo/cdo.vcxproj4
-rw-r--r--filesys/miniFilter/cdo/cdo.vcxproj.Filters8
-rw-r--r--filesys/miniFilter/change/change.sln18
-rw-r--r--filesys/miniFilter/change/change.vcxproj4
-rw-r--r--filesys/miniFilter/change/change.vcxproj.Filters8
-rw-r--r--filesys/miniFilter/ctx/ctx.sln18
-rw-r--r--filesys/miniFilter/ctx/ctx.vcxproj4
-rw-r--r--filesys/miniFilter/ctx/ctx.vcxproj.Filters8
-rw-r--r--filesys/miniFilter/ctx/operations.c5
-rw-r--r--filesys/miniFilter/delete/README.md2
-rw-r--r--filesys/miniFilter/delete/delete.c51
-rw-r--r--filesys/miniFilter/delete/delete.sln18
-rw-r--r--filesys/miniFilter/delete/delete.vcxproj4
-rw-r--r--filesys/miniFilter/delete/delete.vcxproj.Filters8
-rw-r--r--filesys/miniFilter/minispy/filter/minispy.vcxproj4
-rw-r--r--filesys/miniFilter/minispy/filter/minispy.vcxproj.Filters8
-rw-r--r--filesys/miniFilter/minispy/minispy.sln44
-rw-r--r--filesys/miniFilter/minispy/user/minispy.vcxproj4
-rw-r--r--filesys/miniFilter/minispy/user/minispy.vcxproj.Filters6
-rw-r--r--filesys/miniFilter/minispy/user/mspyLog.c6
-rw-r--r--filesys/miniFilter/nullFilter/nullFilter.sln18
-rw-r--r--filesys/miniFilter/nullFilter/nullFilter.vcxproj4
-rw-r--r--filesys/miniFilter/nullFilter/nullFilter.vcxproj.Filters8
-rw-r--r--filesys/miniFilter/passThrough/passThrough.sln18
-rw-r--r--filesys/miniFilter/passThrough/passThrough.vcxproj4
-rw-r--r--filesys/miniFilter/passThrough/passThrough.vcxproj.Filters8
-rw-r--r--filesys/miniFilter/scanner/filter/scanner.vcxproj4
-rw-r--r--filesys/miniFilter/scanner/filter/scanner.vcxproj.Filters8
-rw-r--r--filesys/miniFilter/scanner/scanner.sln44
-rw-r--r--filesys/miniFilter/scanner/user/scanUser.c2
-rw-r--r--filesys/miniFilter/scanner/user/scanuser.vcxproj4
-rw-r--r--filesys/miniFilter/scanner/user/scanuser.vcxproj.Filters6
-rw-r--r--filesys/miniFilter/simrep/simrep.c18
-rw-r--r--filesys/miniFilter/simrep/simrep.sln18
-rw-r--r--filesys/miniFilter/simrep/simrep.vcxproj4
-rw-r--r--filesys/miniFilter/simrep/simrep.vcxproj.Filters8
-rw-r--r--filesys/miniFilter/swapBuffers/swapBuffers.sln18
-rw-r--r--filesys/miniFilter/swapBuffers/swapBuffers.vcxproj4
-rw-r--r--filesys/miniFilter/swapBuffers/swapBuffers.vcxproj.Filters8
84 files changed, 1519 insertions, 822 deletions
diff --git a/filesys/cdfs/cdfs.sln b/filesys/cdfs/cdfs.sln
index c14b4278..518cfdfa 100644
--- a/filesys/cdfs/cdfs.sln
+++ b/filesys/cdfs/cdfs.sln
@@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0
MinimumVisualStudioVersion = 12.0
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cdfs", "cdfs.vcxproj", "{062AB514-86CC-49DA-9F51-EA88D2B4E71F}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cdfs", "cdfs.vcxproj", "{5BA27054-1164-45A2-AC23-F620D9AA3E1F}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -13,14 +13,14 @@ Global
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {062AB514-86CC-49DA-9F51-EA88D2B4E71F}.Debug|Win32.ActiveCfg = Debug|Win32
- {062AB514-86CC-49DA-9F51-EA88D2B4E71F}.Debug|Win32.Build.0 = Debug|Win32
- {062AB514-86CC-49DA-9F51-EA88D2B4E71F}.Release|Win32.ActiveCfg = Release|Win32
- {062AB514-86CC-49DA-9F51-EA88D2B4E71F}.Release|Win32.Build.0 = Release|Win32
- {062AB514-86CC-49DA-9F51-EA88D2B4E71F}.Debug|x64.ActiveCfg = Debug|x64
- {062AB514-86CC-49DA-9F51-EA88D2B4E71F}.Debug|x64.Build.0 = Debug|x64
- {062AB514-86CC-49DA-9F51-EA88D2B4E71F}.Release|x64.ActiveCfg = Release|x64
- {062AB514-86CC-49DA-9F51-EA88D2B4E71F}.Release|x64.Build.0 = Release|x64
+ {5BA27054-1164-45A2-AC23-F620D9AA3E1F}.Debug|Win32.ActiveCfg = Debug|Win32
+ {5BA27054-1164-45A2-AC23-F620D9AA3E1F}.Debug|Win32.Build.0 = Debug|Win32
+ {5BA27054-1164-45A2-AC23-F620D9AA3E1F}.Release|Win32.ActiveCfg = Release|Win32
+ {5BA27054-1164-45A2-AC23-F620D9AA3E1F}.Release|Win32.Build.0 = Release|Win32
+ {5BA27054-1164-45A2-AC23-F620D9AA3E1F}.Debug|x64.ActiveCfg = Debug|x64
+ {5BA27054-1164-45A2-AC23-F620D9AA3E1F}.Debug|x64.Build.0 = Debug|x64
+ {5BA27054-1164-45A2-AC23-F620D9AA3E1F}.Release|x64.ActiveCfg = Release|x64
+ {5BA27054-1164-45A2-AC23-F620D9AA3E1F}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/filesys/cdfs/cdfs.vcxproj b/filesys/cdfs/cdfs.vcxproj
index 8c51053d..fd976b4c 100644
--- a/filesys/cdfs/cdfs.vcxproj
+++ b/filesys/cdfs/cdfs.vcxproj
@@ -19,12 +19,12 @@
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
- <ProjectGuid>{062AB514-86CC-49DA-9F51-EA88D2B4E71F}</ProjectGuid>
+ <ProjectGuid>{5BA27054-1164-45A2-AC23-F620D9AA3E1F}</ProjectGuid>
<RootNamespace>$(MSBuildProjectName)</RootNamespace>
<SupportsPackaging>false</SupportsPackaging>
<Configuration Condition="'$(Configuration)' == ''">Debug</Configuration>
<Platform Condition="'$(Platform)' == ''">Win32</Platform>
- <SampleGuid>{0D9B1F6C-C6A5-4688-9A62-159AA562676F}</SampleGuid>
+ <SampleGuid>{4BD9A0E3-C5F8-482B-B98F-DE6915538B47}</SampleGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
diff --git a/filesys/cdfs/cdfs.vcxproj.Filters b/filesys/cdfs/cdfs.vcxproj.Filters
index 6eb4daa0..82f14f8b 100644
--- a/filesys/cdfs/cdfs.vcxproj.Filters
+++ b/filesys/cdfs/cdfs.vcxproj.Filters
@@ -3,19 +3,19 @@
<ItemGroup>
<Filter Include="Source Files">
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx;*</Extensions>
- <UniqueIdentifier>{A2172E28-97CB-41ED-AC7C-C2AD8DA0F52A}</UniqueIdentifier>
+ <UniqueIdentifier>{E51B93D7-C683-422C-B38A-0B7F50602595}</UniqueIdentifier>
</Filter>
<Filter Include="Header Files">
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- <UniqueIdentifier>{4F6688C5-2155-4638-B834-D253854A676C}</UniqueIdentifier>
+ <UniqueIdentifier>{FFB58771-53DF-4696-B053-D270F56AA8E2}</UniqueIdentifier>
</Filter>
<Filter Include="Resource Files">
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms;man;xml</Extensions>
- <UniqueIdentifier>{B5EE8D2A-8B5F-4206-B3DF-3E8452D2ECE0}</UniqueIdentifier>
+ <UniqueIdentifier>{35F24D30-AEF3-4B88-8373-E67A8A11190C}</UniqueIdentifier>
</Filter>
<Filter Include="Driver Files">
<Extensions>inf;inv;inx;mof;mc;</Extensions>
- <UniqueIdentifier>{C487DB37-0DF6-4916-B8C5-B6179219926C}</UniqueIdentifier>
+ <UniqueIdentifier>{7FFD3196-DA97-4ADC-ACEF-9D5F2BF64BC4}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
diff --git a/filesys/cdfs/cdstruc.h b/filesys/cdfs/cdstruc.h
index 2a356e76..72abe0a1 100644
--- a/filesys/cdfs/cdstruc.h
+++ b/filesys/cdfs/cdstruc.h
@@ -681,7 +681,18 @@ typedef struct _VCB {
PIRP SectorCacheIrp;
KEVENT SectorCacheEvent;
ERESOURCE SectorCacheResource;
-
+
+#ifdef CDFS_TELEMETRY_DATA
+
+ //
+ // An ID that is common across the volume stack used to correlate volume events and for telemetry purposes.
+ // It may have a different value than the VolumeGuid.
+ //
+
+ GUID VolumeCorrelationId;
+
+#endif // CDFS_TELEMETRY_DATA
+
#if DBG
ULONG SecCacheHits;
ULONG SecCacheMisses;
diff --git a/filesys/cdfs/fsctrl.c b/filesys/cdfs/fsctrl.c
index 8ff03dbd..8a113f04 100644
--- a/filesys/cdfs/fsctrl.c
+++ b/filesys/cdfs/fsctrl.c
@@ -641,6 +641,7 @@ Return Value:
#ifdef CDFS_TELEMETRY_DATA
GUID VolumeGuid;
+ GUID VolumeCorrelationId = { 0 };
#endif
PAGED_CODE();
@@ -898,6 +899,19 @@ Return Value:
RtlCopyMemory( &CdTelemetryData.VolumeGuid, &VolumeGuid, sizeof(GUID) );
}
+ //
+ // Initialize the correlation ID.
+ //
+
+ if (NT_SUCCESS( FsRtlVolumeDeviceToCorrelationId( Vcb->TargetDeviceObject, &VolumeCorrelationId ) )) {
+
+ //
+ // Stash a copy away in the VCB.
+ //
+
+ RtlCopyMemory( &Vcb->VolumeCorrelationId, &VolumeCorrelationId, sizeof( GUID ) );
+ }
+
#endif // CDFS_TELEMETRY_DATA
// Lock object is acquired and released using internal state
@@ -1229,8 +1243,7 @@ Return Value:
// Send Telemetry
//
- RtlCopyMemory( &VolumeGuid, &CdTelemetryData.VolumeGuid, sizeof(GUID) );
- CdTelemetryMountSafe(&VolumeGuid, STATUS_SUCCESS, Vcb);
+ CdTelemetryMountSafe( &VolumeCorrelationId, STATUS_SUCCESS, Vcb );
#endif
diff --git a/filesys/fastfat/allocsup.c b/filesys/fastfat/allocsup.c
index d5850827..50a470ee 100644
--- a/filesys/fastfat/allocsup.c
+++ b/filesys/fastfat/allocsup.c
@@ -681,9 +681,9 @@ Arguments:
DebugTrace(+1, Dbg, "FatLookupFileAllocation\n", 0);
DebugTrace( 0, Dbg, " FcbOrDcb = %p\n", FcbOrDcb);
DebugTrace( 0, Dbg, " Vbo = %8lx\n", Vbo);
- DebugTrace( 0, Dbg, " Lbo = %8lx\n", Lbo);
- DebugTrace( 0, Dbg, " ByteCount = %8lx\n", ByteCount);
- DebugTrace( 0, Dbg, " Allocated = %8lx\n", Allocated);
+ DebugTrace( 0, Dbg, " pLbo = %8lx\n", Lbo);
+ DebugTrace( 0, Dbg, " pByteCount = %8lx\n", ByteCount);
+ DebugTrace( 0, Dbg, " pAllocated = %8lx\n", Allocated);
Context.Bcb = NULL;
@@ -1134,7 +1134,6 @@ Arguments:
FatLookupFileAllocationSize( IrpContext, FcbOrDcb );
}
-
//
// Check for the benign case that the desired allocation is already
// within the allocation size.
@@ -1427,8 +1426,7 @@ VOID
FatTruncateFileAllocation (
IN PIRP_CONTEXT IrpContext,
IN PFCB FcbOrDcb,
- IN ULONG DesiredAllocationSize,
- IN BOOLEAN ForDeletion
+ IN ULONG DesiredAllocationSize
)
/*++
@@ -1471,11 +1469,8 @@ Return Value:
PAGED_CODE();
- UNREFERENCED_PARAMETER( ForDeletion );
-
Vcb = FcbOrDcb->Vcb;
-
DebugTrace(+1, Dbg, "FatTruncateFileAllocation\n", 0);
DebugTrace( 0, Dbg, " FcbOrDcb = %p\n", FcbOrDcb);
DebugTrace( 0, Dbg, " DesiredAllocationSize = %8lx\n", DesiredAllocationSize);
@@ -2592,6 +2587,12 @@ Arguments:
+//
+// Limit our zeroing writes to 1 MB.
+//
+
+#define MAX_ZERO_MDL_SIZE (1*1024*1024)
+
_Requires_lock_held_(_Global_critical_region_)
VOID
FatDeallocateDiskSpace (
@@ -2647,6 +2648,8 @@ Return Value:
PFAT_WINDOW Window;
+ NTSTATUS ZeroingStatus = STATUS_SUCCESS;
+
PAGED_CODE();
DebugTrace(+1, Dbg, "FatDeallocateDiskSpace\n", 0);
@@ -2669,139 +2672,175 @@ Return Value:
if (ZeroOnDeallocate) {
- NTSTATUS Status = STATUS_SUCCESS;
- PIRP IoIrp;
- KEVENT IoEvent;
- IO_STATUS_BLOCK Iosb;
- PVOID Buffer = NULL;
- PMDL Mdl;
- ULONG ByteCountToZero;
- ULONG MdlSizeMapped;
-
- //
- // Issue the writes down for each run in the Mcb
- //
-
- KeInitializeEvent( &IoEvent,
- NotificationEvent,
- FALSE );
-
- for ( McbIndex = 0; McbIndex < RunsInMcb; McbIndex++ ) {
-
- FatGetNextMcbEntry( Vcb, Mcb, McbIndex, &Vbo, &Lbo, &ByteCount );
-
- //
- // Assert that Fat files have no holes.
- //
+ try {
- NT_ASSERT( Lbo != 0 );
+ PIRP IoIrp;
+ KEVENT IoEvent;
+ IO_STATUS_BLOCK Iosb;
+ PVOID Buffer = NULL;
+ PMDL Mdl;
+ ULONG ByteCountToZero;
+ ULONG MdlSizeMapped;
//
- // Setup our MDL for the this run.
+ // Issue the writes down for each run in the Mcb
//
- Mdl = FatBuildZeroMdl( IrpContext, ByteCount);
- if (!Mdl) {
- FatNormalizeAndRaiseStatus( IrpContext, STATUS_INSUFFICIENT_RESOURCES);
- }
+ KeInitializeEvent( &IoEvent,
+ NotificationEvent,
+ FALSE );
+
+ for ( McbIndex = 0; McbIndex < RunsInMcb; McbIndex++ ) {
- try {
+ FatGetNextMcbEntry( Vcb, Mcb, McbIndex, &Vbo, &Lbo, &ByteCount );
//
- // Map the MDL.
+ // Assert that Fat files have no holes.
//
- Buffer = MmGetSystemAddressForMdlSafe(Mdl, HighPagePriority|MdlMappingNoExecute);
- if (!Buffer) {
- FatNormalizeAndRaiseStatus( IrpContext, STATUS_INSUFFICIENT_RESOURCES);
- }
+ NT_ASSERT( Lbo != 0 );
//
- // We might not have not been able to get an MDL big enough to map the whole
- // run. In this case, break up the write.
+ // Setup our MDL for the this run.
//
- MdlSizeMapped = min( ByteCount, Mdl->ByteCount );
- ByteCountToZero = ByteCount;
+ if (ByteCount > MAX_ZERO_MDL_SIZE) {
+ Mdl = FatBuildZeroMdl( IrpContext, MAX_ZERO_MDL_SIZE);
+ } else {
+ Mdl = FatBuildZeroMdl( IrpContext, ByteCount);
+ }
- //
- // Loop until there are no bytes left to write
- //
+ if (!Mdl) {
+ ZeroingStatus = STATUS_INSUFFICIENT_RESOURCES;
+ goto try_exit;
+ }
- while (ByteCountToZero != 0) {
+ try {
//
- // Write zeros to each run.
+ // Map the MDL.
//
- KeClearEvent( &IoEvent );
-
- IoIrp = IoBuildSynchronousFsdRequest( IRP_MJ_WRITE,
- Vcb->TargetDeviceObject,
- Buffer,
- MdlSizeMapped,
- (PLARGE_INTEGER)&Lbo,
- &IoEvent,
- &Iosb );
+ Buffer = MmGetSystemAddressForMdlSafe(Mdl, HighPagePriority|MdlMappingNoExecute);
+ if (!Buffer) {
+ NT_ASSERT( FALSE );
+ ZeroingStatus = STATUS_INSUFFICIENT_RESOURCES;
+ goto try_exit2;
+ }
- if (IoIrp == NULL) {
+ //
+ // We might not have not been able to get an MDL big enough to map the whole
+ // run. In this case, break up the write.
+ //
- FatRaiseStatus( IrpContext,
- STATUS_INSUFFICIENT_RESOURCES );
- }
+ MdlSizeMapped = min( ByteCount, Mdl->ByteCount );
+ ByteCountToZero = ByteCount;
//
- // Set a flag indicating that we want to write through any
- // cache on the controller. This eliminates the need for
- // an explicit flush-device after the write.
+ // Loop until there are no bytes left to write
//
- SetFlag( IoGetNextIrpStackLocation(IoIrp)->Flags, SL_WRITE_THROUGH );
+ while (ByteCountToZero != 0) {
- Status = IoCallDriver( Vcb->TargetDeviceObject, IoIrp );
+ //
+ // Write zeros to each run.
+ //
- if (Status == STATUS_PENDING) {
+ KeClearEvent( &IoEvent );
- (VOID)KeWaitForSingleObject( &IoEvent,
- Executive,
- KernelMode,
- FALSE,
- (PLARGE_INTEGER)NULL );
+ IoIrp = IoBuildSynchronousFsdRequest( IRP_MJ_WRITE,
+ Vcb->TargetDeviceObject,
+ Buffer,
+ MdlSizeMapped,
+ (PLARGE_INTEGER)&Lbo,
+ &IoEvent,
+ &Iosb );
- Status = Iosb.Status;
- }
+ if (IoIrp == NULL) {
+ NT_ASSERT( FALSE );
+ ZeroingStatus = STATUS_INSUFFICIENT_RESOURCES;
+ goto try_exit2;
+ }
+
+ //
+ // Set a flag indicating that we want to write through any
+ // cache on the controller. This eliminates the need for
+ // an explicit flush-device after the write.
+ //
- if (!NT_SUCCESS( Status )) {
+ SetFlag( IoGetNextIrpStackLocation(IoIrp)->Flags, SL_WRITE_THROUGH );
- FatNormalizeAndRaiseStatus( IrpContext,
- Status );
- }
+ ZeroingStatus = IoCallDriver( Vcb->TargetDeviceObject, IoIrp );
- //
- // Decrement ByteCount
- //
+ if (ZeroingStatus == STATUS_PENDING) {
+
+ (VOID)KeWaitForSingleObject( &IoEvent,
+ Executive,
+ KernelMode,
+ FALSE,
+ (PLARGE_INTEGER)NULL );
+
+ ZeroingStatus = Iosb.Status;
+ }
+
+ if (!NT_SUCCESS( ZeroingStatus )) {
+ NT_ASSERT( FALSE );
+ goto try_exit2;
+ }
+
+ //
+ // Increment the starting offset where we will zero.
+ //
+
+ Lbo += MdlSizeMapped;
+
+ //
+ // Decrement ByteCount
+ //
- if (MdlSizeMapped <= ByteCountToZero) {
ByteCountToZero -= MdlSizeMapped;
- } else {
- MdlSizeMapped = ByteCountToZero;
+
+ if (ByteCountToZero < MdlSizeMapped) {
+ MdlSizeMapped = ByteCountToZero;
+ }
+
}
- }
+
+ try_exit2:
- } finally {
+ NOTHING;
+
+ } finally {
- if (!FlagOn( Mdl->MdlFlags, MDL_SOURCE_IS_NONPAGED_POOL) &&
- FlagOn( Mdl->MdlFlags, MDL_MAPPED_TO_SYSTEM_VA )) {
+ if (!FlagOn( Mdl->MdlFlags, MDL_SOURCE_IS_NONPAGED_POOL) &&
+ FlagOn( Mdl->MdlFlags, MDL_MAPPED_TO_SYSTEM_VA )) {
- MmUnmapLockedPages( Mdl->MappedSystemVa, Mdl );
+ MmUnmapLockedPages( Mdl->MappedSystemVa, Mdl );
+ }
+ IoFreeMdl( Mdl );
}
- IoFreeMdl( Mdl );
- }
+
+ }
+
+ try_exit:
+
+ NOTHING;
+
+ } except(FatExceptionFilter( NULL, GetExceptionInformation() )) {
+
+ //
+ // If we failed to zero for some reason, still go ahead and deallocate
+ // the clusters. Otherwise we'll leak space from the volume.
+ //
- }
+ ZeroingStatus = GetExceptionCode();
+
+ }
}
+ NT_ASSERT( NT_SUCCESS(ZeroingStatus) );
+
try {
//
@@ -4052,10 +4091,12 @@ Arguments:
}
//
- // Unpin the Bcb. For cleaning operations, we make this write-through.
+ // Unpin the Bcb. For cleaning operations or if the corruption was detected while mounting we make this write-through.
//
- if (CleaningOperation && Bcb) {
+ if ((CleaningOperation ||
+ FlagOn(Vcb->VcbState, VCB_STATE_FLAG_MOUNT_IN_PROGRESS)) &&
+ Bcb) {
IO_STATUS_BLOCK IgnoreStatus;
@@ -4619,10 +4660,11 @@ Return Value:
{
UCHAR Log = 0;
- PAGED_CODE();
+#if FASTFATDBG
+ ULONG OrigValue = Value;
+#endif
- DebugTrace(+1, Dbg, "LogOf\n", 0);
- DebugTrace( 0, Dbg, " Value = %8lx\n", Value);
+ PAGED_CODE();
//
// Knock bits off until we we get a one at position 0
@@ -4641,14 +4683,17 @@ Return Value:
if (Value != 0x1) {
+ DebugTrace(+1, Dbg, "LogOf\n", 0);
+ DebugTrace( 0, Dbg, " Value = %8lx\n", OrigValue);
+
DebugTrace( 0, Dbg, "Received non power of 2.\n", 0);
-
+
+ DebugTrace(-1, Dbg, "LogOf -> %8lx\n", Log);
+
#pragma prefast( suppress: 28159, "we bugcheck here because our internal data structures are seriously corrupted if this happens" )
FatBugCheck( Value, Log, 0 );
}
- DebugTrace(-1, Dbg, "LogOf -> %8lx\n", Log);
-
return Log;
}
diff --git a/filesys/fastfat/cachesup.c b/filesys/fastfat/cachesup.c
index 5203814b..791a7378 100644
--- a/filesys/fastfat/cachesup.c
+++ b/filesys/fastfat/cachesup.c
@@ -698,7 +698,7 @@ Arguments:
// Inform the cache manager of the change.
//
- FatTruncateFileAllocation( IrpContext, Dcb, InitialAllocation, FALSE );
+ FatTruncateFileAllocation( IrpContext, Dcb, InitialAllocation );
Dcb->Header.FileSize.LowPart =
Dcb->Header.AllocationSize.LowPart;
@@ -1642,8 +1642,9 @@ Return Value:
}
if (!FlagOn( IrpContext->Flags, IRP_CONTEXT_FLAG_DISABLE_RAISE )) {
-
- IrpContext->OriginatingIrp->IoStatus = RaiseIosb;
+ if (IrpContext->OriginatingIrp) {
+ IrpContext->OriginatingIrp->IoStatus = RaiseIosb;
+ }
FatNormalizeAndRaiseStatus( IrpContext, RaiseIosb.Status );
}
}
diff --git a/filesys/fastfat/cleanup.c b/filesys/fastfat/cleanup.c
index b42a952b..b6169b9c 100644
--- a/filesys/fastfat/cleanup.c
+++ b/filesys/fastfat/cleanup.c
@@ -599,7 +599,7 @@ Return Value:
DebugTrace(0, Dbg, "Delete File allocation\n", 0);
- FatTruncateFileAllocation( IrpContext, Fcb, 0, TRUE );
+ FatTruncateFileAllocation( IrpContext, Fcb, 0 );
if (Fcb->Header.AllocationSize.LowPart == 0) {
@@ -714,6 +714,8 @@ Return Value:
IoGetRequestorProcess( Irp ),
NULL );
+
+
//
// We can proceed with on-disk updates only if the volume is mounted
// and we can still write to it if it hasn't been shutdown. Remember that
@@ -862,11 +864,13 @@ Return Value:
DebugTrace(0, Dbg, "truncate file allocation\n", 0);
if (Vcb->VcbCondition == VcbGood) {
-
+
+
FatTruncateFileAllocation( IrpContext,
Fcb,
- Fcb->Header.FileSize.LowPart,
- FlagOn(Fcb->FcbState, FCB_STATE_DELETE_ON_CLOSE) );
+ Fcb->Header.FileSize.LowPart );
+
+
}
//
diff --git a/filesys/fastfat/create.c b/filesys/fastfat/create.c
index 6de15823..8140019f 100644
--- a/filesys/fastfat/create.c
+++ b/filesys/fastfat/create.c
@@ -97,7 +97,7 @@ _Requires_lock_held_(_Global_critical_region_)
IO_STATUS_BLOCK
FatOpenExistingFcb (
_In_ PIRP_CONTEXT IrpContext,
- _In_ PIO_STACK_LOCATION IrpSp,
+ _In_ PIO_STACK_LOCATION IrpSp,
_Inout_ PFILE_OBJECT FileObject,
_Inout_ PVCB Vcb,
_Inout_ PFCB Fcb,
@@ -106,7 +106,7 @@ FatOpenExistingFcb (
_In_ ULONG AllocationSize,
_In_ PFILE_FULL_EA_INFORMATION EaBuffer,
_In_ ULONG EaLength,
- _In_ UCHAR FileAttributes,
+ _In_ USHORT FileAttributes,
_In_ ULONG CreateDisposition,
_In_ BOOLEAN NoEaKnowledge,
_In_ BOOLEAN DeleteOnClose,
@@ -132,7 +132,7 @@ _Requires_lock_held_(_Global_critical_region_)
IO_STATUS_BLOCK
FatOpenExistingDirectory (
_In_ PIRP_CONTEXT IrpContext,
- _In_ PIO_STACK_LOCATION IrpSp,
+ _In_ PIO_STACK_LOCATION IrpSp,
_Inout_ PFILE_OBJECT FileObject,
_Inout_ PVCB Vcb,
_Outptr_result_maybenull_ PDCB *Dcb,
@@ -162,12 +162,13 @@ FatOpenExistingFile (
_In_ ULONG LfnByteOffset,
_In_ ULONG DirentByteOffset,
_In_ PUNICODE_STRING Lfn,
+ _In_ PUNICODE_STRING OrigLfn,
_In_ PACCESS_MASK DesiredAccess,
_In_ USHORT ShareAccess,
_In_ ULONG AllocationSize,
_In_ PFILE_FULL_EA_INFORMATION EaBuffer,
_In_ ULONG EaLength,
- _In_ UCHAR FileAttributes,
+ _In_ USHORT FileAttributes,
_In_ ULONG CreateDisposition,
_In_ BOOLEAN IsPagingFile,
_In_ BOOLEAN NoEaKnowledge,
@@ -180,7 +181,7 @@ _Requires_lock_held_(_Global_critical_region_)
IO_STATUS_BLOCK
FatCreateNewDirectory (
_In_ PIRP_CONTEXT IrpContext,
- _In_ PIO_STACK_LOCATION IrpSp,
+ _In_ PIO_STACK_LOCATION IrpSp,
_Inout_ PFILE_OBJECT FileObject,
_Inout_ PVCB Vcb,
_Inout_ PDCB ParentDcb,
@@ -190,7 +191,7 @@ FatCreateNewDirectory (
_In_ USHORT ShareAccess,
_In_ PFILE_FULL_EA_INFORMATION EaBuffer,
_In_ ULONG EaLength,
- _In_ UCHAR FileAttributes,
+ _In_ USHORT FileAttributes,
_In_ BOOLEAN NoEaKnowledge,
_In_ BOOLEAN DeleteOnClose,
_In_ BOOLEAN OpenRequiringOplock
@@ -200,7 +201,7 @@ _Requires_lock_held_(_Global_critical_region_)
IO_STATUS_BLOCK
FatCreateNewFile (
_In_ PIRP_CONTEXT IrpContext,
- _In_ PIO_STACK_LOCATION IrpSp,
+ _In_ PIO_STACK_LOCATION IrpSp,
_Inout_ PFILE_OBJECT FileObject,
_Inout_ PVCB Vcb,
_Inout_ PDCB ParentDcb,
@@ -211,7 +212,7 @@ FatCreateNewFile (
_In_ ULONG AllocationSize,
_In_ PFILE_FULL_EA_INFORMATION EaBuffer,
_In_ ULONG EaLength,
- _In_ UCHAR FileAttributes,
+ _In_ USHORT FileAttributes,
_In_ PUNICODE_STRING LfnBuffer,
_In_ BOOLEAN IsPagingFile,
_In_ BOOLEAN NoEaKnowledge,
@@ -220,6 +221,7 @@ FatCreateNewFile (
_In_ BOOLEAN TemporaryFile
);
+
_Requires_lock_held_(_Global_critical_region_)
IO_STATUS_BLOCK
FatSupersedeOrOverwriteFile (
@@ -229,7 +231,7 @@ FatSupersedeOrOverwriteFile (
_In_ ULONG AllocationSize,
_In_ PFILE_FULL_EA_INFORMATION EaBuffer,
_In_ ULONG EaLength,
- _In_ UCHAR FileAttributes,
+ _In_ USHORT FileAttributes,
_In_ ULONG CreateDisposition,
_In_ BOOLEAN NoEaKnowledge
);
@@ -252,6 +254,12 @@ FatCheckShareAccess (
#pragma alloc_text(PAGE, FatCheckShareAccess)
#pragma alloc_text(PAGE, FatCheckSystemSecurityAccess)
#pragma alloc_text(PAGE, FatCommonCreate)
+
+#if (NTDDI_VERSION >= NTDDI_WINTHRESHOLD)
+#pragma alloc_text(PAGE, FatCommonCreateOnNewStack)
+#pragma alloc_text(PAGE, FatCommonCreateCallout)
+#endif
+
#pragma alloc_text(PAGE, FatCreateNewDirectory)
#pragma alloc_text(PAGE, FatCreateNewFile)
#pragma alloc_text(PAGE, FatFsdCreate)
@@ -337,7 +345,11 @@ Return Value:
IrpContext = FatCreateIrpContext( Irp, TRUE );
+#if (NTDDI_VERSION >= NTDDI_WINTHRESHOLD)
+ Status = FatCommonCreateOnNewStack( IrpContext, Irp );
+#else
Status = FatCommonCreate( IrpContext, Irp );
+#endif
} except(FatExceptionFilter( IrpContext, GetExceptionInformation() )) {
@@ -356,9 +368,9 @@ Return Value:
FsRtlExitFileSystem();
-
+
//
- // Complete the request, unless we had an exception, in which case it
+ // Complete the request, unless we had an exception, in which case it
// was completed in FatProcessException (and the IrpContext freed).
//
// IrpContext is freed inside FatCompleteRequest.
@@ -367,7 +379,7 @@ Return Value:
if (!ExceptionCompletedIrp && Status != STATUS_PENDING) {
FatCompleteRequest( IrpContext, Irp, Status );
}
-
+
//
// And return to our caller
//
@@ -381,6 +393,158 @@ Return Value:
return Status;
}
+#if (NTDDI_VERSION >= NTDDI_WINTHRESHOLD)
+_Requires_lock_held_(_Global_critical_region_)
+VOID
+FatCommonCreateCallout (
+ _In_ PFAT_CALLOUT_PARAMETERS CalloutParameters
+ )
+
+/*++
+
+Routine Description:
+
+ This function is the callout routine that will execute on a new stack when
+ processing a create. It simply calls FatCommonCreate() with the parameters
+ in the context and stores the return value in the context.
+
+Arguments:
+
+ Context - Supplies an opaque pointer to this function's context. It is actually
+ an FAT_CALLOUT_PARAMETERS structure.
+
+Return Value:
+
+ None.
+
+--*/
+
+{
+ PAGED_CODE();
+
+ //
+ // Call FatCommonCreate() with the passed parameters and store the result.
+ // Exceptions cannot be raised across stack boundaries, so we need to catch
+ // exceptions here and deal with them.
+ //
+
+ try {
+
+ CalloutParameters->IrpStatus = FatCommonCreate( CalloutParameters->Create.IrpContext,
+ CalloutParameters->Create.Irp );
+
+ } except (FatExceptionFilter( CalloutParameters->Create.IrpContext, GetExceptionInformation() )) {
+
+ //
+ // Return the resulting status.
+ //
+
+ CalloutParameters->ExceptionStatus = GetExceptionCode();
+ }
+
+}
+
+
+_Requires_lock_held_(_Global_critical_region_)
+NTSTATUS
+FatCommonCreateOnNewStack (
+ _In_ PIRP_CONTEXT IrpContext,
+ _In_ PIRP Irp
+ )
+
+/*++
+
+Routine Description:
+
+ This routine sets up a switch to a new stack and call to FatCommonCreate().
+
+Arguments:
+
+ IrpContext - Supplies the context structure for the overall request.
+
+ Irp - Supplies the IRP being processed.
+
+ CreateContext - Supplies a pointer on the old stack that is used to
+ store context information for the create itself.
+
+Return Value:
+
+ NTSTATUS - The status from FatCommonCreate().
+
+--*/
+{
+ FAT_CALLOUT_PARAMETERS CalloutParameters;
+ NTSTATUS status;
+
+ PAGED_CODE();
+
+ //
+ // Create requests consume a lot of stack space. As such, we always switch to a
+ // new stack when processing a create. Setup the callout parameters and make the
+ // call. Note that this cannot fail, since we pass a stack context for a reserve stack.
+ //
+
+ CalloutParameters.Create.IrpContext = IrpContext;
+ CalloutParameters.Create.Irp = Irp;
+ CalloutParameters.ExceptionStatus = CalloutParameters.IrpStatus = STATUS_SUCCESS;
+
+ //
+ // Mark that we are swapping the stack
+ //
+
+ SetFlag( IrpContext->Flags, IRP_CONTEXT_FLAG_SWAPPED_STACK );
+
+ status = KeExpandKernelStackAndCalloutEx( FatCommonCreateCallout,
+ &CalloutParameters,
+ KERNEL_STACK_SIZE,
+ FALSE,
+ NULL );
+
+ //
+ // Mark that the stack is no longer swapped. Note that there are paths
+ // that may clear this flag before returning.
+ //
+
+ if (status != STATUS_PENDING) {
+
+ ClearFlag( IrpContext->Flags, IRP_CONTEXT_FLAG_SWAPPED_STACK );
+ }
+
+ //
+ // If we had an exception occur, re-raise the exception.
+ //
+
+ if (!NT_SUCCESS( CalloutParameters.ExceptionStatus )) {
+ FatRaiseStatus( IrpContext, CalloutParameters.ExceptionStatus );
+ }
+
+ //
+ // If the call to KeExpandKernelStackAndCalloutEx returns an error this
+ // means that the callout routine (FatCommonCreateCallout) was never
+ // called. Translate that error, and return it.
+ //
+
+ if (!NT_SUCCESS( status )) {
+
+ //
+ // Translate to an expected error value
+ //
+
+ if (status == STATUS_NO_MEMORY) {
+
+ status = STATUS_INSUFFICIENT_RESOURCES;
+ }
+
+ return status;
+ }
+
+ //
+ // Return the status given to us by the callout.
+ //
+
+ return CalloutParameters.IrpStatus;
+}
+#endif
_Requires_lock_held_(_Global_critical_region_)
NTSTATUS
@@ -418,7 +582,7 @@ Return Value:
PFILE_FULL_EA_INFORMATION EaBuffer;
PACCESS_MASK DesiredAccess;
ULONG Options;
- UCHAR FileAttributes;
+ USHORT FileAttributes;
USHORT ShareAccess;
ULONG EaLength;
@@ -463,11 +627,11 @@ Return Value:
BOOLEAN FirstLoop = TRUE;
ULONG MatchFlags = 0;
-
+
CCB LocalCcb;
UNICODE_STRING Lfn;
UNICODE_STRING OrigLfn = {0};
-
+
WCHAR LfnBuffer[ FAT_CREATE_INITIAL_NAME_BUF_SIZE];
PAGED_CODE();
@@ -535,7 +699,7 @@ Return Value:
EaBuffer = Irp->AssociatedIrp.SystemBuffer;
DesiredAccess = &IrpSp->Parameters.Create.SecurityContext->DesiredAccess;
Options = IrpSp->Parameters.Create.Options;
- FileAttributes = (UCHAR)(IrpSp->Parameters.Create.FileAttributes & ~FILE_ATTRIBUTE_NORMAL);
+ FileAttributes = IrpSp->Parameters.Create.FileAttributes & ~FILE_ATTRIBUTE_NORMAL;
ShareAccess = IrpSp->Parameters.Create.ShareAccess;
EaLength = IrpSp->Parameters.Create.EaLength;
@@ -560,7 +724,8 @@ Return Value:
FileAttributes &= (FILE_ATTRIBUTE_READONLY |
FILE_ATTRIBUTE_HIDDEN |
FILE_ATTRIBUTE_SYSTEM |
- FILE_ATTRIBUTE_ARCHIVE );
+ FILE_ATTRIBUTE_ARCHIVE |
+ FILE_ATTRIBUTE_ENCRYPTED);
//
// Locate the volume device object and Vcb that we are trying to access
@@ -1296,7 +1461,7 @@ Return Value:
//
// Not and Fcb or a Dcb so we bug check
//
-
+
#pragma prefast( suppress:28159, "this is a serious corruption if it happens" )
FatBugCheck( NodeType(Fcb), (ULONG_PTR) Fcb, 0 );
}
@@ -1476,8 +1641,8 @@ Return Value:
if (RemainingPart.Length == 0) {
-
- break;
+
+ break;
}
//
@@ -1505,7 +1670,7 @@ Return Value:
//
LfnByteOffset = DirentByteOffset -
- FAT_LFN_DIRENTS_NEEDED(&Lfn) * sizeof(LFN_DIRENT);
+ FAT_LFN_DIRENTS_NEEDED(&OrigLfn) * sizeof(LFN_DIRENT);
//
// Create a dcb for the new directory
@@ -1554,7 +1719,7 @@ Return Value:
//
LfnByteOffset = DirentByteOffset -
- FAT_LFN_DIRENTS_NEEDED(&Lfn) * sizeof(LFN_DIRENT);
+ FAT_LFN_DIRENTS_NEEDED(&OrigLfn) * sizeof(LFN_DIRENT);
//
// We were able to locate an existing dirent entry, so now
@@ -1593,7 +1758,7 @@ Return Value:
DeleteOnClose,
FileNameOpenedDos,
OpenRequiringOplock );
-
+
Irp->IoStatus.Information = Iosb.Information;
try_return( Iosb.Status );
}
@@ -1626,6 +1791,7 @@ Return Value:
LfnByteOffset,
DirentByteOffset,
&Lfn,
+ &OrigLfn,
DesiredAccess,
ShareAccess,
AllocationSize,
@@ -1889,12 +2055,12 @@ Return Value:
//
SavedFlags = IrpContext->Flags;
-
+
SetFlag( IrpContext->Flags, IRP_CONTEXT_FLAG_DISABLE_RAISE |
IRP_CONTEXT_FLAG_DISABLE_WRITE_THROUGH );
-
+
FatUnpinRepinnedBcbs( IrpContext );
-
+
if ((FinalDcb != NULL) &&
(NodeType(FinalDcb) == FAT_NTC_DCB) &&
IsListEmpty(&FinalDcb->Specific.Dcb.ParentDcbQueue) &&
@@ -1902,7 +2068,7 @@ Return Value:
(FinalDcb->Specific.Dcb.DirectoryFile != NULL)) {
PFILE_OBJECT DirectoryFileObject;
-
+
DirectoryFileObject = FinalDcb->Specific.Dcb.DirectoryFile;
FinalDcb->Specific.Dcb.DirectoryFile = NULL;
@@ -1911,7 +2077,7 @@ Return Value:
ObDereferenceObject( DirectoryFileObject );
}
-
+
IrpContext->Flags = SavedFlags;
}
@@ -1952,7 +2118,7 @@ Return Value:
}
} else {
-
+
FatUnpinRepinnedBcbs( IrpContext );
}
@@ -1981,7 +2147,7 @@ Return Value:
if (IsFileObjectReadOnly(FileObject)) { LocalVcb->ReadOnlyCount -= 1; }
-
+
//
// WinSE #307418 "Occasional data corruption when standby/resume
// while copying files to removable FAT formatted media".
@@ -1989,15 +2155,15 @@ Return Value:
// operation we should revert the changes we made to the parent
// directory and to the allocation table.
//
-
+
if (IrpContext->ExceptionStatus == STATUS_VERIFY_REQUIRED &&
NodeType( LocalFcb ) == FAT_NTC_FCB) {
-
- FatTruncateFileAllocation( IrpContext, LocalFcb, 0, TRUE );
+
+ FatTruncateFileAllocation( IrpContext, LocalFcb, 0 );
FatDeleteDirent( IrpContext, LocalFcb, NULL, TRUE );
}
-
+
//
// If we leafed out on a new Fcb we should get rid of it at this point.
//
@@ -2104,7 +2270,6 @@ Return Value:
return Iosb.Status;
}
-
//
// Internal support routine
//
@@ -2578,7 +2743,7 @@ _Requires_lock_held_(_Global_critical_region_)
IO_STATUS_BLOCK
FatOpenExistingDcb (
_In_ PIRP_CONTEXT IrpContext,
- _In_ PIO_STACK_LOCATION IrpSp,
+ _In_ PIO_STACK_LOCATION IrpSp,
_Inout_ PFILE_OBJECT FileObject,
_Inout_ PVCB Vcb,
_Inout_ PDCB Dcb,
@@ -2762,66 +2927,66 @@ Return Value:
#if (NTDDI_VERSION >= NTDDI_WIN8)
NTSTATUS OplockBreakStatus = STATUS_SUCCESS;
-
+
//
// If we got a sharing violation try to break outstanding handle
// oplocks and retry the sharing check. If the caller specified
// FILE_COMPLETE_IF_OPLOCKED we don't bother breaking the oplock;
// we just return the sharing violation.
//
-
+
if ((Iosb.Status == STATUS_SHARING_VIOLATION) &&
!FlagOn( IrpSp->Parameters.Create.Options, FILE_COMPLETE_IF_OPLOCKED )) {
-
+
OplockBreakStatus = FsRtlOplockBreakH( FatGetFcbOplock(Dcb),
IrpContext->OriginatingIrp,
0,
IrpContext,
FatOplockComplete,
FatPrePostIrp );
-
+
//
// If FsRtlOplockBreakH returned STATUS_PENDING, then the IRP
// has been posted and we need to stop working.
//
-
+
if (OplockBreakStatus == STATUS_PENDING) {
-
+
Iosb.Status = STATUS_PENDING;
*OplockPostIrp = TRUE;
try_return( NOTHING );
-
+
//
// If FsRtlOplockBreakH returned an error we want to return that now.
//
-
+
} else if (!NT_SUCCESS( OplockBreakStatus )) {
-
+
Iosb.Status = OplockBreakStatus;
try_return( Iosb );
-
+
//
// Otherwise FsRtlOplockBreakH returned STATUS_SUCCESS, indicating
// that there is no oplock to be broken. The sharing violation is
// returned in that case.
//
-
+
} else {
-
+
NT_ASSERT( OplockBreakStatus == STATUS_SUCCESS );
-
+
try_return( Iosb );
}
-
+
//
// The initial sharing check failed with something other than sharing
// violation (which should never happen, but let's be future-proof),
// or we *did* get a sharing violation and the caller specified
// FILE_COMPLETE_IF_OPLOCKED. Either way this create is over.
//
-
+
} else {
-
+
try_return( Iosb );
}
#else
@@ -2937,7 +3102,7 @@ Return Value:
SetFlag( Ccb->Flags, CCB_FLAG_DELETE_ON_CLOSE );
}
if (FileNameOpenedDos) {
-
+
SetFlag( Ccb->Flags, CCB_FLAG_OPENED_BY_SHORTNAME );
}
@@ -2998,7 +3163,7 @@ _Requires_lock_held_(_Global_critical_region_)
IO_STATUS_BLOCK
FatOpenExistingFcb (
_In_ PIRP_CONTEXT IrpContext,
- _In_ PIO_STACK_LOCATION IrpSp,
+ _In_ PIO_STACK_LOCATION IrpSp,
_Inout_ PFILE_OBJECT FileObject,
_Inout_ PVCB Vcb,
_Inout_ PFCB Fcb,
@@ -3007,7 +3172,7 @@ FatOpenExistingFcb (
_In_ ULONG AllocationSize,
_In_ PFILE_FULL_EA_INFORMATION EaBuffer,
_In_ ULONG EaLength,
- _In_ UCHAR FileAttributes,
+ _In_ USHORT FileAttributes,
_In_ ULONG CreateDisposition,
_In_ BOOLEAN NoEaKnowledge,
_In_ BOOLEAN DeleteOnClose,
@@ -3277,7 +3442,7 @@ Return Value:
// FILE_COMPLETE_IF_OPLOCKED we don't bother breaking the oplock;
// we just return the sharing violation.
//
-
+
if ((Iosb.Status == STATUS_SHARING_VIOLATION) &&
!FlagOn( IrpSp->Parameters.Create.Options, FILE_COMPLETE_IF_OPLOCKED )) {
@@ -3313,7 +3478,7 @@ Return Value:
// that there is no oplock to be broken. The sharing violation is
// returned in that case.
//
-
+
} else {
NT_ASSERT( OplockBreakStatus == STATUS_SUCCESS );
@@ -3609,7 +3774,7 @@ Return Value:
ClearFlag( *DesiredAccess, AddedAccess );
-#pragma prefast( suppress:28931, "it needs to be there for debug assert" );
+#pragma prefast( suppress:28931, "it needs to be there for debug assert" );
Status = IoCheckShareAccess( *DesiredAccess,
ShareAccess,
FileObject,
@@ -3946,7 +4111,7 @@ IO_STATUS_BLOCK
#pragma warning(suppress:6101) // bug in PREFast means the _Success_ annotation is not correctly applied
FatOpenExistingDirectory (
_In_ PIRP_CONTEXT IrpContext,
- _In_ PIO_STACK_LOCATION IrpSp,
+ _In_ PIO_STACK_LOCATION IrpSp,
_Inout_ PFILE_OBJECT FileObject,
_Inout_ PVCB Vcb,
_Outptr_result_maybenull_ PDCB *Dcb,
@@ -4030,7 +4195,7 @@ Return Value:
UNREFERENCED_PARAMETER( OpenRequiringOplock );
#endif
UNREFERENCED_PARAMETER( IrpSp );
-
+
PAGED_CODE();
DebugTrace(+1, Dbg, "FatOpenExistingDirectory...\n", 0);
@@ -4125,7 +4290,7 @@ Return Value:
if (Iosb.Status != STATUS_SUCCESS) {
NT_ASSERT( Iosb.Status != STATUS_PENDING );
-
+
FatRaiseStatus( IrpContext, Iosb.Status );
}
#endif
@@ -4138,7 +4303,7 @@ Return Value:
ShareAccess,
FileObject,
&(*Dcb)->ShareAccess );
-
+
//
// Setup the context and section object pointers, and update
// our reference counts
@@ -4195,14 +4360,14 @@ Return Value:
(*Dcb)->UncleanCount -= 1;
(*Dcb)->OpenCount -= 1;
Vcb->OpenFileCount -= 1;
- if (IsFileObjectReadOnly(FileObject)) { Vcb->ReadOnlyCount -= 1; }
+ if (IsFileObjectReadOnly(FileObject)) { Vcb->ReadOnlyCount -= 1; }
}
- if (UnwindDcb != NULL) {
+ if (UnwindDcb != NULL) {
if (ARGUMENT_PRESENT( FileObject )) {
FileObject->SectionObjectPointer = NULL;
}
- FatDeleteFcb( IrpContext, &UnwindDcb );
+ FatDeleteFcb( IrpContext, &UnwindDcb );
*Dcb = NULL;
}
if (UnwindCcb != NULL) { FatDeleteCcb( IrpContext, &UnwindCcb ); }
@@ -4231,12 +4396,13 @@ FatOpenExistingFile (
_In_ ULONG LfnByteOffset,
_In_ ULONG DirentByteOffset,
_In_ PUNICODE_STRING Lfn,
+ _In_ PUNICODE_STRING OrigLfn,
_In_ PACCESS_MASK DesiredAccess,
_In_ USHORT ShareAccess,
_In_ ULONG AllocationSize,
_In_ PFILE_FULL_EA_INFORMATION EaBuffer,
_In_ ULONG EaLength,
- _In_ UCHAR FileAttributes,
+ _In_ USHORT FileAttributes,
_In_ ULONG CreateDisposition,
_In_ BOOLEAN IsPagingFile,
_In_ BOOLEAN NoEaKnowledge,
@@ -4312,7 +4478,7 @@ Return Value:
IO_STATUS_BLOCK Iosb = {0};
ACCESS_MASK AddedAccess = 0;
-
+
PIO_STACK_LOCATION IrpSp = IoGetCurrentIrpStackLocation( IrpContext->OriginatingIrp );
//
@@ -4441,12 +4607,13 @@ Return Value:
DirentByteOffset,
Dirent,
Lfn,
+ OrigLfn,
IsPagingFile,
FALSE );
-
+
(*Fcb)->Header.ValidDataLength.LowPart = (*Fcb)->Header.FileSize.LowPart;
-
+
//
// If this is a paging file, lookup the allocation size so that
// the Mcb is always valid
@@ -4493,7 +4660,7 @@ Return Value:
if (Iosb.Status != STATUS_SUCCESS) {
NT_ASSERT( Iosb.Status != STATUS_PENDING );
-
+
FatRaiseStatus( IrpContext, Iosb.Status );
}
#endif
@@ -4645,14 +4812,14 @@ Return Value:
(KPROCESSOR_MODE)( FlagOn( IrpSp->Flags, SL_FORCE_ACCESS_CHECK ) ?
UserMode :
IrpContext->OriginatingIrp->RequestorMode ))) {
-
+
SetFlag( Ccb->Flags, CCB_FLAG_MANAGE_VOLUME_ACCESS );
}
}
}
-
+
} finally {
DebugUnwind( FatOpenExistingFile );
@@ -4663,7 +4830,7 @@ Return Value:
if (AbnormalTermination()) {
- if (CountsIncremented) {
+ if (CountsIncremented) {
(*Fcb)->UncleanCount -= 1;
(*Fcb)->OpenCount -= 1;
if (FlagOn(FileObject->Flags, FO_NO_INTERMEDIATE_BUFFERING)) {
@@ -4673,14 +4840,14 @@ Return Value:
if (IsFileObjectReadOnly(FileObject)) { Vcb->ReadOnlyCount -= 1; }
}
- if (UnwindFcb != NULL) {
+ if (UnwindFcb != NULL) {
if (ARGUMENT_PRESENT( FileObject )) {
FileObject->SectionObjectPointer = NULL;
}
FatDeleteFcb( IrpContext, &UnwindFcb );
*Fcb = NULL;
}
-
+
if (UnwindCcb != NULL) { FatDeleteCcb( IrpContext, &UnwindCcb ); }
}
@@ -4709,7 +4876,7 @@ FatCreateNewDirectory (
_In_ USHORT ShareAccess,
_In_ PFILE_FULL_EA_INFORMATION EaBuffer,
_In_ ULONG EaLength,
- _In_ UCHAR FileAttributes,
+ _In_ USHORT FileAttributes,
_In_ BOOLEAN NoEaKnowledge,
_In_ BOOLEAN DeleteOnClose,
_In_ BOOLEAN OpenRequiringOplock
@@ -4792,7 +4959,7 @@ Return Value:
BOOLEAN DirentFromPool = FALSE;
-
+
OEM_STRING ShortName;
UCHAR ShortNameBuffer[12];
@@ -4943,7 +5110,7 @@ Return Value:
AllLowerComponent,
AllLowerExtension,
CreateLfn ? UnicodeName : NULL,
- (UCHAR)(FileAttributes | FAT_DIRENT_ATTR_DIRECTORY),
+ FileAttributes | FAT_DIRENT_ATTR_DIRECTORY,
TRUE,
NULL );
@@ -4977,7 +5144,7 @@ Return Value:
#if (NTDDI_VERSION >= NTDDI_WIN8)
//
// The next three FsRtl calls are for oplock work. We deliberately
- // do these here so that if either call fails we will be able to
+ // do these here so that if either call fails we will be able to
// clean up without adding a bunch of code to unwind counts, fix
// the file object, etc.
//
@@ -5014,7 +5181,7 @@ Return Value:
// off chance this fails with INSUFFICIENT_RESOURCES we do it here
// where we can still tolerate a failure.
//
-
+
if (Iosb.Status == STATUS_SUCCESS) {
Iosb.Status = FsRtlCheckOplockEx( FatGetFcbOplock(ParentDcb),
@@ -5024,7 +5191,7 @@ Return Value:
NULL,
NULL );
}
-
+
//
// Get out if any of the oplock calls failed.
//
@@ -5307,7 +5474,7 @@ Return Value:
// Now zap the allocation backing it.
//
- FatTruncateFileAllocation( IrpContext, Dcb, 0, TRUE );
+ FatTruncateFileAllocation( IrpContext, Dcb, 0 );
} except(FatExceptionFilter( IrpContext, GetExceptionInformation() )) {
@@ -5370,11 +5537,11 @@ Return Value:
// we have to remove the Dcb and check if we should remove the parent.
// For now we will just leave the parent lying around.
//
-
-#pragma prefast( suppress: 28924, "prefast thinks this test is redundant, but FileObject can be NULL depending on where we raise" )
+
+#pragma prefast( suppress: 28924, "prefast thinks this test is redundant, but FileObject can be NULL depending on where we raise" )
if (ARGUMENT_PRESENT( FileObject )) {
FileObject->SectionObjectPointer = NULL;
- }
+ }
FatDeleteFcb( IrpContext, &Dcb );
}
}
@@ -5399,7 +5566,7 @@ _Requires_lock_held_(_Global_critical_region_)
IO_STATUS_BLOCK
FatCreateNewFile (
_In_ PIRP_CONTEXT IrpContext,
- _In_ PIO_STACK_LOCATION IrpSp,
+ _In_ PIO_STACK_LOCATION IrpSp,
_Inout_ PFILE_OBJECT FileObject,
_Inout_ PVCB Vcb,
_Inout_ PDCB ParentDcb,
@@ -5410,7 +5577,7 @@ FatCreateNewFile (
_In_ ULONG AllocationSize,
_In_ PFILE_FULL_EA_INFORMATION EaBuffer,
_In_ ULONG EaLength,
- _In_ UCHAR FileAttributes,
+ _In_ USHORT FileAttributes,
_In_ PUNICODE_STRING LfnBuffer,
_In_ BOOLEAN IsPagingFile,
_In_ BOOLEAN NoEaKnowledge,
@@ -5531,7 +5698,7 @@ Return Value:
PCCB UnwindCcb = NULL;
ULONG LocalAbnormalTermination = FALSE;
-
+
#if (NTDDI_VERSION < NTDDI_WIN7)
UNREFERENCED_PARAMETER( OpenRequiringOplock );
#endif
@@ -5731,7 +5898,7 @@ Return Value:
AllLowerComponent,
AllLowerExtension,
CreateLfn ? RealUnicodeName : NULL,
- (UCHAR)(FileAttributes | FILE_ATTRIBUTE_ARCHIVE),
+ (FileAttributes | FILE_ATTRIBUTE_ARCHIVE),
TRUE,
(HaveTunneledInformation ? &TunneledCreationTime : NULL) );
@@ -5763,6 +5930,7 @@ Return Value:
ShortDirentByteOffset,
ShortDirent,
CreateLfn ? RealUnicodeName : NULL,
+ CreateLfn ? RealUnicodeName : NULL,
IsPagingFile,
FALSE );
UnwindDirent = NULL;
@@ -5770,7 +5938,7 @@ Return Value:
#if (NTDDI_VERSION >= NTDDI_WIN7)
//
// The next three FsRtl calls are for oplock work. We deliberately
- // do these here so that if either call fails we will be able to
+ // do these here so that if either call fails we will be able to
// clean up without adding a bunch of code to unwind counts, fix
// the file object, etc.
//
@@ -5809,7 +5977,7 @@ Return Value:
// off chance this fails with INSUFFICIENT_RESOURCES we do it here
// where we can still tolerate a failure.
//
-
+
if (Iosb.Status == STATUS_SUCCESS) {
Iosb.Status = FsRtlCheckOplockEx( FatGetFcbOplock(ParentDcb),
@@ -5841,12 +6009,15 @@ Return Value:
SetFlag( Fcb->FcbState, FCB_STATE_TEMPORARY );
}
-
+
//
// Add some initial file allocation
//
+
FatAddFileAllocation( IrpContext, Fcb, FileObject, AllocationSize );
+
+
UnwindAllocation = TRUE;
Fcb->FcbState |= FCB_STATE_TRUNCATE_ON_CLOSE;
@@ -5880,7 +6051,7 @@ Return Value:
if (Fcb->FullFileName.Buffer == NULL) {
FatSetFullNameInFcb( IrpContext, Fcb, RealUnicodeName );
}
-
+
//
// Setup the context and section object pointers, and update
// our reference counts
@@ -5965,13 +6136,13 @@ Return Value:
(KPROCESSOR_MODE)( FlagOn( IrpSp->Flags, SL_FORCE_ACCESS_CHECK ) ?
UserMode :
IrpContext->OriginatingIrp->RequestorMode ))) {
-
+
SetFlag( UnwindCcb->Flags, CCB_FLAG_MANAGE_VOLUME_ACCESS );
}
}
-
+
} finally {
DebugUnwind( FatCreateNewFile );
@@ -6079,7 +6250,7 @@ Return Value:
if (LocalAbnormalTermination) {
if (UnwindAllocation) {
- FatTruncateFileAllocation( IrpContext, Fcb, 0, TRUE );
+ FatTruncateFileAllocation( IrpContext, Fcb, 0 );
}
}
@@ -6096,11 +6267,11 @@ Return Value:
} finally {
if (LocalAbnormalTermination) {
- if (UnwindFcb != NULL) {
+ if (UnwindFcb != NULL) {
if (ARGUMENT_PRESENT( FileObject )) {
FileObject->SectionObjectPointer = NULL;
}
- FatDeleteFcb( IrpContext, &UnwindFcb );
+ FatDeleteFcb( IrpContext, &UnwindFcb );
}
if (UnwindCcb != NULL) { FatDeleteCcb( IrpContext, &UnwindCcb ); }
}
@@ -6140,7 +6311,7 @@ FatSupersedeOrOverwriteFile (
_In_ ULONG AllocationSize,
_In_ PFILE_FULL_EA_INFORMATION EaBuffer,
_In_ ULONG EaLength,
- _In_ UCHAR FileAttributes,
+ _In_ USHORT FileAttributes,
_In_ ULONG CreateDisposition,
_In_ BOOLEAN NoEaKnowledge
)
@@ -6190,6 +6361,8 @@ Return Value:
PCCB Ccb;
ULONG NotifyFilter;
+ ULONG HeaderSize = 0;
+ LARGE_INTEGER AllocSize = {0};
//
// The following variables are for abnormal termination
@@ -6276,7 +6449,7 @@ Return Value:
// off chance this fails with INSUFFICIENT_RESOURCES we do it here
// where we can still tolerate a failure.
//
-
+
Iosb.Status = FsRtlCheckOplockEx( FatGetFcbOplock(Fcb->ParentDcb),
IrpContext->OriginatingIrp,
OPLOCK_FLAG_PARENT_OBJECT,
@@ -6303,6 +6476,20 @@ Return Value:
Fcb->Header.ValidDataLength.LowPart = 0;
Fcb->ValidDataToDisk = 0;
+
+ //
+ // Validate that the allocation size will work.
+ //
+
+ AllocSize.QuadPart = AllocationSize;
+ if (!FatIsIoRangeValid( Fcb->Vcb, AllocSize, 0 )) {
+
+ DebugTrace(-1, Dbg, "Illegal allocation size\n", 0);
+
+ FatRaiseStatus( IrpContext, STATUS_DISK_FULL );
+ }
+
+
//
// Tell the cache manager the size went to zero
// This call is unconditional, because MM always wants to know.
@@ -6311,12 +6498,12 @@ Return Value:
CcSetFileSizes( FileObject,
(PCC_FILE_SIZES)&Fcb->Header.AllocationSize );
- FatTruncateFileAllocation( IrpContext, Fcb, AllocationSize, FALSE );
+ FatTruncateFileAllocation( IrpContext, Fcb, AllocationSize+HeaderSize );
ExReleaseResourceLite( Fcb->Header.PagingIoResource );
ReleasePaging = FALSE;
- FatAddFileAllocation( IrpContext, Fcb, FileObject, AllocationSize );
+ FatAddFileAllocation( IrpContext, Fcb, FileObject, AllocationSize+HeaderSize );
Fcb->FcbState |= FCB_STATE_TRUNCATE_ON_CLOSE;
@@ -6346,11 +6533,11 @@ Return Value:
if (CreateDisposition == FILE_SUPERSEDE) {
- Dirent->Attributes = FileAttributes;
+ Dirent->Attributes = (UCHAR)FileAttributes;
} else {
- Dirent->Attributes |= FileAttributes;
+ Dirent->Attributes |= (UCHAR)FileAttributes;
}
Fcb->DirentFatFlags = Dirent->Attributes;
@@ -6661,7 +6848,7 @@ Return Value:
If the accessor has access to the file, STATUS_SUCCESS is returned.
Otherwise, STATUS_SHARING_VIOLATION is returned.
-
+
--*/
{
@@ -6724,4 +6911,3 @@ FatCallSelfCompletionRoutine (
return STATUS_MORE_PROCESSING_REQUIRED;
}
-
diff --git a/filesys/fastfat/deviosup.c b/filesys/fastfat/deviosup.c
index ee46c016..5802722d 100644
--- a/filesys/fastfat/deviosup.c
+++ b/filesys/fastfat/deviosup.c
@@ -1042,7 +1042,7 @@ Return Value:
// that this will be only a single page.
//
- if (MmGetSystemAddressForMdlSafe( Mdl, NormalPagePriority ) == NULL) {
+ if (MmGetSystemAddressForMdlSafe( Mdl, NormalPagePriority | MdlMappingNoExecute ) == NULL) {
FatRaiseStatus( IrpContext, STATUS_INSUFFICIENT_RESOURCES );
}
@@ -1874,6 +1874,12 @@ Return Value:
}
//
+ // Back up a copy of the IrpContext flags for later use in async completion.
+ //
+
+ Context->IrpContextFlags = IrpContext->Flags;
+
+ //
// Now that all the dangerous work is done, issue the read requests
//
@@ -2095,6 +2101,12 @@ Return Value:
}
//
+ // Back up a copy of the IrpContext flags for later use in async completion.
+ //
+
+ IrpContext->FatIoContext->IrpContextFlags = IrpContext->Flags;
+
+ //
// Issue the read request
//
@@ -2419,7 +2431,11 @@ Return Value:
if (!NT_SUCCESS( Irp->IoStatus.Status )) {
- NT_ASSERT( NT_SUCCESS( FatAssertNotStatus ) || Irp->IoStatus.Status != FatAssertNotStatus );
+#if DBG
+ if(!( NT_SUCCESS( FatBreakOnInterestingIoCompletion ) || Irp->IoStatus.Status != FatBreakOnInterestingIoCompletion )) {
+ DbgBreakPoint();
+ }
+#endif
#ifdef SYSCACHE_COMPILE
DbgPrint( "FAT SYSCACHE: MultiSync (IRP %08x for Master %08x) -> %08x\n", Irp, MasterIrp, Irp->IoStatus );
@@ -2503,9 +2519,10 @@ Return Value:
--*/
{
-
+ NTSTATUS Status = STATUS_SUCCESS;
PFAT_IO_CONTEXT Context = Contxt;
PIRP MasterIrp = Context->MasterIrp;
+ BOOLEAN PostRequest = FALSE;
DebugTrace(+1, Dbg, "FatMultiAsyncCompletionRoutine, Context = %p\n", Context );
@@ -2515,7 +2532,11 @@ Return Value:
if (!NT_SUCCESS( Irp->IoStatus.Status )) {
- NT_ASSERT( NT_SUCCESS( FatAssertNotStatus ) || Irp->IoStatus.Status != FatAssertNotStatus );
+#if DBG
+ if (!( NT_SUCCESS( FatBreakOnInterestingIoCompletion ) || Irp->IoStatus.Status != FatBreakOnInterestingIoCompletion )) {
+ DbgBreakPoint();
+ }
+#endif
#ifdef SYSCACHE_COMPILE
DbgPrint( "FAT SYSCACHE: MultiAsync (IRP %08x for Master %08x) -> %08x\n", Irp, MasterIrp, Irp->IoStatus );
@@ -2548,6 +2569,19 @@ Return Value:
IoGetCurrentIrpStackLocation(MasterIrp)->MajorFunction == IRP_MJ_READ ?
FO_FILE_FAST_IO_READ : FO_FILE_MODIFIED );
}
+
+ } else {
+
+ //
+ // Post STATUS_VERIFY_REQUIRED failures. Only post top level IRPs, because recursive I/Os
+ // cannot process volume verification.
+ //
+
+ if (!FlagOn(Context->IrpContextFlags, IRP_CONTEXT_FLAG_RECURSIVE_CALL) &&
+ (MasterIrp->IoStatus.Status == STATUS_VERIFY_REQUIRED)) {
+ PostRequest = TRUE;
+ }
+
}
//
@@ -2594,13 +2628,35 @@ Return Value:
//
ExFreePool( Context );
+
+ if (PostRequest) {
+
+ PIRP_CONTEXT IrpContext = NULL;
+
+ try {
+
+ IrpContext = FatCreateIrpContext(Irp, TRUE );
+ ClearFlag(IrpContext->Flags, IRP_CONTEXT_FLAG_RECURSIVE_CALL);
+ FatFsdPostRequest( IrpContext, Irp );
+ Status = STATUS_MORE_PROCESSING_REQUIRED;
+
+ } except( FatExceptionFilter(NULL, GetExceptionInformation()) ) {
+
+ //
+ // If we failed to post the IRP, we just have to return the failure
+ // to the user. :(
+ //
+
+ NOTHING;
+ }
+ }
}
DebugTrace(-1, Dbg, "FatMultiAsyncCompletionRoutine -> SUCCESS\n", 0 );
UNREFERENCED_PARAMETER( DeviceObject );
- return STATUS_SUCCESS;
+ return Status;
}
@@ -2984,7 +3040,12 @@ Return Value:
if (!NT_SUCCESS( Irp->IoStatus.Status )) {
- NT_ASSERT( NT_SUCCESS( FatAssertNotStatus ) || Irp->IoStatus.Status != FatAssertNotStatus );
+#if DBG
+ if(!( NT_SUCCESS( FatBreakOnInterestingIoCompletion ) || Irp->IoStatus.Status != FatBreakOnInterestingIoCompletion )) {
+ DbgBreakPoint();
+ }
+#endif
+
}
NT_ASSERT( !(NT_SUCCESS( Irp->IoStatus.Status ) && Irp->IoStatus.Information == 0 ));
@@ -3042,7 +3103,10 @@ Return Value:
--*/
{
+ NTSTATUS Status = STATUS_SUCCESS;
+
PFAT_IO_CONTEXT Context = Contxt;
+ BOOLEAN PostRequest = FALSE;
DebugTrace(+1, Dbg, "FatSingleAsyncCompletionRoutine, Context = %p\n", Context );
@@ -3071,12 +3135,26 @@ Return Value:
} else {
- NT_ASSERT( NT_SUCCESS( FatAssertNotStatus ) || Irp->IoStatus.Status != FatAssertNotStatus );
+#if DBG
+ if(!( NT_SUCCESS( FatBreakOnInterestingIoCompletion ) || Irp->IoStatus.Status != FatBreakOnInterestingIoCompletion )) {
+ DbgBreakPoint();
+ }
+#endif
#ifdef SYSCACHE_COMPILE
DbgPrint( "FAT SYSCACHE: SingleAsync (IRP %08x) -> %08x\n", Irp, Irp->IoStatus );
#endif
+ //
+ // Post STATUS_VERIFY_REQUIRED failures. Only post top level IRPs, because recursive I/Os
+ // cannot process volume verification.
+ //
+
+ if (!FlagOn(Context->IrpContextFlags, IRP_CONTEXT_FLAG_RECURSIVE_CALL) &&
+ (Irp->IoStatus.Status == STATUS_VERIFY_REQUIRED)) {
+ PostRequest = TRUE;
+ }
+
}
//
@@ -3125,11 +3203,34 @@ Return Value:
ExFreePool( Context );
+ if (PostRequest) {
+
+ PIRP_CONTEXT IrpContext = NULL;
+
+ try {
+
+ IrpContext = FatCreateIrpContext(Irp, TRUE );
+ ClearFlag(IrpContext->Flags, IRP_CONTEXT_FLAG_RECURSIVE_CALL);
+ FatFsdPostRequest( IrpContext, Irp );
+ Status = STATUS_MORE_PROCESSING_REQUIRED;
+
+ } except( FatExceptionFilter(NULL, GetExceptionInformation()) ) {
+
+ //
+ // If we failed to post the IRP, we just have to return the failure
+ // to the user. :(
+ //
+
+ NOTHING;
+ }
+ }
+
+
DebugTrace(-1, Dbg, "FatSingleAsyncCompletionRoutine -> STATUS_MORE_PROCESSING_REQUIRED\n", 0 );
UNREFERENCED_PARAMETER( DeviceObject );
- return STATUS_SUCCESS;
+ return Status;
}
@@ -3256,7 +3357,7 @@ Return Value:
} else {
- PVOID Address = MmGetSystemAddressForMdlSafe( Irp->MdlAddress, NormalPagePriority );
+ PVOID Address = MmGetSystemAddressForMdlSafe( Irp->MdlAddress, NormalPagePriority | MdlMappingNoExecute );
if (Address == NULL) {
diff --git a/filesys/fastfat/dirctrl.c b/filesys/fastfat/dirctrl.c
index 451acc99..cc316d72 100644
--- a/filesys/fastfat/dirctrl.c
+++ b/filesys/fastfat/dirctrl.c
@@ -289,6 +289,7 @@ Return Value:
PFILE_ID_BOTH_DIR_INFORMATION IdBothDirInfo;
PFILE_NAMES_INFORMATION NamesInfo;
+
PAGED_CODE();
//
diff --git a/filesys/fastfat/dirsup.c b/filesys/fastfat/dirsup.c
index 14cc9238..eca6c16a 100644
--- a/filesys/fastfat/dirsup.c
+++ b/filesys/fastfat/dirsup.c
@@ -1251,7 +1251,8 @@ Return Value:
BOOLEAN FoundValidLfn;
UpcasedLfnValid = FALSE;
-
+
+
//
// Try to read in the dirent
//
@@ -2158,102 +2159,6 @@ Return Value:
return IsDirectoryEmpty;
}
-_Requires_lock_held_(_Global_critical_region_)
-VOID
-FatDeleteFile (
- IN PIRP_CONTEXT IrpContext,
- IN PDCB TargetDcb,
- IN ULONG LfnOffset,
- IN ULONG DirentOffset,
- IN PDIRENT Dirent,
- IN PUNICODE_STRING Lfn
- )
-{
- PFCB Fcb;
- PLIST_ENTRY Links;
-
- PAGED_CODE();
-
- //
- // We can do the replace by removing the other Fcb(s) from
- // the prefix table.
- //
-
- for (Links = TargetDcb->Specific.Dcb.ParentDcbQueue.Flink;
- Links != &TargetDcb->Specific.Dcb.ParentDcbQueue;
- Links = Links->Flink) {
-
- Fcb = CONTAINING_RECORD( Links, FCB, ParentDcbLinks );
-
- if (FlagOn(Fcb->FcbState, FCB_STATE_NAMES_IN_SPLAY_TREE) &&
- (Fcb->DirentOffsetWithinDirectory == DirentOffset)) {
-
- NT_ASSERT( NodeType(Fcb) == FAT_NTC_FCB );
- NT_ASSERT( Fcb->LfnOffsetWithinDirectory == LfnOffset );
-
- if ( Fcb->UncleanCount != 0 ) {
-
-#pragma prefast( suppress:28159, "things are seriously wrong if we get here" )
- FatBugCheck(0,0,0);
-
- } else {
-
- PERESOURCE Resource;
-
- //
- // Make this fcb "appear" deleted, synchronizing with
- // paging IO.
- //
-
- FatRemoveNames( IrpContext, Fcb );
-
- Resource = Fcb->Header.PagingIoResource;
-
- (VOID)ExAcquireResourceExclusiveLite( Resource, TRUE );
-
- SetFlag(Fcb->FcbState, FCB_STATE_DELETE_ON_CLOSE);
-
- Fcb->ValidDataToDisk = 0;
- Fcb->Header.FileSize.QuadPart =
- Fcb->Header.ValidDataLength.QuadPart = 0;
-
- Fcb->FirstClusterOfFile = 0;
-
- ExReleaseResourceLite( Resource );
- }
- }
- }
-
- //
- // The file is not currently opened so we can delete the file
- // that is being overwritten. To do the operation we dummy
- // up an fcb, truncate allocation, delete the fcb, and delete
- // the dirent.
- //
-
- Fcb = FatCreateFcb( IrpContext,
- TargetDcb->Vcb,
- TargetDcb,
- LfnOffset,
- DirentOffset,
- Dirent,
- Lfn,
- FALSE,
- FALSE );
-
- Fcb->Header.FileSize.LowPart = 0;
-
- try {
-
- FatTruncateFileAllocation( IrpContext, Fcb, 0, TRUE );
-
- FatDeleteDirent( IrpContext, Fcb, NULL, TRUE );
-
- } finally {
-
- FatDeleteFcb( IrpContext, &Fcb );
- }
-}
@@ -2266,7 +2171,7 @@ FatConstructDirent (
IN BOOLEAN ComponentReallyLowercase,
IN BOOLEAN ExtensionReallyLowercase,
IN PUNICODE_STRING Lfn OPTIONAL,
- IN UCHAR Attributes,
+ IN USHORT Attributes,
IN BOOLEAN ZeroAndSetTimeFields,
IN PLARGE_INTEGER SetCreationTime OPTIONAL
)
@@ -2394,7 +2299,7 @@ Return Value:
// Copy the attributes
//
- Dirent->Attributes = Attributes;
+ Dirent->Attributes = (UCHAR)Attributes;
//
// Set the magic bit here, to tell dirctrl.c that this name is really
diff --git a/filesys/fastfat/fastfat.sln b/filesys/fastfat/fastfat.sln
index 1e873e2f..6a5189c8 100644
--- a/filesys/fastfat/fastfat.sln
+++ b/filesys/fastfat/fastfat.sln
@@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0
MinimumVisualStudioVersion = 12.0
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fastfat", "fastfat.vcxproj", "{290F0F28-6606-4D9C-A2D4-2A3BCB252E23}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fastfat", "fastfat.vcxproj", "{31BA0C80-2E84-44C8-9FEA-E8994DC90440}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -13,14 +13,14 @@ Global
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {290F0F28-6606-4D9C-A2D4-2A3BCB252E23}.Debug|Win32.ActiveCfg = Debug|Win32
- {290F0F28-6606-4D9C-A2D4-2A3BCB252E23}.Debug|Win32.Build.0 = Debug|Win32
- {290F0F28-6606-4D9C-A2D4-2A3BCB252E23}.Release|Win32.ActiveCfg = Release|Win32
- {290F0F28-6606-4D9C-A2D4-2A3BCB252E23}.Release|Win32.Build.0 = Release|Win32
- {290F0F28-6606-4D9C-A2D4-2A3BCB252E23}.Debug|x64.ActiveCfg = Debug|x64
- {290F0F28-6606-4D9C-A2D4-2A3BCB252E23}.Debug|x64.Build.0 = Debug|x64
- {290F0F28-6606-4D9C-A2D4-2A3BCB252E23}.Release|x64.ActiveCfg = Release|x64
- {290F0F28-6606-4D9C-A2D4-2A3BCB252E23}.Release|x64.Build.0 = Release|x64
+ {31BA0C80-2E84-44C8-9FEA-E8994DC90440}.Debug|Win32.ActiveCfg = Debug|Win32
+ {31BA0C80-2E84-44C8-9FEA-E8994DC90440}.Debug|Win32.Build.0 = Debug|Win32
+ {31BA0C80-2E84-44C8-9FEA-E8994DC90440}.Release|Win32.ActiveCfg = Release|Win32
+ {31BA0C80-2E84-44C8-9FEA-E8994DC90440}.Release|Win32.Build.0 = Release|Win32
+ {31BA0C80-2E84-44C8-9FEA-E8994DC90440}.Debug|x64.ActiveCfg = Debug|x64
+ {31BA0C80-2E84-44C8-9FEA-E8994DC90440}.Debug|x64.Build.0 = Debug|x64
+ {31BA0C80-2E84-44C8-9FEA-E8994DC90440}.Release|x64.ActiveCfg = Release|x64
+ {31BA0C80-2E84-44C8-9FEA-E8994DC90440}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/filesys/fastfat/fastfat.vcxproj b/filesys/fastfat/fastfat.vcxproj
index a74af413..db0d9818 100644
--- a/filesys/fastfat/fastfat.vcxproj
+++ b/filesys/fastfat/fastfat.vcxproj
@@ -19,12 +19,12 @@
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
- <ProjectGuid>{290F0F28-6606-4D9C-A2D4-2A3BCB252E23}</ProjectGuid>
+ <ProjectGuid>{31BA0C80-2E84-44C8-9FEA-E8994DC90440}</ProjectGuid>
<RootNamespace>$(MSBuildProjectName)</RootNamespace>
<SupportsPackaging>false</SupportsPackaging>
<Configuration Condition="'$(Configuration)' == ''">Debug</Configuration>
<Platform Condition="'$(Platform)' == ''">Win32</Platform>
- <SampleGuid>{CF490AB8-7641-46A9-98CE-6EFC136A00F8}</SampleGuid>
+ <SampleGuid>{C67EAEBC-7DCC-40D7-897A-EEFE6F295870}</SampleGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
diff --git a/filesys/fastfat/fastfat.vcxproj.Filters b/filesys/fastfat/fastfat.vcxproj.Filters
index 3d6452f0..bcb5c789 100644
--- a/filesys/fastfat/fastfat.vcxproj.Filters
+++ b/filesys/fastfat/fastfat.vcxproj.Filters
@@ -3,19 +3,19 @@
<ItemGroup>
<Filter Include="Source Files">
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx;*</Extensions>
- <UniqueIdentifier>{73952C13-F65F-4462-8992-EFBA397D88BA}</UniqueIdentifier>
+ <UniqueIdentifier>{6B0DB38D-339D-4394-9D38-7B33D2578604}</UniqueIdentifier>
</Filter>
<Filter Include="Header Files">
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- <UniqueIdentifier>{07E2EF4D-1D9B-4EBF-B954-8C70849A5EDE}</UniqueIdentifier>
+ <UniqueIdentifier>{6799021A-3482-4D44-AFA7-0E3568479792}</UniqueIdentifier>
</Filter>
<Filter Include="Resource Files">
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms;man;xml</Extensions>
- <UniqueIdentifier>{DB83B853-1CD8-4FAD-9B15-041FAC3314CB}</UniqueIdentifier>
+ <UniqueIdentifier>{B42AE315-4579-4F49-8104-ED6E17FCF170}</UniqueIdentifier>
</Filter>
<Filter Include="Driver Files">
<Extensions>inf;inv;inx;mof;mc;</Extensions>
- <UniqueIdentifier>{A2195824-1370-4853-B032-E24348F5B667}</UniqueIdentifier>
+ <UniqueIdentifier>{812A042D-E3EA-4BBA-A173-92B6D8556F8D}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
diff --git a/filesys/fastfat/fatdata.c b/filesys/fastfat/fatdata.c
index 07696d81..210c632f 100644
--- a/filesys/fastfat/fatdata.c
+++ b/filesys/fastfat/fatdata.c
@@ -121,15 +121,16 @@ ULONG FatTotalTicks[32] = { 0 };
PVOID FatNull = NULL;
-NTSTATUS FatInterestingException = 0;
-
#endif // FASTFATDBG
#if DBG
-NTSTATUS FatAssertNotStatus = STATUS_SUCCESS;
BOOLEAN FatTestRaisedStatus = FALSE;
+NTSTATUS FatBreakOnInterestingIoCompletion = STATUS_SUCCESS;
+NTSTATUS FatBreakOnInterestingExceptionStatus = 0;
+NTSTATUS FatBreakOnInterestingIrpCompletion = 0;
+
#endif
@@ -204,10 +205,10 @@ Return Value:
DebugTrace(0, DEBUG_TRACE_UNWIND, "FatExceptionFilter %X\n", ExceptionCode);
DebugDump("FatExceptionFilter\n", Dbg, NULL );
-#ifdef FASTFATDBG
+#ifdef DBG
- if( FatInterestingException != 0 && ExceptionCode == FatInterestingException ) {
- NT_ASSERT(FALSE);
+ if( FatBreakOnInterestingExceptionStatus != 0 && ExceptionCode == FatBreakOnInterestingExceptionStatus ) {
+ DbgBreakPoint();
}
#endif
@@ -724,6 +725,13 @@ Return Value:
{
PAGED_CODE();
+#if DBG
+ if ( (FatBreakOnInterestingIrpCompletion != 0) && (Status == FatBreakOnInterestingIrpCompletion) ) {
+ DbgBreakPoint();
+ }
+
+#endif
+
//
// If we have an Irp Context then unpin all of the repinned bcbs
// we might have collected.
@@ -901,6 +909,7 @@ Return Value:
} else {
+
//
// Also check for a write-protected volume here.
//
diff --git a/filesys/fastfat/fatdata.h b/filesys/fastfat/fatdata.h
index c6dd20c0..e8c2d24d 100644
--- a/filesys/fastfat/fatdata.h
+++ b/filesys/fastfat/fatdata.h
@@ -84,7 +84,6 @@ extern FAST_IO_DISPATCH FatFastIoDispatch;
extern LOGICAL FatDiskAccountingEnabled;
-
//
// Read ahead amount used for normal data files
//
@@ -290,7 +289,6 @@ extern LONG FatPerformanceTimerLevel;
//
extern PVOID FatNull;
-extern NTSTATUS FatInterestingException;
#else
@@ -323,7 +321,10 @@ extern NTSTATUS FatInterestingException;
#if DBG
-extern NTSTATUS FatAssertNotStatus;
+extern NTSTATUS FatBreakOnInterestingIoCompletion;
+extern NTSTATUS FatBreakOnInterestingExceptionStatus;
+extern NTSTATUS FatBreakOnInterestingIrpCompletion;
+
extern BOOLEAN FatTestRaisedStatus;
#endif
diff --git a/filesys/fastfat/fatprocs.h b/filesys/fastfat/fatprocs.h
index 555e1aa6..5f7d7305 100644
--- a/filesys/fastfat/fatprocs.h
+++ b/filesys/fastfat/fatprocs.h
@@ -54,6 +54,10 @@ Abstract:
#define MAX_ULONG ((ULONG)-1)
#endif
+#ifndef MAX_USHORT
+#define MAX_USHORT ((USHORT)-1)
+#endif
+
//
// We must explicitly tag our allocations.
//
@@ -293,8 +297,7 @@ VOID
FatTruncateFileAllocation (
IN PIRP_CONTEXT IrpContext,
IN PFCB FcbOrDcb,
- IN ULONG AllocationSize,
- IN BOOLEAN ForDeletion
+ IN ULONG AllocationSize
);
_Requires_lock_held_(_Global_critical_region_)
@@ -769,7 +772,7 @@ FatConstructDirent (
IN BOOLEAN ComponentReallyLowercase,
IN BOOLEAN ExtensionReallyLowercase,
IN PUNICODE_STRING Lfn OPTIONAL,
- IN UCHAR Attributes,
+ IN USHORT Attributes,
IN BOOLEAN ZeroAndSetTimeFields,
IN PLARGE_INTEGER SetCreationTime OPTIONAL
);
@@ -1290,6 +1293,13 @@ FatSpaceInName (
IN PUNICODE_STRING UnicodeName
);
+VOID
+FatUnicodeRestoreShortNameCase(
+ IN PUNICODE_STRING ShortNameWithCase,
+ IN BOOLEAN LowerCase8,
+ IN BOOLEAN LowerCase3
+ );
+
//
// Resources support routines/macros, implemented in ResrcSup.c
@@ -1653,6 +1663,7 @@ FatCreateFcb (
IN ULONG DirentOffsetWithinDirectory,
IN PDIRENT Dirent,
IN PUNICODE_STRING Lfn OPTIONAL,
+ IN PUNICODE_STRING OrigLfn OPTIONAL,
IN BOOLEAN IsPagingFile,
IN BOOLEAN SingleResource
);
@@ -2375,6 +2386,23 @@ FatCommonCreate ( // implemented in Create.c
_Inout_ PIRP Irp
);
+#if (NTDDI_VERSION >= NTDDI_WINTHRESHOLD)
+
+_Requires_lock_held_(_Global_critical_region_)
+NTSTATUS
+FatCommonCreateOnNewStack ( // implemented in Create.c
+ _Inout_ PIRP_CONTEXT IrpContext,
+ _Inout_ PIRP Irp
+ );
+
+_Requires_lock_held_(_Global_critical_region_)
+VOID
+FatCommonCreateCallout ( // implemented in Create.c
+ _In_ PFAT_CALLOUT_PARAMETERS CalloutParameters
+ );
+
+#endif
+
_Requires_lock_held_(_Global_critical_region_)
NTSTATUS
FatCommonDirectoryControl ( // implemented in DirCtrl.c
@@ -2728,6 +2756,7 @@ FatScanForDataTrack(
// );
//
+
#define FatIsFastIoPossible(FCB) ((BOOLEAN) \
((((FCB)->FcbCondition != FcbGood) || \
(NodeType( (FCB) ) != FAT_NTC_FCB) || \
@@ -2744,6 +2773,7 @@ FatScanForDataTrack(
) \
)
+
#if (NTDDI_VERSION >= NTDDI_WIN8)
//
@@ -3007,6 +3037,8 @@ FatInterpretClusterType (
#define BlockAlign(P,V) ((ASSERT( V != 0)), (((P)) + (V-1) & (0-(V))))
#define BlockAlignTruncate(P,V) ((P) & (0-(V)))
+#define IsDirectory(FcbOrDcb) ((NodeType((FcbOrDcb)) == FAT_NTC_DCB) || (NodeType((FcbOrDcb)) == FAT_NTC_ROOT_DCB))
+
#endif // _FATPROCS_
diff --git a/filesys/fastfat/fatstruc.h b/filesys/fastfat/fatstruc.h
index c4f4e1d7..644d92b3 100644
--- a/filesys/fastfat/fatstruc.h
+++ b/filesys/fastfat/fatstruc.h
@@ -208,6 +208,7 @@ typedef struct {
typedef CLOSE_CONTEXT *PCLOSE_CONTEXT;
+
//
// The Vcb (Volume control Block) record corresponds to every volume mounted
// by the file system. They are ordered in a queue off of FatData.VcbQueue.
@@ -244,6 +245,19 @@ typedef struct _VCB {
PDEVICE_OBJECT TargetDeviceObject;
//
+ // The volume GUID of the target device object.
+ //
+
+ GUID VolumeGuid;
+
+ //
+ // The volume GUID path of the target device object.
+ //
+
+ UNICODE_STRING VolumeGuidPath;
+
+
+ //
// A pointer to the VPB for the volume passed in by the I/O system on
// a mount.
//
@@ -525,12 +539,14 @@ typedef struct _VCB {
FAST_MUTEX AdvancedFcbHeaderMutex;
+
//
// How many close contexts were preallocated on this Vcb
//
#if DBG
ULONG CloseContextCount;
#endif
+
} VCB;
typedef VCB *PVCB;
@@ -553,6 +569,7 @@ typedef VCB *PVCB;
#define VCB_STATE_FLAG_DISMOUNT_IN_PROGRESS (0x00080000)
#define VCB_STATE_FLAG_BAD_BLOCKS_POPULATED (0x00100000)
#define VCB_STATE_FLAG_HOTPLUGGABLE (0x00200000)
+#define VCB_STATE_FLAG_MOUNT_IN_PROGRESS (0x00800000)
//
@@ -1328,6 +1345,12 @@ typedef DCB *PDCB;
#define CCB_FLAG_DENY_DEFRAG (0x80000)
+//
+// This flag indicates that this CCB wrote to the file.
+//
+
+#define CCB_FLAG_FIRST_WRITE_SEEN (0x100000)
+
typedef struct _CCB {
//
@@ -1344,6 +1367,12 @@ typedef struct _CCB {
ULONG Flags:24;
BOOLEAN ContainsWildCards;
+
+ //
+ // Pointer to EDP context.
+ //
+
+ PVOID EncryptionOnCloseContext;
//
// Overlay a close context on the data of the CCB. The remaining
@@ -1536,6 +1565,10 @@ typedef IRP_CONTEXT *PIRP_CONTEXT;
#define IRP_CONTEXT_FLAG_CLEANUP_BREAKING_OPLOCK (0x00002000)
+#if (NTDDI_VERSION >= NTDDI_WINTHRESHOLD)
+#define IRP_CONTEXT_FLAG_SWAPPED_STACK (0x00100000)
+#endif
+
#define IRP_CONTEXT_FLAG_PARENT_BY_CHILD (0x80000000)
@@ -1550,6 +1583,13 @@ typedef IRP_CONTEXT *PIRP_CONTEXT;
typedef struct _FAT_IO_CONTEXT {
//
+ // A copy of the IrpContext flags preserved for use in
+ // async I/O completion.
+ //
+
+ ULONG IrpContextFlags;
+
+ //
// These two field are used for multiple run Io
//
@@ -1701,6 +1741,43 @@ typedef enum _CLUSTER_TYPE {
FatClusterNext
} CLUSTER_TYPE;
+#if (NTDDI_VERSION >= NTDDI_WINTHRESHOLD)
+// ============================================================================
+// ============================================================================
+//
+// Stack Swapping Support
+//
+// ============================================================================
+// ============================================================================
+
+//
+// This structure is used when doing a callout on a new stack.
+// It contains the parameters for various functions and a place
+// to store the return code.
+//
+
+typedef struct _FAT_CALLOUT_PARAMETERS {
+
+ union {
+
+ //
+ // Parameters for a create request via FatCommonCreate().
+ //
+
+ struct {
+
+ PIRP_CONTEXT IrpContext;
+ PIRP Irp;
+
+ } Create;
+
+ };
+
+ NTSTATUS IrpStatus;
+ NTSTATUS ExceptionStatus;
+
+} FAT_CALLOUT_PARAMETERS, *PFAT_CALLOUT_PARAMETERS;
+#endif
#endif // _FATSTRUC_
diff --git a/filesys/fastfat/fileinfo.c b/filesys/fastfat/fileinfo.c
index 80d69597..5ab22d96 100644
--- a/filesys/fastfat/fileinfo.c
+++ b/filesys/fastfat/fileinfo.c
@@ -2768,19 +2768,26 @@ Return Value:
ULONG TargetDirentOffset = 0;
ULONG TargetLfnOffset = 0;
+ // NewName comes from the IRP buffer or the TargetFileObject, so we can't
+ // go around modifying it. Instead we modify NewNameCopy.
UNICODE_STRING NewName;
+
+ // NB: these five UNICODE_STRINGS are allocated
+ // from one chopped up pool allocation called UnicodeBuffer.
+ UNICODE_STRING NewNameCopy;
UNICODE_STRING NewUpcasedName;
UNICODE_STRING OldName;
UNICODE_STRING OldUpcasedName;
UNICODE_STRING TargetLfn;
- UNICODE_STRING TargetOrigLfn = {0};
-
PWCHAR UnicodeBuffer;
+ UNICODE_STRING TargetOrigLfn = {0};
+
UNICODE_STRING UniTunneledShortName;
WCHAR UniTunneledShortNameBuffer[12];
UNICODE_STRING UniTunneledLongName;
WCHAR UniTunneledLongNameBuffer[26];
+
LARGE_INTEGER TunneledCreationTime;
ULONG TunneledDataSize;
BOOLEAN HaveTunneledInformation = FALSE;
@@ -2821,7 +2828,7 @@ Return Value:
OldOemName.Buffer = (PCHAR)&OemNameBuffer[24];
UnicodeBuffer = FsRtlAllocatePoolWithTag( PagedPool,
- 4 * MAX_LFN_CHARACTERS * sizeof(WCHAR),
+ 5 * MAX_LFN_CHARACTERS * sizeof(WCHAR),
TAG_FILENAME_BUFFER );
NewUpcasedName.Length = 0;
@@ -2840,6 +2847,10 @@ Return Value:
TargetLfn.MaximumLength = MAX_LFN_CHARACTERS * sizeof(WCHAR);
TargetLfn.Buffer = &UnicodeBuffer[MAX_LFN_CHARACTERS * 3];
+ NewNameCopy.Length = 0;
+ NewNameCopy.MaximumLength = MAX_LFN_CHARACTERS * sizeof(WCHAR);
+ NewNameCopy.Buffer = &UnicodeBuffer[MAX_LFN_CHARACTERS * 4];
+
UniTunneledShortName.Length = 0;
UniTunneledShortName.MaximumLength = sizeof(UniTunneledShortNameBuffer);
UniTunneledShortName.Buffer = &UniTunneledShortNameBuffer[0];
@@ -2847,7 +2858,7 @@ Return Value:
UniTunneledLongName.Length = 0;
UniTunneledLongName.MaximumLength = sizeof(UniTunneledLongNameBuffer);
UniTunneledLongName.Buffer = &UniTunneledLongNameBuffer[0];
-
+
//
// Remember the name in case we have to modify the name
// value in the ea.
@@ -3058,6 +3069,8 @@ Return Value:
try_return( Status = STATUS_OBJECT_NAME_INVALID );
}
+ RtlCopyUnicodeString(&NewNameCopy,&NewName);
+
} else {
//
@@ -3083,6 +3096,9 @@ Return Value:
//
NewName = *((PUNICODE_STRING)&TargetFileObject->FileName);
+
+ RtlCopyUnicodeString(&NewNameCopy,&NewName);
+
}
//
@@ -3192,13 +3208,13 @@ Return Value:
if ((NewOemName.Length == 0) ||
(FatEvaluateNameCase( IrpContext,
- &NewName,
+ &NewNameCopy,
&AllLowerComponent,
&AllLowerExtension,
&CreateLfn ),
CreateLfn)) {
- DirentsRequired = FAT_LFN_DIRENTS_NEEDED(&NewName) + 1;
+ DirentsRequired = FAT_LFN_DIRENTS_NEEDED(&NewNameCopy) + 1;
} else {
@@ -3221,6 +3237,8 @@ Return Value:
//
DirentsRequired = 1;
+
+
}
}
@@ -3417,6 +3435,7 @@ Return Value:
ExFreePool( UnicodeBuffer );
FatUnpinBcb( IrpContext, TargetDirentBcb );
+
}
}
@@ -3521,7 +3540,7 @@ Return Value:
FatSelectNames( IrpContext,
TargetDcb,
&NewOemName,
- &NewName,
+ &NewNameCopy,
&NewOemName,
(HaveTunneledInformation ? &UniTunneledShortName : NULL),
&AllLowerComponent,
@@ -3531,7 +3550,7 @@ Return Value:
if (!CreateLfn && UsingTunneledLfn) {
CreateLfn = TRUE;
- NewName = UniTunneledLongName;
+ RtlCopyUnicodeString( &NewNameCopy, &UniTunneledLongName );
//
// Short names are always upcase if an LFN exists
@@ -3610,7 +3629,7 @@ Return Value:
&NewOemName,
AllLowerComponent,
AllLowerExtension,
- CreateLfn ? &NewName : NULL,
+ CreateLfn ? &NewNameCopy : NULL,
Dirent.Attributes,
FALSE,
(HaveTunneledInformation ? &TunneledCreationTime : NULL) );
@@ -4169,7 +4188,7 @@ Return Value:
if (NewAllocationSize+HeaderSize > Fcb->Header.AllocationSize.LowPart) {
- FatAddFileAllocation( IrpContext, Fcb, FileObject, NewAllocationSize);
+ FatAddFileAllocation( IrpContext, Fcb, FileObject, NewAllocationSize+HeaderSize);
} else {
@@ -4178,7 +4197,21 @@ Return Value:
// paging IO.
//
- if ( Fcb->Header.FileSize.LowPart > NewAllocationSize ) {
+ if ( Fcb->Header.FileSize.LowPart > NewAllocationSize+HeaderSize ) {
+
+ //
+ // The way Sections for DataScan are created and used, an AV's
+ // memory-mapping can come into being after we check it's safe
+ // to truncate a file while continuing to hold the file here.
+ // This leads to data corruption because Purge eventually fails
+ // (during call to Cc to set file sizes) and stale data continues
+ // to live in the cache/memory.
+ //
+
+ if (Fcb->PurgeFailureModeEnableCount != 0) {
+
+ try_return( Status = STATUS_PURGE_FAILED );
+ }
//
// Before we actually truncate, check to see if the purge
@@ -4222,7 +4255,7 @@ Return Value:
// Now that File Size is down, actually do the truncate.
//
- FatTruncateFileAllocation( IrpContext, Fcb, NewAllocationSize, FALSE );
+ FatTruncateFileAllocation( IrpContext, Fcb, NewAllocationSize+HeaderSize );
//
// Now check if we needed to decrease the file size accordingly.
@@ -4559,6 +4592,20 @@ Return Value:
if ( NewFileSize < Fcb->Header.FileSize.LowPart ) {
//
+ // The way Sections for DataScan are created and used, an AV's
+ // memory-mapping can come into being after we check it's safe
+ // to truncate a file while continuing to hold the file here.
+ // This leads to data corruption because Purge eventually fails
+ // (during call to Cc to set file sizes) and stale data continues
+ // to live in the cache/memory.
+ //
+
+ if (Fcb->PurgeFailureModeEnableCount != 0) {
+
+ try_return( Status = STATUS_PURGE_FAILED );
+ }
+
+ //
// Before we actually truncate, check to see if the purge
// is going to fail.
//
@@ -5008,3 +5055,102 @@ FatRenameEAs (
return;
}
+_Requires_lock_held_(_Global_critical_region_)
+VOID
+FatDeleteFile (
+ IN PIRP_CONTEXT IrpContext,
+ IN PDCB TargetDcb,
+ IN ULONG LfnOffset,
+ IN ULONG DirentOffset,
+ IN PDIRENT Dirent,
+ IN PUNICODE_STRING Lfn
+ )
+{
+ PFCB Fcb;
+ PLIST_ENTRY Links;
+
+ PAGED_CODE();
+
+ //
+ // We can do the replace by removing the other Fcb(s) from
+ // the prefix table.
+ //
+
+ for (Links = TargetDcb->Specific.Dcb.ParentDcbQueue.Flink;
+ Links != &TargetDcb->Specific.Dcb.ParentDcbQueue;
+ Links = Links->Flink) {
+
+ Fcb = CONTAINING_RECORD( Links, FCB, ParentDcbLinks );
+
+ if (FlagOn(Fcb->FcbState, FCB_STATE_NAMES_IN_SPLAY_TREE) &&
+ (Fcb->DirentOffsetWithinDirectory == DirentOffset)) {
+
+ NT_ASSERT( NodeType(Fcb) == FAT_NTC_FCB );
+ NT_ASSERT( Fcb->LfnOffsetWithinDirectory == LfnOffset );
+
+ if ( Fcb->UncleanCount != 0 ) {
+
+#pragma prefast( suppress:28159, "things are seriously wrong if we get here" )
+ FatBugCheck(0,0,0);
+
+ } else {
+
+ PERESOURCE Resource;
+
+ //
+ // Make this fcb "appear" deleted, synchronizing with
+ // paging IO.
+ //
+
+ FatRemoveNames( IrpContext, Fcb );
+
+ Resource = Fcb->Header.PagingIoResource;
+
+ (VOID)ExAcquireResourceExclusiveLite( Resource, TRUE );
+
+ SetFlag(Fcb->FcbState, FCB_STATE_DELETE_ON_CLOSE);
+
+ Fcb->ValidDataToDisk = 0;
+ Fcb->Header.FileSize.QuadPart =
+ Fcb->Header.ValidDataLength.QuadPart = 0;
+
+ Fcb->FirstClusterOfFile = 0;
+
+ ExReleaseResourceLite( Resource );
+ }
+ }
+ }
+
+ //
+ // The file is not currently opened so we can delete the file
+ // that is being overwritten. To do the operation we dummy
+ // up an fcb, truncate allocation, delete the fcb, and delete
+ // the dirent.
+ //
+
+ Fcb = FatCreateFcb( IrpContext,
+ TargetDcb->Vcb,
+ TargetDcb,
+ LfnOffset,
+ DirentOffset,
+ Dirent,
+ Lfn,
+ NULL,
+ FALSE,
+ FALSE );
+
+ Fcb->Header.FileSize.LowPart = 0;
+
+ try {
+
+ FatTruncateFileAllocation( IrpContext, Fcb, 0 );
+
+ FatDeleteDirent( IrpContext, Fcb, NULL, TRUE );
+
+ } finally {
+
+ FatDeleteFcb( IrpContext, &Fcb );
+ }
+}
+
+
diff --git a/filesys/fastfat/filobsup.c b/filesys/fastfat/filobsup.c
index 2b492f6a..2403da1e 100644
--- a/filesys/fastfat/filobsup.c
+++ b/filesys/fastfat/filobsup.c
@@ -163,7 +163,6 @@ Return Value:
NT_ASSERT((Ccb == NULL) || (NodeType(Ccb) == FAT_NTC_CCB));
-
//
// And return to our caller
//
@@ -292,21 +291,30 @@ Return Value:
*FcbOrDcb = FsContext;
*Vcb = (*FcbOrDcb)->Vcb;
-
- if (*Ccb == NULL ) {
- TypeOfOpen = EaFile;
- DebugTrace(0, Dbg, "Referencing EA file: %wZ\n", &(*FcbOrDcb)->FullFileName);
+ if (*Ccb != NULL ) {
+
+ TypeOfOpen = UserFileOpen;
+ DebugTrace(0, Dbg, "Referencing file: %wZ\n", &(*FcbOrDcb)->FullFileName);
+
} else {
- if (((ULONG_PTR)*Ccb & 0x7) == 0x0) {
- TypeOfOpen = UserFileOpen;
- DebugTrace(0, Dbg, "Referencing file: %wZ\n", &(*FcbOrDcb)->FullFileName);
- }
+ //
+ // No Ccb means this is a special open.
+ //
- else {
-#pragma prefast( suppress:28159, "things are seriously wrong if we get here" )
+
+ if ( *FcbOrDcb == (*Vcb)->EaFcb ) {
+
+ TypeOfOpen = EaFile;
+ DebugTrace(0, Dbg, "Referencing EA file: %wZ\n", &(*FcbOrDcb)->FullFileName);
+
+ } else {
+
+#pragma prefast(suppress:28159, "things are seriously wrong if we get here")
FatBugCheck( NodeType(FsContext), 0, 0 );
+
}
+
}
break;
diff --git a/filesys/fastfat/flush.c b/filesys/fastfat/flush.c
index f551c118..82a7feee 100644
--- a/filesys/fastfat/flush.c
+++ b/filesys/fastfat/flush.c
@@ -557,6 +557,8 @@ Return Value:
BOOLEAN ClearWriteThroughOnExit = FALSE;
BOOLEAN ClearWaitOnExit = FALSE;
+ ULONG CorrectedFileSize = 0;
+
PAGED_CODE();
NT_ASSERT( FatVcbAcquiredExclusive(IrpContext, Dcb->Vcb) );
@@ -642,11 +644,13 @@ Return Value:
//
if ( FlagOn(Fcb->FcbState, FCB_STATE_TRUNCATE_ON_CLOSE) ) {
-
+
+
FatTruncateFileAllocation( IrpContext,
Fcb,
- Fcb->Header.FileSize.LowPart,
- FALSE );
+ Fcb->Header.FileSize.LowPart );
+
+
}
//
@@ -662,13 +666,18 @@ Return Value:
FALSE,
&Dirent,
&DirentBcb );
-
- if (Dirent->FileSize != Fcb->Header.FileSize.LowPart) {
-
- Dirent->FileSize = Fcb->Header.FileSize.LowPart;
- }
+ CorrectedFileSize = Fcb->Header.FileSize.LowPart;
+
+
+ if (Dirent->FileSize != CorrectedFileSize) {
+
+ Dirent->FileSize = CorrectedFileSize;
+
+
+ }
+
//
// We must unpin the Bcb before the flush since we recursively tear up
// the tree if Mm decides that the data section is no longer referenced
diff --git a/filesys/fastfat/fsctrl.c b/filesys/fastfat/fsctrl.c
index 13ef8622..d6bf369b 100644
--- a/filesys/fastfat/fsctrl.c
+++ b/filesys/fastfat/fsctrl.c
@@ -892,7 +892,7 @@ Return Value:
{
PIO_STACK_LOCATION IrpSp = IoGetCurrentIrpStackLocation( IrpContext->OriginatingIrp );
- NTSTATUS Status;
+ NTSTATUS Status = STATUS_INVALID_PARAMETER;
PBCB BootBcb;
PPACKED_BOOT_SECTOR BootSector = NULL;
@@ -915,7 +915,7 @@ Return Value:
PLIST_ENTRY Links;
- IO_STATUS_BLOCK Iosb;
+ IO_STATUS_BLOCK Iosb = {0};
ULONG ChangeCount = 0;
DISK_GEOMETRY Geometry;
@@ -923,6 +923,8 @@ Return Value:
PARTITION_INFORMATION_EX PartitionInformation;
NTSTATUS StatusPartInfo;
+ GUID VolumeGuid = {0};
+
PAGED_CODE();
@@ -933,43 +935,50 @@ Return Value:
NT_ASSERT( FlagOn(IrpContext->Flags, IRP_CONTEXT_FLAG_WAIT) );
NT_ASSERT( FatDeviceIsFatFsdo( FsDeviceObject));
-
//
- // Verify that there is a disk here and pick up the change count.
+ // Only send down IOCTL_DISK_CHECK_VERIFY if it is removable media.
//
- Status = FatPerformDevIoCtrl( IrpContext,
- IOCTL_DISK_CHECK_VERIFY,
- TargetDeviceObject,
- NULL,
- 0,
- &ChangeCount,
- sizeof(ULONG),
- FALSE,
- TRUE,
- &Iosb );
-
- if (!NT_SUCCESS( Status )) {
+ if (FlagOn(TargetDeviceObject->Characteristics, FILE_REMOVABLE_MEDIA)) {
//
- // If we will allow a raw mount then avoid sending the popup.
- //
- // Only send this on "true" disk devices to handle the accidental
- // legacy of FAT. No other FS will throw a harderror on empty
- // drives.
- //
- // Cmd should really handle this per 9x.
+ // Verify that there is a disk here and pick up the change count.
//
- if (!FlagOn( IrpSp->Flags, SL_ALLOW_RAW_MOUNT ) &&
- Vpb->RealDevice->DeviceType == FILE_DEVICE_DISK) {
+ Status = FatPerformDevIoCtrl( IrpContext,
+ IOCTL_DISK_CHECK_VERIFY,
+ TargetDeviceObject,
+ NULL,
+ 0,
+ &ChangeCount,
+ sizeof(ULONG),
+ FALSE,
+ TRUE,
+ &Iosb );
- FatNormalizeAndRaiseStatus( IrpContext, Status );
- }
+ if (!NT_SUCCESS( Status )) {
- return Status;
- }
+ //
+ // If we will allow a raw mount then avoid sending the popup.
+ //
+ // Only send this on "true" disk devices to handle the accidental
+ // legacy of FAT. No other FS will throw a harderror on empty
+ // drives.
+ //
+ // Cmd should really handle this per 9x.
+ //
+
+ if (!FlagOn( IrpSp->Flags, SL_ALLOW_RAW_MOUNT ) &&
+ Vpb->RealDevice->DeviceType == FILE_DEVICE_DISK) {
+
+ FatNormalizeAndRaiseStatus( IrpContext, Status );
+ }
+ return Status;
+ }
+
+ }
+
if (Iosb.Information != sizeof(ULONG)) {
//
@@ -1200,6 +1209,33 @@ Return Value:
try_return( Status = STATUS_UNRECOGNIZED_VOLUME );
}
+ //
+ // Initialize the volume guid.
+ //
+
+ if (NT_SUCCESS( IoVolumeDeviceToGuid( Vcb->TargetDeviceObject, &VolumeGuid ))) {
+
+
+ //
+ // Stash a copy away in the VCB.
+ //
+
+ RtlCopyMemory( &Vcb->VolumeGuid, &VolumeGuid, sizeof(GUID));
+
+ }
+
+
+ //
+ // Stash away a copy of the volume GUID path in our VCB.
+ //
+
+ if (Vcb->VolumeGuidPath.Buffer) {
+ ExFreePool( Vcb->VolumeGuidPath.Buffer );
+ Vcb->VolumeGuidPath.Buffer = NULL;
+ Vcb->VolumeGuidPath.Length = Vcb->VolumeGuidPath.MaximumLength = 0;
+ }
+
+ IoVolumeDeviceToGuidPath( Vcb->TargetDeviceObject, &Vcb->VolumeGuidPath );
//
// Unpack the BPB. We used to do some sanity checking of the FATs at
@@ -1346,7 +1382,19 @@ Return Value:
// enough of the Vcb to pull this off.
//
- FatMarkVolume( IrpContext, Vcb, VolumeDirty );
+ FatCheckDirtyBit( IrpContext,
+ Vcb );
+
+ //
+ // Set the dirty bit if it is not set already
+ //
+
+ if ( !FlagOn(Vcb->VcbState, VCB_STATE_FLAG_MOUNTED_DIRTY)) {
+
+ SetFlag( Vcb->VcbState, VCB_STATE_FLAG_MOUNT_IN_PROGRESS );
+ FatMarkVolume( IrpContext, Vcb, VolumeDirty );
+ ClearFlag( Vcb->VcbState, VCB_STATE_FLAG_MOUNT_IN_PROGRESS );
+ }
//
// Now keep bailing out ...
@@ -1594,6 +1642,7 @@ Return Value:
0,
&TempDirent,
NULL,
+ NULL,
FALSE,
TRUE );
@@ -1841,7 +1890,7 @@ Return Value:
BOOLEAN LabelFound;
ULONG ChangeCount = 0;
- IO_STATUS_BLOCK Iosb;
+ IO_STATUS_BLOCK Iosb = {0};
PAGED_CODE();
@@ -1944,35 +1993,43 @@ Return Value:
}
//
- // Verify that there is a disk here and pick up the change count.
+ // Only send down IOCTL_DISK_CHECK_VERIFY if it is removable media.
//
-
- Status = FatPerformDevIoCtrl( IrpContext,
- IOCTL_DISK_CHECK_VERIFY,
- Vcb->TargetDeviceObject,
- NULL,
- 0,
- &ChangeCount,
- sizeof(ULONG),
- FALSE,
- TRUE,
- &Iosb );
-
- if (!NT_SUCCESS( Status )) {
+
+ if (FlagOn(Vcb->TargetDeviceObject->Characteristics, FILE_REMOVABLE_MEDIA)) {
//
- // If we will allow a raw mount then return WRONG_VOLUME to
- // allow the volume to be mounted by raw.
+ // Verify that there is a disk here and pick up the change count.
//
- if (AllowRawMount) {
+ Status = FatPerformDevIoCtrl( IrpContext,
+ IOCTL_DISK_CHECK_VERIFY,
+ Vcb->TargetDeviceObject,
+ NULL,
+ 0,
+ &ChangeCount,
+ sizeof(ULONG),
+ FALSE,
+ TRUE,
+ &Iosb );
- try_return( Status = STATUS_WRONG_VOLUME );
- }
+ if (!NT_SUCCESS( Status )) {
- FatNormalizeAndRaiseStatus( IrpContext, Status );
- }
+ //
+ // If we will allow a raw mount then return WRONG_VOLUME to
+ // allow the volume to be mounted by raw.
+ //
+
+ if (AllowRawMount) {
+
+ try_return( Status = STATUS_WRONG_VOLUME );
+ }
+ FatNormalizeAndRaiseStatus( IrpContext, Status );
+ }
+
+ }
+
if (Iosb.Information != sizeof(ULONG)) {
//
@@ -3919,7 +3976,7 @@ Return Value:
} else if (Irp->MdlAddress != NULL) {
- VolumeState = MmGetSystemAddressForMdlSafe( Irp->MdlAddress, LowPagePriority );
+ VolumeState = MmGetSystemAddressForMdlSafe( Irp->MdlAddress, LowPagePriority | MdlMappingNoExecute );
if (VolumeState == NULL) {
@@ -5538,9 +5595,11 @@ FatMoveFileNeedsWriteThrough (
PAGED_CODE();
if (NodeType(FcbOrDcb) == FAT_NTC_FCB) {
-
+
+
if (FcbOrDcb->Header.ValidDataLength.QuadPart == 0) {
-
+
+
ClearFlag( IrpContext->Flags, IRP_CONTEXT_FLAG_WRITE_THROUGH );
SetFlag( IrpContext->Flags, IRP_CONTEXT_FLAG_DISABLE_WRITE_THROUGH );
@@ -5811,6 +5870,7 @@ Return Value:
FatMoveFileNeedsWriteThrough(IrpContext, FcbOrDcb, OldWriteThroughFlags);
+
//
// Indicate we're getting to parents of this fcb by their child, and that
// this is a sufficient assertion of our ability to by synchronized
@@ -8001,6 +8061,8 @@ FatSetZeroOnDeallocate (
if ((TypeOfOpen != UserFileOpen) ||
(!IrpSp->FileObject->WriteAccess) ) {
+
+ FatCompleteRequest( IrpContext, Irp, STATUS_ACCESS_DENIED );
return STATUS_ACCESS_DENIED;
}
diff --git a/filesys/fastfat/namesup.c b/filesys/fastfat/namesup.c
index 662e4b4d..159b1c3d 100644
--- a/filesys/fastfat/namesup.c
+++ b/filesys/fastfat/namesup.c
@@ -27,6 +27,7 @@ Abstract:
#pragma alloc_text(PAGE, FatSelectNames)
#pragma alloc_text(PAGE, FatEvaluateNameCase)
#pragma alloc_text(PAGE, FatSpaceInName)
+#pragma alloc_text(PAGE, FatUnicodeRestoreShortNameCase)
#endif
@@ -1032,4 +1033,78 @@ Return Value:
return FALSE;
}
+VOID
+FatUnicodeRestoreShortNameCase(
+ IN PUNICODE_STRING ShortNameWithCase,
+ IN BOOLEAN LowerCase8,
+ IN BOOLEAN LowerCase3
+ )
+
+/*++
+
+Routine Description:
+
+ Given an 8.3 filename in a UNICODE_STRING, fix the case of the
+ name given the two 8do3 case flags.
+
+Arguments:
+
+ ShortNameWithCase - the UNICODE_STRING containing the short name.
+ LowerCase8, LowerCase3 - the flag indicating whether to downcase the 8dot3 name component.
+
+Return Value:
+
+ None.
+
+--*/
+{
+ USHORT i;
+ UNICODE_STRING DownCaseSeg;
+
+ PAGED_CODE();
+
+ NT_ASSERT( ShortNameWithCase->Length <= 24 );
+
+ //
+ // Have to repair the case of the short name
+ //
+
+ for (i = 0; i < (ShortNameWithCase->Length/sizeof(WCHAR)) &&
+ ShortNameWithCase->Buffer[i] != L'.'; i++);
+
+ //
+ // Now pointing at the '.', or otherwise the end of name component
+ //
+
+ if (LowerCase8) {
+
+ DownCaseSeg.Buffer = ShortNameWithCase->Buffer;
+ DownCaseSeg.MaximumLength = DownCaseSeg.Length = i*sizeof(WCHAR);
+
+ RtlDowncaseUnicodeString(&DownCaseSeg, &DownCaseSeg, FALSE);
+ }
+
+ i++;
+
+ //
+ // Now pointing at first wchar of the extension.
+ //
+
+ if (LowerCase3) {
+
+ //
+ // It is not neccesarily the case that we can rely on the flag
+ // indicating that we really have an extension.
+ //
+
+ if ((i*sizeof(WCHAR)) < ShortNameWithCase->Length) {
+ DownCaseSeg.Buffer = &ShortNameWithCase->Buffer[i];
+ DownCaseSeg.MaximumLength = DownCaseSeg.Length = ShortNameWithCase->Length - i*sizeof(WCHAR);
+
+ RtlDowncaseUnicodeString(&DownCaseSeg, &DownCaseSeg, FALSE);
+ }
+ }
+
+}
+
diff --git a/filesys/fastfat/read.c b/filesys/fastfat/read.c
index 0f3d3e55..e6dd18cb 100644
--- a/filesys/fastfat/read.c
+++ b/filesys/fastfat/read.c
@@ -719,6 +719,7 @@ Return Value:
IrpContext->FatIoContext->Wait.Async.FileObject = FileObject;
}
+
}
diff --git a/filesys/fastfat/strucsup.c b/filesys/fastfat/strucsup.c
index 7593278d..57be9a2b 100644
--- a/filesys/fastfat/strucsup.c
+++ b/filesys/fastfat/strucsup.c
@@ -574,6 +574,7 @@ Return Value:
FsRtlSetupAdvancedHeader( &Vcb->VolumeFileHeader,
&Vcb->AdvancedFcbHeaderMutex );
+
//
// With the Vcb now set up, set the IrpContext Vcb field.
//
@@ -796,6 +797,11 @@ Return Value:
ExFreePool( Vcb->Vpb );
}
+ if (Vcb->VolumeGuidPath.Buffer) {
+ ExFreePool( Vcb->VolumeGuidPath.Buffer );
+ Vcb->VolumeGuidPath.Buffer = NULL;
+ }
+
//
// Remove this record from the global list of all Vcb records.
// Note that the global lock must already be held when calling
@@ -1211,6 +1217,7 @@ FatCreateFcb (
IN ULONG DirentOffsetWithinDirectory,
IN PDIRENT Dirent,
IN PUNICODE_STRING Lfn OPTIONAL,
+ IN PUNICODE_STRING OrigLfn OPTIONAL,
IN BOOLEAN IsPagingFile,
IN BOOLEAN SingleResource
)
@@ -1269,6 +1276,8 @@ Return Value:
PAGED_CODE();
+ UNREFERENCED_PARAMETER( OrigLfn );
+
DebugTrace(+1, Dbg, "FatCreateFcb\n", 0);
try {
diff --git a/filesys/fastfat/verfysup.c b/filesys/fastfat/verfysup.c
index 5336bdf1..86fcacdf 100644
--- a/filesys/fastfat/verfysup.c
+++ b/filesys/fastfat/verfysup.c
@@ -284,19 +284,15 @@ Return Value:
--*/
{
- ULONG ChangeCount = 0;
BOOLEAN DevMarkedForVerify;
- NTSTATUS Status = STATUS_SUCCESS;
- IO_STATUS_BLOCK Iosb;
PAGED_CODE();
DebugTrace(+1, Dbg, "FatVerifyVcb, Vcb = %p\n", Vcb );
//
- // If the media is removable and the verify volume flag in the
- // device object is not set then we want to ping the device
- // to see if it needs to be verified.
+ // If the verify volume flag in the device object is set
+ // this means the media has potentially changed.
//
// Note that we only force this ping for create operations.
// For others we take a sporting chance. If in the end we
@@ -304,65 +300,7 @@ Return Value:
//
DevMarkedForVerify = BooleanFlagOn(Vcb->Vpb->RealDevice->Flags, DO_VERIFY_VOLUME);
-
- if (FlagOn(Vcb->VcbState, VCB_STATE_FLAG_REMOVABLE_MEDIA)) {
-
- Status = FatPerformDevIoCtrl( IrpContext,
- ( Vcb->Vpb->RealDevice->DeviceType == FILE_DEVICE_CD_ROM ?
- IOCTL_CDROM_CHECK_VERIFY :
- IOCTL_DISK_CHECK_VERIFY ),
- Vcb->TargetDeviceObject,
- NULL,
- 0,
- &ChangeCount,
- sizeof(ULONG),
- FALSE,
- TRUE,
- &Iosb );
-
- if (Iosb.Information != sizeof(ULONG)) {
-
- //
- // Be safe about the count in case the driver didn't fill it in
- //
-
- ChangeCount = 0;
- }
-
- //
- // There are four cases when we want to do a verify. These are the
- // first three.
- //
- // 1. We are mounted, and the device has become empty
- // 2. The device has returned verify required (=> DO_VERIFY_VOL flag is
- // set, but could be due to hardware condition)
- // 3. Media change count doesn't match the one in the Vcb
- //
-
- if (((Vcb->VcbCondition == VcbGood) &&
- FatIsRawDevice( IrpContext, Status ))
- ||
- (Status == STATUS_VERIFY_REQUIRED)
- ||
- (NT_SUCCESS(Status) &&
- (Vcb->ChangeCount != ChangeCount))) {
-
- //
- // If we are currently the volume on the device then it is our
- // responsibility to set the verify flag. If we're not on the device,
- // then we shouldn't touch the flag.
- //
-
- if (!FlagOn( Vcb->VcbState, VCB_STATE_VPB_NOT_ON_DEVICE) &&
- !DevMarkedForVerify) {
-
- DevMarkedForVerify = FatMarkDevForVerifyIfVcbMounted( Vcb);
- }
- }
- }
-
- //
- // This is the 4th verify case.
+
//
// We ALWAYS force CREATE requests on unmounted volumes through the
// verify path. These requests could have been in limbo between
@@ -393,16 +331,14 @@ Return Value:
// Raise any error condition otherwise.
//
- if (!NT_SUCCESS( Status ) || DevMarkedForVerify) {
+ if (DevMarkedForVerify) {
DebugTrace(0, Dbg, "The Vcb needs to be verified\n", 0);
IoSetHardErrorOrVerifyDevice( IrpContext->OriginatingIrp,
Vcb->Vpb->RealDevice );
- FatNormalizeAndRaiseStatus( IrpContext, DevMarkedForVerify
- ? STATUS_VERIFY_REQUIRED
- : Status );
+ FatNormalizeAndRaiseStatus( IrpContext, STATUS_VERIFY_REQUIRED );
}
//
diff --git a/filesys/fastfat/write.c b/filesys/fastfat/write.c
index 84aefe83..7668fe08 100644
--- a/filesys/fastfat/write.c
+++ b/filesys/fastfat/write.c
@@ -482,6 +482,7 @@ Return Value:
IrpContext->FatIoContext->Wait.Async.FileObject = FileObject;
}
+
}
//
@@ -863,7 +864,7 @@ Return Value:
FatNormalizeAndRaiseStatus( IrpContext, Status );
}
- DebugTrace(-1, Dbg, "CommonRead -> %08lx\n", Status );
+ DebugTrace(-1, Dbg, "CommonWrite -> %08lx\n", Status );
FatCompleteRequest( IrpContext, Irp, Status );
return Status;
@@ -2065,6 +2066,8 @@ Return Value:
ValidDataToCheck = ValidDataLength;
}
+
+
//
// HANDLE THE NON-CACHED CASE
@@ -2803,8 +2806,9 @@ Return Value:
CcSetFileSizes( FileObject, (PCC_FILE_SIZES)&FcbOrDcb->Header.AllocationSize );
}
}
+
}
-
+
//
// Note that we have to unpin repinned Bcbs here after the above
// work, but if we are going to post the request, we must do this
diff --git a/filesys/miniFilter/MetadataManager/MetadataManager.sln b/filesys/miniFilter/MetadataManager/MetadataManager.sln
index ff256398..9d47fdd5 100644
--- a/filesys/miniFilter/MetadataManager/MetadataManager.sln
+++ b/filesys/miniFilter/MetadataManager/MetadataManager.sln
@@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0
MinimumVisualStudioVersion = 12.0
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fmm", "fmm.vcxproj", "{D0851590-5695-47F6-A7AA-7AF737527A14}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fmm", "fmm.vcxproj", "{D3B738B6-46C9-4572-A81F-C47F95D39A7B}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -13,14 +13,14 @@ Global
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {D0851590-5695-47F6-A7AA-7AF737527A14}.Debug|Win32.ActiveCfg = Debug|Win32
- {D0851590-5695-47F6-A7AA-7AF737527A14}.Debug|Win32.Build.0 = Debug|Win32
- {D0851590-5695-47F6-A7AA-7AF737527A14}.Release|Win32.ActiveCfg = Release|Win32
- {D0851590-5695-47F6-A7AA-7AF737527A14}.Release|Win32.Build.0 = Release|Win32
- {D0851590-5695-47F6-A7AA-7AF737527A14}.Debug|x64.ActiveCfg = Debug|x64
- {D0851590-5695-47F6-A7AA-7AF737527A14}.Debug|x64.Build.0 = Debug|x64
- {D0851590-5695-47F6-A7AA-7AF737527A14}.Release|x64.ActiveCfg = Release|x64
- {D0851590-5695-47F6-A7AA-7AF737527A14}.Release|x64.Build.0 = Release|x64
+ {D3B738B6-46C9-4572-A81F-C47F95D39A7B}.Debug|Win32.ActiveCfg = Debug|Win32
+ {D3B738B6-46C9-4572-A81F-C47F95D39A7B}.Debug|Win32.Build.0 = Debug|Win32
+ {D3B738B6-46C9-4572-A81F-C47F95D39A7B}.Release|Win32.ActiveCfg = Release|Win32
+ {D3B738B6-46C9-4572-A81F-C47F95D39A7B}.Release|Win32.Build.0 = Release|Win32
+ {D3B738B6-46C9-4572-A81F-C47F95D39A7B}.Debug|x64.ActiveCfg = Debug|x64
+ {D3B738B6-46C9-4572-A81F-C47F95D39A7B}.Debug|x64.Build.0 = Debug|x64
+ {D3B738B6-46C9-4572-A81F-C47F95D39A7B}.Release|x64.ActiveCfg = Release|x64
+ {D3B738B6-46C9-4572-A81F-C47F95D39A7B}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/filesys/miniFilter/MetadataManager/fmm.vcxproj b/filesys/miniFilter/MetadataManager/fmm.vcxproj
index e685a5ba..2a9e9976 100644
--- a/filesys/miniFilter/MetadataManager/fmm.vcxproj
+++ b/filesys/miniFilter/MetadataManager/fmm.vcxproj
@@ -19,11 +19,11 @@
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
- <ProjectGuid>{D0851590-5695-47F6-A7AA-7AF737527A14}</ProjectGuid>
+ <ProjectGuid>{D3B738B6-46C9-4572-A81F-C47F95D39A7B}</ProjectGuid>
<RootNamespace>$(MSBuildProjectName)</RootNamespace>
<Configuration Condition="'$(Configuration)' == ''">Debug</Configuration>
<Platform Condition="'$(Platform)' == ''">Win32</Platform>
- <SampleGuid>{74268674-1799-41EE-9098-83ACA2C799CE}</SampleGuid>
+ <SampleGuid>{8C639D05-4938-4C61-BB91-F227CEE05488}</SampleGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
diff --git a/filesys/miniFilter/MetadataManager/fmm.vcxproj.Filters b/filesys/miniFilter/MetadataManager/fmm.vcxproj.Filters
index 3718963b..1e00dc24 100644
--- a/filesys/miniFilter/MetadataManager/fmm.vcxproj.Filters
+++ b/filesys/miniFilter/MetadataManager/fmm.vcxproj.Filters
@@ -3,19 +3,19 @@
<ItemGroup>
<Filter Include="Source Files">
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx;*</Extensions>
- <UniqueIdentifier>{187830FB-8908-439C-BF80-5C0780B32314}</UniqueIdentifier>
+ <UniqueIdentifier>{0A93E9D4-FBE0-4EA1-A37B-260D62601FC1}</UniqueIdentifier>
</Filter>
<Filter Include="Header Files">
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- <UniqueIdentifier>{B09D4328-8735-45A6-906F-EAB82EB9BABF}</UniqueIdentifier>
+ <UniqueIdentifier>{7191113D-8653-4BB1-B594-BAA28EAF597D}</UniqueIdentifier>
</Filter>
<Filter Include="Resource Files">
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms;man;xml</Extensions>
- <UniqueIdentifier>{66540091-6A2A-4CF6-A515-4EAD98842317}</UniqueIdentifier>
+ <UniqueIdentifier>{EC886653-C6A2-424B-B487-22270A881468}</UniqueIdentifier>
</Filter>
<Filter Include="Driver Files">
<Extensions>inf;inv;inx;mof;mc;</Extensions>
- <UniqueIdentifier>{EA31B3A1-9791-4836-B438-98109CD714F1}</UniqueIdentifier>
+ <UniqueIdentifier>{58409F05-3F9D-4C50-B028-7CA746D069FD}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
diff --git a/filesys/miniFilter/NameChanger/NameChanger.sln b/filesys/miniFilter/NameChanger/NameChanger.sln
index 01a02361..95037d38 100644
--- a/filesys/miniFilter/NameChanger/NameChanger.sln
+++ b/filesys/miniFilter/NameChanger/NameChanger.sln
@@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0
MinimumVisualStudioVersion = 12.0
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NameChanger", "NameChanger.vcxproj", "{FBF5C5B2-2918-4813-992E-41C3B17FB801}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NameChanger", "NameChanger.vcxproj", "{9170658B-BFBD-4CF4-A7D3-E39272CCF4E9}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -13,14 +13,14 @@ Global
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {FBF5C5B2-2918-4813-992E-41C3B17FB801}.Debug|Win32.ActiveCfg = Debug|Win32
- {FBF5C5B2-2918-4813-992E-41C3B17FB801}.Debug|Win32.Build.0 = Debug|Win32
- {FBF5C5B2-2918-4813-992E-41C3B17FB801}.Release|Win32.ActiveCfg = Release|Win32
- {FBF5C5B2-2918-4813-992E-41C3B17FB801}.Release|Win32.Build.0 = Release|Win32
- {FBF5C5B2-2918-4813-992E-41C3B17FB801}.Debug|x64.ActiveCfg = Debug|x64
- {FBF5C5B2-2918-4813-992E-41C3B17FB801}.Debug|x64.Build.0 = Debug|x64
- {FBF5C5B2-2918-4813-992E-41C3B17FB801}.Release|x64.ActiveCfg = Release|x64
- {FBF5C5B2-2918-4813-992E-41C3B17FB801}.Release|x64.Build.0 = Release|x64
+ {9170658B-BFBD-4CF4-A7D3-E39272CCF4E9}.Debug|Win32.ActiveCfg = Debug|Win32
+ {9170658B-BFBD-4CF4-A7D3-E39272CCF4E9}.Debug|Win32.Build.0 = Debug|Win32
+ {9170658B-BFBD-4CF4-A7D3-E39272CCF4E9}.Release|Win32.ActiveCfg = Release|Win32
+ {9170658B-BFBD-4CF4-A7D3-E39272CCF4E9}.Release|Win32.Build.0 = Release|Win32
+ {9170658B-BFBD-4CF4-A7D3-E39272CCF4E9}.Debug|x64.ActiveCfg = Debug|x64
+ {9170658B-BFBD-4CF4-A7D3-E39272CCF4E9}.Debug|x64.Build.0 = Debug|x64
+ {9170658B-BFBD-4CF4-A7D3-E39272CCF4E9}.Release|x64.ActiveCfg = Release|x64
+ {9170658B-BFBD-4CF4-A7D3-E39272CCF4E9}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/filesys/miniFilter/NameChanger/NameChanger.vcxproj b/filesys/miniFilter/NameChanger/NameChanger.vcxproj
index bd5aadb6..c176043f 100644
--- a/filesys/miniFilter/NameChanger/NameChanger.vcxproj
+++ b/filesys/miniFilter/NameChanger/NameChanger.vcxproj
@@ -19,11 +19,11 @@
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
- <ProjectGuid>{FBF5C5B2-2918-4813-992E-41C3B17FB801}</ProjectGuid>
+ <ProjectGuid>{9170658B-BFBD-4CF4-A7D3-E39272CCF4E9}</ProjectGuid>
<RootNamespace>$(MSBuildProjectName)</RootNamespace>
<Configuration Condition="'$(Configuration)' == ''">Debug</Configuration>
<Platform Condition="'$(Platform)' == ''">Win32</Platform>
- <SampleGuid>{F3F4D763-7A72-41B7-AE5A-14B6EB1D1A29}</SampleGuid>
+ <SampleGuid>{E7064DAD-7446-4C2A-ADFE-FF3CFB6CC337}</SampleGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
diff --git a/filesys/miniFilter/NameChanger/NameChanger.vcxproj.Filters b/filesys/miniFilter/NameChanger/NameChanger.vcxproj.Filters
index 5693affd..a0754391 100644
--- a/filesys/miniFilter/NameChanger/NameChanger.vcxproj.Filters
+++ b/filesys/miniFilter/NameChanger/NameChanger.vcxproj.Filters
@@ -3,19 +3,19 @@
<ItemGroup>
<Filter Include="Source Files">
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx;*</Extensions>
- <UniqueIdentifier>{CAC6310D-A1D1-44F5-813E-D0FF05C58115}</UniqueIdentifier>
+ <UniqueIdentifier>{80A81098-867B-4DCF-B185-F738BF778EB4}</UniqueIdentifier>
</Filter>
<Filter Include="Header Files">
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- <UniqueIdentifier>{97A530F5-1AB7-4A5D-8906-59E1F3E1AFCF}</UniqueIdentifier>
+ <UniqueIdentifier>{3E4788C2-6557-4D5E-977C-85B2B5665D21}</UniqueIdentifier>
</Filter>
<Filter Include="Resource Files">
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms;man;xml</Extensions>
- <UniqueIdentifier>{636CD1E3-EA03-4FE7-B9BE-CB9F3684FC25}</UniqueIdentifier>
+ <UniqueIdentifier>{56F52A35-468E-4797-B49C-417B8A60BC7E}</UniqueIdentifier>
</Filter>
<Filter Include="Driver Files">
<Extensions>inf;inv;inx;mof;mc;</Extensions>
- <UniqueIdentifier>{DA8408AD-EBC7-41EB-8A65-4ED4BB457530}</UniqueIdentifier>
+ <UniqueIdentifier>{4FC80286-9149-41E4-B00F-E667BC171CCD}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
diff --git a/filesys/miniFilter/NameChanger/nc.c b/filesys/miniFilter/NameChanger/nc.c
index 05431407..f28da557 100644
--- a/filesys/miniFilter/NameChanger/nc.c
+++ b/filesys/miniFilter/NameChanger/nc.c
@@ -1600,8 +1600,10 @@ Routine Description:
Currently we munge:
FileDispositionInformation
+ FileDispositionInformationEx
FileLinkInformation
FileRenameInformation
+ FileRenameInformationEx
FileShortNameInformation
Arguments:
@@ -1629,6 +1631,7 @@ Return Value:
switch( Data->Iopb->Parameters.SetFileInformation.FileInformationClass ) {
case FileDispositionInformation:
+ case FileDispositionInformationEx:
result = NcPreSetDisposition( Data,
FltObjects,
@@ -1645,6 +1648,7 @@ Return Value:
break;
case FileRenameInformation:
+ case FileRenameInformationEx:
result = NcPreRename( Data,
FltObjects,
diff --git a/filesys/miniFilter/NameChanger/ncfileinfo.c b/filesys/miniFilter/NameChanger/ncfileinfo.c
index ea5708e6..13314126 100644
--- a/filesys/miniFilter/NameChanger/ncfileinfo.c
+++ b/filesys/miniFilter/NameChanger/ncfileinfo.c
@@ -1224,7 +1224,8 @@ Return Value:
PNC_MAPPING Mapping;
NC_PATH_OVERLAP RealOverlap;
NC_PATH_OVERLAP UserOverlap;
- PFILE_DISPOSITION_INFORMATION Disposition;
+ FILE_INFORMATION_CLASS fileInformationClass;
+ BOOLEAN IsDeleteFile;
BOOLEAN IgnoreCase = !BooleanFlagOn( FltObjects->FileObject->Flags,
FO_OPENED_CASE_SENSITIVE );
@@ -1234,14 +1235,19 @@ Return Value:
FLT_ASSERT( IoGetTopLevelIrp() == NULL );
+ fileInformationClass = Data->Iopb->Parameters.SetFileInformation.FileInformationClass;
+
//
// See if they are setting the delete disposition to false.
// If they are we can passthrough. We don't care if people
// want to mark the mapping as "don't delete".
//
- Disposition = Data->Iopb->Parameters.SetFileInformation.InfoBuffer;
- if (Disposition->DeleteFile == FALSE) {
+ IsDeleteFile = (fileInformationClass == FileDispositionInformationEx) ?
+ BooleanFlagOn( ((PFILE_DISPOSITION_INFORMATION_EX)Data->Iopb->Parameters.SetFileInformation.InfoBuffer)->Flags, FILE_DISPOSITION_DELETE ) :
+ ((PFILE_DISPOSITION_INFORMATION)Data->Iopb->Parameters.SetFileInformation.InfoBuffer)->DeleteFile;
+
+ if (IsDeleteFile == FALSE) {
Status = STATUS_SUCCESS;
goto NcPreSetDispositionCleanup;
@@ -1700,13 +1706,24 @@ Return Value:
BOOLEAN IgnoreCase = !BooleanFlagOn( FltObjects->FileObject->Flags,
FO_OPENED_CASE_SENSITIVE );
+ FILE_INFORMATION_CLASS fileInformationClass;
+ BOOLEAN ReplaceIfExists;
+
+ fileInformationClass = Data->Iopb->Parameters.SetFileInformation.FileInformationClass;
+ ReplaceIfExists = (fileInformationClass == FileRenameInformationEx) ?
+ BooleanFlagOn( RenameInfo->Flags, FILE_RENAME_REPLACE_IF_EXISTS ) :
+ RenameInfo->ReplaceIfExists;
+
+
PAGED_CODE();
UNREFERENCED_PARAMETER( CompletionContext );
FLT_ASSERT( IoGetTopLevelIrp() == NULL );
-
+ FLT_ASSERT( (fileInformationClass == FileRenameInformation) ||
+ (fileInformationClass == FileRenameInformationEx) );
+
//
// Get Instance Context
//
@@ -1837,7 +1854,7 @@ Return Value:
goto NcPreRenameCleanup;
} else if ((TargetRealOverlap.Ancestor || TargetUserOverlap.Ancestor) &&
- RenameInfo->ReplaceIfExists) {
+ ReplaceIfExists) {
Status = STATUS_ACCESS_DENIED;
ReturnValue = FLT_PREOP_COMPLETE;
@@ -1894,7 +1911,7 @@ Return Value:
// Copy user rename parameters.
//
- MungedRenameInfo->ReplaceIfExists = RenameInfo->ReplaceIfExists;
+ MungedRenameInfo->Flags = RenameInfo->Flags;
MungedRenameInfo->RootDirectory = NULL;
MungedRenameInfo->FileNameLength = MungedTargetName.Length;
RtlCopyMemory( &MungedRenameInfo->FileName,
@@ -1912,7 +1929,7 @@ Return Value:
FltObjects->FileObject,
MungedRenameInfo,
MungedRenameLength,
- FileRenameInformation );
+ fileInformationClass );
//
// Complete the IO.
diff --git a/filesys/miniFilter/avscan/avscan.sln b/filesys/miniFilter/avscan/avscan.sln
index ab13b900..f529b3b1 100644
--- a/filesys/miniFilter/avscan/avscan.sln
+++ b/filesys/miniFilter/avscan/avscan.sln
@@ -3,13 +3,13 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0
MinimumVisualStudioVersion = 12.0
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Filter", "Filter", "{752EF0BD-A05B-4CFE-93E1-1F34EA041029}"
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Filter", "Filter", "{E30BA5CA-ED36-41A6-A7B8-3ABF2389B914}"
EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "User", "User", "{924B6153-4A9C-4B7A-8402-71C7D157FE10}"
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "User", "User", "{C6C13DF8-3C9B-43C3-B30B-474E7066C8D8}"
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "avscan", "filter\avscan.vcxproj", "{AB6754C7-D6E4-492F-84D1-31B3A5AE4C97}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "avscan", "filter\avscan.vcxproj", "{F8973BDD-E1CC-4FD5-B7E7-745274B005C4}"
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "avscan", "user\avscan.vcxproj", "{41E2DC8A-7DCA-4590-B9B9-466AC5EA85F3}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "avscan", "user\avscan.vcxproj", "{5E40E4EF-AC99-48D8-8297-037C80560B7D}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -19,28 +19,28 @@ Global
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {AB6754C7-D6E4-492F-84D1-31B3A5AE4C97}.Debug|Win32.ActiveCfg = Debug|Win32
- {AB6754C7-D6E4-492F-84D1-31B3A5AE4C97}.Debug|Win32.Build.0 = Debug|Win32
- {AB6754C7-D6E4-492F-84D1-31B3A5AE4C97}.Release|Win32.ActiveCfg = Release|Win32
- {AB6754C7-D6E4-492F-84D1-31B3A5AE4C97}.Release|Win32.Build.0 = Release|Win32
- {AB6754C7-D6E4-492F-84D1-31B3A5AE4C97}.Debug|x64.ActiveCfg = Debug|x64
- {AB6754C7-D6E4-492F-84D1-31B3A5AE4C97}.Debug|x64.Build.0 = Debug|x64
- {AB6754C7-D6E4-492F-84D1-31B3A5AE4C97}.Release|x64.ActiveCfg = Release|x64
- {AB6754C7-D6E4-492F-84D1-31B3A5AE4C97}.Release|x64.Build.0 = Release|x64
- {41E2DC8A-7DCA-4590-B9B9-466AC5EA85F3}.Debug|Win32.ActiveCfg = Debug|Win32
- {41E2DC8A-7DCA-4590-B9B9-466AC5EA85F3}.Debug|Win32.Build.0 = Debug|Win32
- {41E2DC8A-7DCA-4590-B9B9-466AC5EA85F3}.Release|Win32.ActiveCfg = Release|Win32
- {41E2DC8A-7DCA-4590-B9B9-466AC5EA85F3}.Release|Win32.Build.0 = Release|Win32
- {41E2DC8A-7DCA-4590-B9B9-466AC5EA85F3}.Debug|x64.ActiveCfg = Debug|x64
- {41E2DC8A-7DCA-4590-B9B9-466AC5EA85F3}.Debug|x64.Build.0 = Debug|x64
- {41E2DC8A-7DCA-4590-B9B9-466AC5EA85F3}.Release|x64.ActiveCfg = Release|x64
- {41E2DC8A-7DCA-4590-B9B9-466AC5EA85F3}.Release|x64.Build.0 = Release|x64
+ {F8973BDD-E1CC-4FD5-B7E7-745274B005C4}.Debug|Win32.ActiveCfg = Debug|Win32
+ {F8973BDD-E1CC-4FD5-B7E7-745274B005C4}.Debug|Win32.Build.0 = Debug|Win32
+ {F8973BDD-E1CC-4FD5-B7E7-745274B005C4}.Release|Win32.ActiveCfg = Release|Win32
+ {F8973BDD-E1CC-4FD5-B7E7-745274B005C4}.Release|Win32.Build.0 = Release|Win32
+ {F8973BDD-E1CC-4FD5-B7E7-745274B005C4}.Debug|x64.ActiveCfg = Debug|x64
+ {F8973BDD-E1CC-4FD5-B7E7-745274B005C4}.Debug|x64.Build.0 = Debug|x64
+ {F8973BDD-E1CC-4FD5-B7E7-745274B005C4}.Release|x64.ActiveCfg = Release|x64
+ {F8973BDD-E1CC-4FD5-B7E7-745274B005C4}.Release|x64.Build.0 = Release|x64
+ {5E40E4EF-AC99-48D8-8297-037C80560B7D}.Debug|Win32.ActiveCfg = Debug|Win32
+ {5E40E4EF-AC99-48D8-8297-037C80560B7D}.Debug|Win32.Build.0 = Debug|Win32
+ {5E40E4EF-AC99-48D8-8297-037C80560B7D}.Release|Win32.ActiveCfg = Release|Win32
+ {5E40E4EF-AC99-48D8-8297-037C80560B7D}.Release|Win32.Build.0 = Release|Win32
+ {5E40E4EF-AC99-48D8-8297-037C80560B7D}.Debug|x64.ActiveCfg = Debug|x64
+ {5E40E4EF-AC99-48D8-8297-037C80560B7D}.Debug|x64.Build.0 = Debug|x64
+ {5E40E4EF-AC99-48D8-8297-037C80560B7D}.Release|x64.ActiveCfg = Release|x64
+ {5E40E4EF-AC99-48D8-8297-037C80560B7D}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
- {AB6754C7-D6E4-492F-84D1-31B3A5AE4C97} = {752EF0BD-A05B-4CFE-93E1-1F34EA041029}
- {41E2DC8A-7DCA-4590-B9B9-466AC5EA85F3} = {924B6153-4A9C-4B7A-8402-71C7D157FE10}
+ {F8973BDD-E1CC-4FD5-B7E7-745274B005C4} = {E30BA5CA-ED36-41A6-A7B8-3ABF2389B914}
+ {5E40E4EF-AC99-48D8-8297-037C80560B7D} = {C6C13DF8-3C9B-43C3-B30B-474E7066C8D8}
EndGlobalSection
EndGlobal
diff --git a/filesys/miniFilter/avscan/filter/avscan.vcxproj b/filesys/miniFilter/avscan/filter/avscan.vcxproj
index 53f0c0f3..336aa395 100644
--- a/filesys/miniFilter/avscan/filter/avscan.vcxproj
+++ b/filesys/miniFilter/avscan/filter/avscan.vcxproj
@@ -19,11 +19,11 @@
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
- <ProjectGuid>{AB6754C7-D6E4-492F-84D1-31B3A5AE4C97}</ProjectGuid>
+ <ProjectGuid>{F8973BDD-E1CC-4FD5-B7E7-745274B005C4}</ProjectGuid>
<RootNamespace>$(MSBuildProjectName)</RootNamespace>
<Configuration Condition="'$(Configuration)' == ''">Debug</Configuration>
<Platform Condition="'$(Platform)' == ''">Win32</Platform>
- <SampleGuid>{8EDC5406-9213-42C2-AE6C-EE0CA68F12C6}</SampleGuid>
+ <SampleGuid>{435DDC97-0EA8-4E27-95FF-7C7BD5906BFB}</SampleGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
diff --git a/filesys/miniFilter/avscan/filter/avscan.vcxproj.Filters b/filesys/miniFilter/avscan/filter/avscan.vcxproj.Filters
index a270c7e7..6254a245 100644
--- a/filesys/miniFilter/avscan/filter/avscan.vcxproj.Filters
+++ b/filesys/miniFilter/avscan/filter/avscan.vcxproj.Filters
@@ -3,19 +3,19 @@
<ItemGroup>
<Filter Include="Source Files">
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx;*</Extensions>
- <UniqueIdentifier>{AA91F4AE-57B6-4E58-87D7-7B4EBF6EAF56}</UniqueIdentifier>
+ <UniqueIdentifier>{6DBF67B7-9555-48CA-B54A-D14180150FCC}</UniqueIdentifier>
</Filter>
<Filter Include="Header Files">
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- <UniqueIdentifier>{449E613D-2943-404D-982C-B94A94A7740A}</UniqueIdentifier>
+ <UniqueIdentifier>{F3E70690-D946-4AE8-AD8B-C25FDB1F4D20}</UniqueIdentifier>
</Filter>
<Filter Include="Resource Files">
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms;man;xml</Extensions>
- <UniqueIdentifier>{AFB579FC-5EB4-4CE7-930D-E951C76CE714}</UniqueIdentifier>
+ <UniqueIdentifier>{0893EAF5-31DB-43E4-936B-0B121FF696F4}</UniqueIdentifier>
</Filter>
<Filter Include="Driver Files">
<Extensions>inf;inv;inx;mof;mc;</Extensions>
- <UniqueIdentifier>{3642C4F9-F826-4B8D-B4A7-ECBEBC07E91C}</UniqueIdentifier>
+ <UniqueIdentifier>{5219497F-D59E-488D-9A5B-A24338A27262}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
diff --git a/filesys/miniFilter/avscan/user/avscan.vcxproj b/filesys/miniFilter/avscan/user/avscan.vcxproj
index 74374121..1137228a 100644
--- a/filesys/miniFilter/avscan/user/avscan.vcxproj
+++ b/filesys/miniFilter/avscan/user/avscan.vcxproj
@@ -19,11 +19,11 @@
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
- <ProjectGuid>{41E2DC8A-7DCA-4590-B9B9-466AC5EA85F3}</ProjectGuid>
+ <ProjectGuid>{5E40E4EF-AC99-48D8-8297-037C80560B7D}</ProjectGuid>
<RootNamespace>$(MSBuildProjectName)</RootNamespace>
<Configuration Condition="'$(Configuration)' == ''">Debug</Configuration>
<Platform Condition="'$(Platform)' == ''">Win32</Platform>
- <SampleGuid>{6DFC7CBA-13B8-4D58-9EBB-A732D5B0726E}</SampleGuid>
+ <SampleGuid>{5740BC6D-C17A-4464-9E2E-17E6C862C142}</SampleGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
diff --git a/filesys/miniFilter/avscan/user/avscan.vcxproj.Filters b/filesys/miniFilter/avscan/user/avscan.vcxproj.Filters
index 8d30d0ba..105d8d00 100644
--- a/filesys/miniFilter/avscan/user/avscan.vcxproj.Filters
+++ b/filesys/miniFilter/avscan/user/avscan.vcxproj.Filters
@@ -3,15 +3,15 @@
<ItemGroup>
<Filter Include="Source Files">
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx;*</Extensions>
- <UniqueIdentifier>{B2D2EC97-482F-4194-BE54-A3D1793321E7}</UniqueIdentifier>
+ <UniqueIdentifier>{16C18AD2-7FD3-4C61-A137-D3507295D20D}</UniqueIdentifier>
</Filter>
<Filter Include="Header Files">
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- <UniqueIdentifier>{09D0E94F-1C21-4F8C-83BC-1F1BEFCFB375}</UniqueIdentifier>
+ <UniqueIdentifier>{872C1C9C-F959-48C4-9BB4-ABB22E469B1D}</UniqueIdentifier>
</Filter>
<Filter Include="Resource Files">
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms;man;xml</Extensions>
- <UniqueIdentifier>{DD9E6634-04B3-4D88-A606-B9991BFF640F}</UniqueIdentifier>
+ <UniqueIdentifier>{42425FAE-9439-4B06-9B1F-B0D9CF8A5AB0}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
diff --git a/filesys/miniFilter/cancelSafe/cancelSafe.sln b/filesys/miniFilter/cancelSafe/cancelSafe.sln
index f87b6605..60312e15 100644
--- a/filesys/miniFilter/cancelSafe/cancelSafe.sln
+++ b/filesys/miniFilter/cancelSafe/cancelSafe.sln
@@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0
MinimumVisualStudioVersion = 12.0
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cancelSafe", "cancelSafe.vcxproj", "{AEE2C107-87E7-4A24-B75F-2D3C50FA071C}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cancelSafe", "cancelSafe.vcxproj", "{68EF78DE-3357-4923-AA90-141CF3EA07BB}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -13,14 +13,14 @@ Global
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {AEE2C107-87E7-4A24-B75F-2D3C50FA071C}.Debug|Win32.ActiveCfg = Debug|Win32
- {AEE2C107-87E7-4A24-B75F-2D3C50FA071C}.Debug|Win32.Build.0 = Debug|Win32
- {AEE2C107-87E7-4A24-B75F-2D3C50FA071C}.Release|Win32.ActiveCfg = Release|Win32
- {AEE2C107-87E7-4A24-B75F-2D3C50FA071C}.Release|Win32.Build.0 = Release|Win32
- {AEE2C107-87E7-4A24-B75F-2D3C50FA071C}.Debug|x64.ActiveCfg = Debug|x64
- {AEE2C107-87E7-4A24-B75F-2D3C50FA071C}.Debug|x64.Build.0 = Debug|x64
- {AEE2C107-87E7-4A24-B75F-2D3C50FA071C}.Release|x64.ActiveCfg = Release|x64
- {AEE2C107-87E7-4A24-B75F-2D3C50FA071C}.Release|x64.Build.0 = Release|x64
+ {68EF78DE-3357-4923-AA90-141CF3EA07BB}.Debug|Win32.ActiveCfg = Debug|Win32
+ {68EF78DE-3357-4923-AA90-141CF3EA07BB}.Debug|Win32.Build.0 = Debug|Win32
+ {68EF78DE-3357-4923-AA90-141CF3EA07BB}.Release|Win32.ActiveCfg = Release|Win32
+ {68EF78DE-3357-4923-AA90-141CF3EA07BB}.Release|Win32.Build.0 = Release|Win32
+ {68EF78DE-3357-4923-AA90-141CF3EA07BB}.Debug|x64.ActiveCfg = Debug|x64
+ {68EF78DE-3357-4923-AA90-141CF3EA07BB}.Debug|x64.Build.0 = Debug|x64
+ {68EF78DE-3357-4923-AA90-141CF3EA07BB}.Release|x64.ActiveCfg = Release|x64
+ {68EF78DE-3357-4923-AA90-141CF3EA07BB}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/filesys/miniFilter/cancelSafe/cancelSafe.vcxproj b/filesys/miniFilter/cancelSafe/cancelSafe.vcxproj
index a1c3a8e3..07690bb2 100644
--- a/filesys/miniFilter/cancelSafe/cancelSafe.vcxproj
+++ b/filesys/miniFilter/cancelSafe/cancelSafe.vcxproj
@@ -19,11 +19,11 @@
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
- <ProjectGuid>{AEE2C107-87E7-4A24-B75F-2D3C50FA071C}</ProjectGuid>
+ <ProjectGuid>{68EF78DE-3357-4923-AA90-141CF3EA07BB}</ProjectGuid>
<RootNamespace>$(MSBuildProjectName)</RootNamespace>
<Configuration Condition="'$(Configuration)' == ''">Debug</Configuration>
<Platform Condition="'$(Platform)' == ''">Win32</Platform>
- <SampleGuid>{10C7EEB9-1BA0-466E-A4B0-F39614E9D82F}</SampleGuid>
+ <SampleGuid>{46153B9A-CAAC-4DE3-985D-32D628E2DF10}</SampleGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
diff --git a/filesys/miniFilter/cancelSafe/cancelSafe.vcxproj.Filters b/filesys/miniFilter/cancelSafe/cancelSafe.vcxproj.Filters
index 9ae34e10..069e0a4d 100644
--- a/filesys/miniFilter/cancelSafe/cancelSafe.vcxproj.Filters
+++ b/filesys/miniFilter/cancelSafe/cancelSafe.vcxproj.Filters
@@ -3,19 +3,19 @@
<ItemGroup>
<Filter Include="Source Files">
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx;*</Extensions>
- <UniqueIdentifier>{52C4C7D8-1B22-49D0-84EF-98E084EDBEB9}</UniqueIdentifier>
+ <UniqueIdentifier>{9A7D84AE-E264-400C-A87A-EC40F88927A2}</UniqueIdentifier>
</Filter>
<Filter Include="Header Files">
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- <UniqueIdentifier>{F3CCF591-8A99-4E3E-9568-50A0B12DD115}</UniqueIdentifier>
+ <UniqueIdentifier>{E406DB55-FF94-48FE-890A-536A666EEE11}</UniqueIdentifier>
</Filter>
<Filter Include="Resource Files">
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms;man;xml</Extensions>
- <UniqueIdentifier>{9E1012D3-C962-4D0D-B9CF-577189184D95}</UniqueIdentifier>
+ <UniqueIdentifier>{53319C45-390C-453C-B9BD-48766C37E4FD}</UniqueIdentifier>
</Filter>
<Filter Include="Driver Files">
<Extensions>inf;inv;inx;mof;mc;</Extensions>
- <UniqueIdentifier>{2F385EC0-52C9-4DAD-A6D0-730E61439EDB}</UniqueIdentifier>
+ <UniqueIdentifier>{053CA6FF-7BC2-47C6-A9B6-8CE93B7F1C53}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
diff --git a/filesys/miniFilter/cdo/cdo.sln b/filesys/miniFilter/cdo/cdo.sln
index 7648b7e2..eb72bed8 100644
--- a/filesys/miniFilter/cdo/cdo.sln
+++ b/filesys/miniFilter/cdo/cdo.sln
@@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0
MinimumVisualStudioVersion = 12.0
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cdo", "cdo.vcxproj", "{EB236D74-D9A7-431F-B19C-FF09D8ED8205}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cdo", "cdo.vcxproj", "{43260D29-12DA-4486-BBA6-FFFB04F796ED}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -13,14 +13,14 @@ Global
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {EB236D74-D9A7-431F-B19C-FF09D8ED8205}.Debug|Win32.ActiveCfg = Debug|Win32
- {EB236D74-D9A7-431F-B19C-FF09D8ED8205}.Debug|Win32.Build.0 = Debug|Win32
- {EB236D74-D9A7-431F-B19C-FF09D8ED8205}.Release|Win32.ActiveCfg = Release|Win32
- {EB236D74-D9A7-431F-B19C-FF09D8ED8205}.Release|Win32.Build.0 = Release|Win32
- {EB236D74-D9A7-431F-B19C-FF09D8ED8205}.Debug|x64.ActiveCfg = Debug|x64
- {EB236D74-D9A7-431F-B19C-FF09D8ED8205}.Debug|x64.Build.0 = Debug|x64
- {EB236D74-D9A7-431F-B19C-FF09D8ED8205}.Release|x64.ActiveCfg = Release|x64
- {EB236D74-D9A7-431F-B19C-FF09D8ED8205}.Release|x64.Build.0 = Release|x64
+ {43260D29-12DA-4486-BBA6-FFFB04F796ED}.Debug|Win32.ActiveCfg = Debug|Win32
+ {43260D29-12DA-4486-BBA6-FFFB04F796ED}.Debug|Win32.Build.0 = Debug|Win32
+ {43260D29-12DA-4486-BBA6-FFFB04F796ED}.Release|Win32.ActiveCfg = Release|Win32
+ {43260D29-12DA-4486-BBA6-FFFB04F796ED}.Release|Win32.Build.0 = Release|Win32
+ {43260D29-12DA-4486-BBA6-FFFB04F796ED}.Debug|x64.ActiveCfg = Debug|x64
+ {43260D29-12DA-4486-BBA6-FFFB04F796ED}.Debug|x64.Build.0 = Debug|x64
+ {43260D29-12DA-4486-BBA6-FFFB04F796ED}.Release|x64.ActiveCfg = Release|x64
+ {43260D29-12DA-4486-BBA6-FFFB04F796ED}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/filesys/miniFilter/cdo/cdo.vcxproj b/filesys/miniFilter/cdo/cdo.vcxproj
index 82c67a4a..d5417c8e 100644
--- a/filesys/miniFilter/cdo/cdo.vcxproj
+++ b/filesys/miniFilter/cdo/cdo.vcxproj
@@ -19,11 +19,11 @@
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
- <ProjectGuid>{EB236D74-D9A7-431F-B19C-FF09D8ED8205}</ProjectGuid>
+ <ProjectGuid>{43260D29-12DA-4486-BBA6-FFFB04F796ED}</ProjectGuid>
<RootNamespace>$(MSBuildProjectName)</RootNamespace>
<Configuration Condition="'$(Configuration)' == ''">Debug</Configuration>
<Platform Condition="'$(Platform)' == ''">Win32</Platform>
- <SampleGuid>{B56D7C2D-5ABC-4177-95C8-9452EB707FC2}</SampleGuid>
+ <SampleGuid>{45B9A48B-43EF-4553-9482-C11159AAC845}</SampleGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
diff --git a/filesys/miniFilter/cdo/cdo.vcxproj.Filters b/filesys/miniFilter/cdo/cdo.vcxproj.Filters
index b4428d76..520b137f 100644
--- a/filesys/miniFilter/cdo/cdo.vcxproj.Filters
+++ b/filesys/miniFilter/cdo/cdo.vcxproj.Filters
@@ -3,19 +3,19 @@
<ItemGroup>
<Filter Include="Source Files">
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx;*</Extensions>
- <UniqueIdentifier>{0809536C-C0F6-48F9-B6DB-0D09DFEED741}</UniqueIdentifier>
+ <UniqueIdentifier>{4243F39C-A64A-4B76-A036-79C53BA0206B}</UniqueIdentifier>
</Filter>
<Filter Include="Header Files">
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- <UniqueIdentifier>{32A1BA9C-A9CF-43BF-A599-E7E88C92F71C}</UniqueIdentifier>
+ <UniqueIdentifier>{F7B67833-A22B-4006-A079-F0D96CEE134D}</UniqueIdentifier>
</Filter>
<Filter Include="Resource Files">
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms;man;xml</Extensions>
- <UniqueIdentifier>{533F23EF-FBED-40C8-81BD-C63D302EF13A}</UniqueIdentifier>
+ <UniqueIdentifier>{812A1243-8677-4D30-ADBD-FE3C692BE131}</UniqueIdentifier>
</Filter>
<Filter Include="Driver Files">
<Extensions>inf;inv;inx;mof;mc;</Extensions>
- <UniqueIdentifier>{9C5AAF7D-7DC6-4B25-A5D2-C41A2A6B5196}</UniqueIdentifier>
+ <UniqueIdentifier>{35C73905-6A6E-445E-A3B9-343CC1C58CDE}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
diff --git a/filesys/miniFilter/change/change.sln b/filesys/miniFilter/change/change.sln
index 549f61d3..929eafd1 100644
--- a/filesys/miniFilter/change/change.sln
+++ b/filesys/miniFilter/change/change.sln
@@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0
MinimumVisualStudioVersion = 12.0
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "change", "change.vcxproj", "{179ABF76-7125-47BF-B27B-05A3E0444306}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "change", "change.vcxproj", "{BC0EEC91-7911-4C29-8B97-BE6E8A3A6E46}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -13,14 +13,14 @@ Global
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {179ABF76-7125-47BF-B27B-05A3E0444306}.Debug|Win32.ActiveCfg = Debug|Win32
- {179ABF76-7125-47BF-B27B-05A3E0444306}.Debug|Win32.Build.0 = Debug|Win32
- {179ABF76-7125-47BF-B27B-05A3E0444306}.Release|Win32.ActiveCfg = Release|Win32
- {179ABF76-7125-47BF-B27B-05A3E0444306}.Release|Win32.Build.0 = Release|Win32
- {179ABF76-7125-47BF-B27B-05A3E0444306}.Debug|x64.ActiveCfg = Debug|x64
- {179ABF76-7125-47BF-B27B-05A3E0444306}.Debug|x64.Build.0 = Debug|x64
- {179ABF76-7125-47BF-B27B-05A3E0444306}.Release|x64.ActiveCfg = Release|x64
- {179ABF76-7125-47BF-B27B-05A3E0444306}.Release|x64.Build.0 = Release|x64
+ {BC0EEC91-7911-4C29-8B97-BE6E8A3A6E46}.Debug|Win32.ActiveCfg = Debug|Win32
+ {BC0EEC91-7911-4C29-8B97-BE6E8A3A6E46}.Debug|Win32.Build.0 = Debug|Win32
+ {BC0EEC91-7911-4C29-8B97-BE6E8A3A6E46}.Release|Win32.ActiveCfg = Release|Win32
+ {BC0EEC91-7911-4C29-8B97-BE6E8A3A6E46}.Release|Win32.Build.0 = Release|Win32
+ {BC0EEC91-7911-4C29-8B97-BE6E8A3A6E46}.Debug|x64.ActiveCfg = Debug|x64
+ {BC0EEC91-7911-4C29-8B97-BE6E8A3A6E46}.Debug|x64.Build.0 = Debug|x64
+ {BC0EEC91-7911-4C29-8B97-BE6E8A3A6E46}.Release|x64.ActiveCfg = Release|x64
+ {BC0EEC91-7911-4C29-8B97-BE6E8A3A6E46}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/filesys/miniFilter/change/change.vcxproj b/filesys/miniFilter/change/change.vcxproj
index 39eaaf00..51257d20 100644
--- a/filesys/miniFilter/change/change.vcxproj
+++ b/filesys/miniFilter/change/change.vcxproj
@@ -19,11 +19,11 @@
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
- <ProjectGuid>{179ABF76-7125-47BF-B27B-05A3E0444306}</ProjectGuid>
+ <ProjectGuid>{BC0EEC91-7911-4C29-8B97-BE6E8A3A6E46}</ProjectGuid>
<RootNamespace>$(MSBuildProjectName)</RootNamespace>
<Configuration Condition="'$(Configuration)' == ''">Debug</Configuration>
<Platform Condition="'$(Platform)' == ''">Win32</Platform>
- <SampleGuid>{81F82398-E931-45F3-9A26-7540184D9585}</SampleGuid>
+ <SampleGuid>{05AE0D1D-C860-41E1-9212-AEB8A71523EB}</SampleGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
diff --git a/filesys/miniFilter/change/change.vcxproj.Filters b/filesys/miniFilter/change/change.vcxproj.Filters
index 30c0d3e1..9b82de43 100644
--- a/filesys/miniFilter/change/change.vcxproj.Filters
+++ b/filesys/miniFilter/change/change.vcxproj.Filters
@@ -3,19 +3,19 @@
<ItemGroup>
<Filter Include="Source Files">
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx;*</Extensions>
- <UniqueIdentifier>{9D2A4EE4-34F7-4E91-B38A-EFFB34E0EEFD}</UniqueIdentifier>
+ <UniqueIdentifier>{1B80B6A9-9758-4A4C-9A82-6279C8067839}</UniqueIdentifier>
</Filter>
<Filter Include="Header Files">
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- <UniqueIdentifier>{B98AFCE6-22CB-4AF9-AFE8-B28E58AE48B3}</UniqueIdentifier>
+ <UniqueIdentifier>{7A006FF6-BEBA-443D-A16F-25998D06D90F}</UniqueIdentifier>
</Filter>
<Filter Include="Resource Files">
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms;man;xml</Extensions>
- <UniqueIdentifier>{E1EBFDCA-B504-47B5-B91C-A3A7E19469E0}</UniqueIdentifier>
+ <UniqueIdentifier>{BEA2B102-C7C3-49EB-9C73-D144E30FCA6F}</UniqueIdentifier>
</Filter>
<Filter Include="Driver Files">
<Extensions>inf;inv;inx;mof;mc;</Extensions>
- <UniqueIdentifier>{5BF2CEEB-6121-44F3-868C-C6570E05CD51}</UniqueIdentifier>
+ <UniqueIdentifier>{48ECB429-EA49-41F1-A0CA-02764F0153E8}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
diff --git a/filesys/miniFilter/ctx/ctx.sln b/filesys/miniFilter/ctx/ctx.sln
index 9e05d353..cdbdf426 100644
--- a/filesys/miniFilter/ctx/ctx.sln
+++ b/filesys/miniFilter/ctx/ctx.sln
@@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0
MinimumVisualStudioVersion = 12.0
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ctx", "ctx.vcxproj", "{1081D6E4-E64C-47E0-9738-9314BD2BA8B3}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ctx", "ctx.vcxproj", "{2335901B-9BF4-419C-8BED-808AEEFE5BAE}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -13,14 +13,14 @@ Global
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {1081D6E4-E64C-47E0-9738-9314BD2BA8B3}.Debug|Win32.ActiveCfg = Debug|Win32
- {1081D6E4-E64C-47E0-9738-9314BD2BA8B3}.Debug|Win32.Build.0 = Debug|Win32
- {1081D6E4-E64C-47E0-9738-9314BD2BA8B3}.Release|Win32.ActiveCfg = Release|Win32
- {1081D6E4-E64C-47E0-9738-9314BD2BA8B3}.Release|Win32.Build.0 = Release|Win32
- {1081D6E4-E64C-47E0-9738-9314BD2BA8B3}.Debug|x64.ActiveCfg = Debug|x64
- {1081D6E4-E64C-47E0-9738-9314BD2BA8B3}.Debug|x64.Build.0 = Debug|x64
- {1081D6E4-E64C-47E0-9738-9314BD2BA8B3}.Release|x64.ActiveCfg = Release|x64
- {1081D6E4-E64C-47E0-9738-9314BD2BA8B3}.Release|x64.Build.0 = Release|x64
+ {2335901B-9BF4-419C-8BED-808AEEFE5BAE}.Debug|Win32.ActiveCfg = Debug|Win32
+ {2335901B-9BF4-419C-8BED-808AEEFE5BAE}.Debug|Win32.Build.0 = Debug|Win32
+ {2335901B-9BF4-419C-8BED-808AEEFE5BAE}.Release|Win32.ActiveCfg = Release|Win32
+ {2335901B-9BF4-419C-8BED-808AEEFE5BAE}.Release|Win32.Build.0 = Release|Win32
+ {2335901B-9BF4-419C-8BED-808AEEFE5BAE}.Debug|x64.ActiveCfg = Debug|x64
+ {2335901B-9BF4-419C-8BED-808AEEFE5BAE}.Debug|x64.Build.0 = Debug|x64
+ {2335901B-9BF4-419C-8BED-808AEEFE5BAE}.Release|x64.ActiveCfg = Release|x64
+ {2335901B-9BF4-419C-8BED-808AEEFE5BAE}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/filesys/miniFilter/ctx/ctx.vcxproj b/filesys/miniFilter/ctx/ctx.vcxproj
index f5c09b76..f3f84812 100644
--- a/filesys/miniFilter/ctx/ctx.vcxproj
+++ b/filesys/miniFilter/ctx/ctx.vcxproj
@@ -19,11 +19,11 @@
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
- <ProjectGuid>{1081D6E4-E64C-47E0-9738-9314BD2BA8B3}</ProjectGuid>
+ <ProjectGuid>{2335901B-9BF4-419C-8BED-808AEEFE5BAE}</ProjectGuid>
<RootNamespace>$(MSBuildProjectName)</RootNamespace>
<Configuration Condition="'$(Configuration)' == ''">Debug</Configuration>
<Platform Condition="'$(Platform)' == ''">Win32</Platform>
- <SampleGuid>{CB78F7E3-CFFD-4EEF-A89F-212D44065AC2}</SampleGuid>
+ <SampleGuid>{9236E3D9-F184-4611-88E1-FDF4B63F0136}</SampleGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
diff --git a/filesys/miniFilter/ctx/ctx.vcxproj.Filters b/filesys/miniFilter/ctx/ctx.vcxproj.Filters
index 918745b3..f39ea86a 100644
--- a/filesys/miniFilter/ctx/ctx.vcxproj.Filters
+++ b/filesys/miniFilter/ctx/ctx.vcxproj.Filters
@@ -3,19 +3,19 @@
<ItemGroup>
<Filter Include="Source Files">
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx;*</Extensions>
- <UniqueIdentifier>{58C25697-664D-4A7B-B92D-D77AB896E1A2}</UniqueIdentifier>
+ <UniqueIdentifier>{8515EDEE-048D-4FD9-B5B1-283B25BF72ED}</UniqueIdentifier>
</Filter>
<Filter Include="Header Files">
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- <UniqueIdentifier>{803EF3E0-4FF0-476A-9393-7FC0D12FADEE}</UniqueIdentifier>
+ <UniqueIdentifier>{703B8340-893B-4D3E-8A70-249AC7C8F758}</UniqueIdentifier>
</Filter>
<Filter Include="Resource Files">
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms;man;xml</Extensions>
- <UniqueIdentifier>{B607D689-0BE1-43E0-BC3A-21C334711CF0}</UniqueIdentifier>
+ <UniqueIdentifier>{66893B48-50CE-4012-BEEF-0F519EF6110E}</UniqueIdentifier>
</Filter>
<Filter Include="Driver Files">
<Extensions>inf;inv;inx;mof;mc;</Extensions>
- <UniqueIdentifier>{AE599C40-3283-4930-9FAE-74B87C47917A}</UniqueIdentifier>
+ <UniqueIdentifier>{90FB5FA4-26B9-4F48-B140-1D029567D5D6}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
diff --git a/filesys/miniFilter/ctx/operations.c b/filesys/miniFilter/ctx/operations.c
index 743fcd4c..eb93de00 100644
--- a/filesys/miniFilter/ctx/operations.c
+++ b/filesys/miniFilter/ctx/operations.c
@@ -674,10 +674,11 @@ CtxPreSetInfo (
// Ignore the ops we do not care about
//
- if ((fileInformationClass != FileRenameInformation)) {
+ if ((fileInformationClass != FileRenameInformation) &&
+ (fileInformationClass != FileRenameInformationEx)) {
DebugTrace( DEBUG_TRACE_ALL_IO,
- ("[Ctx]: CtxPreSetInfo -> Ignoring SetInfo operations other than FileRenameInformation (Cbd = %p, FileObject = %p)\n",
+ ("[Ctx]: CtxPreSetInfo -> Ignoring SetInfo operations other than FileRenameInformation/FileRenameInformationEx (Cbd = %p, FileObject = %p)\n",
Cbd,
FltObjects->FileObject) );
diff --git a/filesys/miniFilter/delete/README.md b/filesys/miniFilter/delete/README.md
index 05782834..ad60db1a 100644
--- a/filesys/miniFilter/delete/README.md
+++ b/filesys/miniFilter/delete/README.md
@@ -9,7 +9,7 @@ This sample builds a Universal Windows Driver. It uses only APIs and DDIs that a
Design and Operation
--------------------
-The *delete* minifilter illustrates how to detect deletion of files and streams. It monitors IRP\_MJ\_CREATE requests for the FILE\_DELETE\_ON\_CLOSE flag. Also, it detects IRP\_MJ\_SET\_INFORMATION requests for setting FileDispositionInformation. The sample also illustrates how to handle racing deletes (in the form of multiple parallel IRP\_MJ\_SET\_INFORMATION operations), and how to distinguish deletion of an entire file from deletion of just one stream of the file.
+The *delete* minifilter illustrates how to detect deletion of files and streams. It monitors IRP\_MJ\_CREATE requests for the FILE\_DELETE\_ON\_CLOSE flag. Also, it detects IRP\_MJ\_SET\_INFORMATION requests for setting FileDispositionInformation/FileDispositionInformationEx. The sample also illustrates how to handle racing deletes (in the form of multiple parallel IRP\_MJ\_SET\_INFORMATION operations), and how to distinguish deletion of an entire file from deletion of just one stream of the file.
**Note** Because of the way in which the Windows operating system deletes files, it is not possible for the minifilter to detect in advance that a file or stream will be deleted. The minifilter can only detect operations that may cause a deletion, and then determine if the deletion took place after the operation completes.
diff --git a/filesys/miniFilter/delete/delete.c b/filesys/miniFilter/delete/delete.c
index ec515c81..4050d7d0 100644
--- a/filesys/miniFilter/delete/delete.c
+++ b/filesys/miniFilter/delete/delete.c
@@ -2764,8 +2764,8 @@ Routine Description:
IRP_MJ_SET_INFORMATION in this miniFilter.
The pre-setinfo callback is important because setting
- FileDispositionInformation is another way of putting the file in a
- delete-pending state.
+ FileDispositionInformation/FileDispositionInformationEx is another way of
+ putting the file in a delete-pending state.
Since the delete disposition is a reversible condition, we have to
make sure to do the right thing when multiple operations are racing:
@@ -2790,8 +2790,8 @@ Return Value:
FLT_PREOP_SYNCHRONIZE - we never do any sort of asynchronous processing
here, and we synchronize postop.
- FLT_PREOP_SUCCESS_NO_CALLBACK - if not FileDispositionInformation or we
- can't set a streamcontext.
+ FLT_PREOP_SUCCESS_NO_CALLBACK - if not FileDispositionInformation/FileDispositionInformationEx
+ or we can't set a streamcontext.
--*/
{
@@ -2806,6 +2806,7 @@ Return Value:
switch (Data->Iopb->Parameters.SetFileInformation.FileInformationClass) {
case FileDispositionInformation:
+ case FileDispositionInformationEx:
//
// We're interested when the file delete disposition changes.
@@ -2912,16 +2913,16 @@ Return Value:
PAGED_CODE();
- // assert on FileDispositionInformation
- ASSERT( Data->Iopb->Parameters.SetFileInformation.FileInformationClass
- == FileDispositionInformation );
+ // assert on FileDispositionInformation/FileDispositionInformationEx
+ ASSERT( (Data->Iopb->Parameters.SetFileInformation.FileInformationClass == FileDispositionInformation) ||
+ (Data->Iopb->Parameters.SetFileInformation.FileInformationClass == FileDispositionInformationEx) );
// pass from pre-callback to post-callback
ASSERT( NULL != CompletionContext );
streamContext = (PDF_STREAM_CONTEXT) CompletionContext;
//
- // Reaching a postop for FileDispositionInformation means we
+ // Reaching a postop for FileDispositionInformation/FileDispositionInformationEx means we
// MUST have a stream context passed in the CompletionContext.
//
@@ -2934,9 +2935,38 @@ Return Value:
// file is a delete candidate, so it will be checked at post-
// -cleanup regardless of the value of SetDisp.
//
+
+ //
+ // Using FileDispositinInformationEx -
+ // FILE_DISPOSITION_ON_CLOSE controls delete on close
+ // or set disposition behavior. It uses FILE_DISPOSITION_INFORMATION_EX structure.
+ // FILE_DISPOSITION_ON_CLOSE is set - Set or clear DeleteOnClose
+ // depending on FILE_DISPOSITION_DELETE flag.
+ // FILE_DISPOSITION_ON_CLOSE is NOT set - Set or clear disposition information
+ // depending on the flag FILE_DISPOSITION_DELETE.
+ //
+ //
+ // Using FileDispositionInformation -
+ // Controls only set disposition information behavior. It uses FILE_DISPOSITION_INFORMATION structure.
+ //
- streamContext->SetDisp = ((PFILE_DISPOSITION_INFORMATION)
- Data->Iopb->Parameters.SetFileInformation.InfoBuffer)->DeleteFile;
+ if (Data->Iopb->Parameters.SetFileInformation.FileInformationClass == FileDispositionInformationEx) {
+
+ ULONG Flags = ((PFILE_DISPOSITION_INFORMATION_EX) Data->Iopb->Parameters.SetFileInformation.InfoBuffer)->Flags;
+
+ if (FlagOn( Flags, FILE_DISPOSITION_ON_CLOSE )) {
+
+ streamContext->DeleteOnClose = BooleanFlagOn( Flags, FILE_DISPOSITION_DELETE );
+
+ } else {
+
+ streamContext->SetDisp = BooleanFlagOn( Flags, FILE_DISPOSITION_DELETE );
+ }
+
+ } else {
+
+ streamContext->SetDisp = ((PFILE_DISPOSITION_INFORMATION) Data->Iopb->Parameters.SetFileInformation.InfoBuffer)->DeleteFile;
+ }
}
//
@@ -3112,6 +3142,7 @@ Return Value:
//
// 3. DeleteOnClose. If the file was ever opened with
// FILE_DELETE_ON_CLOSE, we must check to see if it was deleted.
+ // FileDispositionInformationEx allows the this flag to be unset.
//
// Also, if a deletion of this stream was already notified, there is no
// point notifying it again.
diff --git a/filesys/miniFilter/delete/delete.sln b/filesys/miniFilter/delete/delete.sln
index d4cd99a1..1e175659 100644
--- a/filesys/miniFilter/delete/delete.sln
+++ b/filesys/miniFilter/delete/delete.sln
@@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0
MinimumVisualStudioVersion = 12.0
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "delete", "delete.vcxproj", "{410C84AC-DE40-4A38-9563-058909292244}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "delete", "delete.vcxproj", "{0933F9F0-B579-4691-9611-D28D4D6F6969}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -13,14 +13,14 @@ Global
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {410C84AC-DE40-4A38-9563-058909292244}.Debug|Win32.ActiveCfg = Debug|Win32
- {410C84AC-DE40-4A38-9563-058909292244}.Debug|Win32.Build.0 = Debug|Win32
- {410C84AC-DE40-4A38-9563-058909292244}.Release|Win32.ActiveCfg = Release|Win32
- {410C84AC-DE40-4A38-9563-058909292244}.Release|Win32.Build.0 = Release|Win32
- {410C84AC-DE40-4A38-9563-058909292244}.Debug|x64.ActiveCfg = Debug|x64
- {410C84AC-DE40-4A38-9563-058909292244}.Debug|x64.Build.0 = Debug|x64
- {410C84AC-DE40-4A38-9563-058909292244}.Release|x64.ActiveCfg = Release|x64
- {410C84AC-DE40-4A38-9563-058909292244}.Release|x64.Build.0 = Release|x64
+ {0933F9F0-B579-4691-9611-D28D4D6F6969}.Debug|Win32.ActiveCfg = Debug|Win32
+ {0933F9F0-B579-4691-9611-D28D4D6F6969}.Debug|Win32.Build.0 = Debug|Win32
+ {0933F9F0-B579-4691-9611-D28D4D6F6969}.Release|Win32.ActiveCfg = Release|Win32
+ {0933F9F0-B579-4691-9611-D28D4D6F6969}.Release|Win32.Build.0 = Release|Win32
+ {0933F9F0-B579-4691-9611-D28D4D6F6969}.Debug|x64.ActiveCfg = Debug|x64
+ {0933F9F0-B579-4691-9611-D28D4D6F6969}.Debug|x64.Build.0 = Debug|x64
+ {0933F9F0-B579-4691-9611-D28D4D6F6969}.Release|x64.ActiveCfg = Release|x64
+ {0933F9F0-B579-4691-9611-D28D4D6F6969}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/filesys/miniFilter/delete/delete.vcxproj b/filesys/miniFilter/delete/delete.vcxproj
index a240aa81..8440ee76 100644
--- a/filesys/miniFilter/delete/delete.vcxproj
+++ b/filesys/miniFilter/delete/delete.vcxproj
@@ -19,11 +19,11 @@
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
- <ProjectGuid>{410C84AC-DE40-4A38-9563-058909292244}</ProjectGuid>
+ <ProjectGuid>{0933F9F0-B579-4691-9611-D28D4D6F6969}</ProjectGuid>
<RootNamespace>$(MSBuildProjectName)</RootNamespace>
<Configuration Condition="'$(Configuration)' == ''">Debug</Configuration>
<Platform Condition="'$(Platform)' == ''">Win32</Platform>
- <SampleGuid>{051F6346-8D3B-4D83-AB05-BB76110E004D}</SampleGuid>
+ <SampleGuid>{3198832E-A446-4372-94A0-5E68D9996027}</SampleGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
diff --git a/filesys/miniFilter/delete/delete.vcxproj.Filters b/filesys/miniFilter/delete/delete.vcxproj.Filters
index 60c84cad..c02436e5 100644
--- a/filesys/miniFilter/delete/delete.vcxproj.Filters
+++ b/filesys/miniFilter/delete/delete.vcxproj.Filters
@@ -3,19 +3,19 @@
<ItemGroup>
<Filter Include="Source Files">
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx;*</Extensions>
- <UniqueIdentifier>{0EEAE985-A09E-4685-BAA3-DFD5B6467C4E}</UniqueIdentifier>
+ <UniqueIdentifier>{8C503630-3AF5-46CF-99D5-EB1C7ECE3079}</UniqueIdentifier>
</Filter>
<Filter Include="Header Files">
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- <UniqueIdentifier>{7C40FC3F-061F-42B5-9ADD-4CC3D3E72944}</UniqueIdentifier>
+ <UniqueIdentifier>{2F8671A8-91BC-45B3-AF3D-ABB984EC9F15}</UniqueIdentifier>
</Filter>
<Filter Include="Resource Files">
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms;man;xml</Extensions>
- <UniqueIdentifier>{96A10710-A80F-4195-8674-D5C51CC6D15E}</UniqueIdentifier>
+ <UniqueIdentifier>{7E49906A-9C9B-44FA-9264-55D26E938C69}</UniqueIdentifier>
</Filter>
<Filter Include="Driver Files">
<Extensions>inf;inv;inx;mof;mc;</Extensions>
- <UniqueIdentifier>{C3920BC4-FB12-491E-B103-14EB0437F1FA}</UniqueIdentifier>
+ <UniqueIdentifier>{2D0FAEC4-9C8F-4FB9-89E4-4546A2EBE732}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
diff --git a/filesys/miniFilter/minispy/filter/minispy.vcxproj b/filesys/miniFilter/minispy/filter/minispy.vcxproj
index 9d5edee0..6931c7e1 100644
--- a/filesys/miniFilter/minispy/filter/minispy.vcxproj
+++ b/filesys/miniFilter/minispy/filter/minispy.vcxproj
@@ -19,11 +19,11 @@
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
- <ProjectGuid>{AB0153F1-D5E4-45E0-9308-5EF32974E9A1}</ProjectGuid>
+ <ProjectGuid>{BB97C5A3-10A8-4979-B7CA-D33B8D8F86AF}</ProjectGuid>
<RootNamespace>$(MSBuildProjectName)</RootNamespace>
<Configuration Condition="'$(Configuration)' == ''">Debug</Configuration>
<Platform Condition="'$(Platform)' == ''">Win32</Platform>
- <SampleGuid>{2F2D5822-720A-47AB-8E4A-7337206F83F5}</SampleGuid>
+ <SampleGuid>{B33E4B58-A759-43FF-AC21-3310B20E933D}</SampleGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
diff --git a/filesys/miniFilter/minispy/filter/minispy.vcxproj.Filters b/filesys/miniFilter/minispy/filter/minispy.vcxproj.Filters
index 74776910..e0184750 100644
--- a/filesys/miniFilter/minispy/filter/minispy.vcxproj.Filters
+++ b/filesys/miniFilter/minispy/filter/minispy.vcxproj.Filters
@@ -3,19 +3,19 @@
<ItemGroup>
<Filter Include="Source Files">
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx;*</Extensions>
- <UniqueIdentifier>{01075B84-BB81-4AA3-8C21-A7041C702B6F}</UniqueIdentifier>
+ <UniqueIdentifier>{0D606C92-976E-4360-B969-9E95CDA4B2BA}</UniqueIdentifier>
</Filter>
<Filter Include="Header Files">
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- <UniqueIdentifier>{EC4FB901-91AF-470A-B669-B79EAE9CD07B}</UniqueIdentifier>
+ <UniqueIdentifier>{A46C8481-04C7-4E8D-8074-C7660B5297BB}</UniqueIdentifier>
</Filter>
<Filter Include="Resource Files">
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms;man;xml</Extensions>
- <UniqueIdentifier>{2ECFFA50-EC77-4CA0-8217-F41C7A6E893D}</UniqueIdentifier>
+ <UniqueIdentifier>{41659AAF-BFDF-4691-A2F8-5C977C2880D5}</UniqueIdentifier>
</Filter>
<Filter Include="Driver Files">
<Extensions>inf;inv;inx;mof;mc;</Extensions>
- <UniqueIdentifier>{39F948D3-F781-4C4B-A2E9-788D724DC0F3}</UniqueIdentifier>
+ <UniqueIdentifier>{E31F2E41-06E4-40E6-A16B-3F5A21386C0B}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
diff --git a/filesys/miniFilter/minispy/minispy.sln b/filesys/miniFilter/minispy/minispy.sln
index 2c51ddd1..a5043dce 100644
--- a/filesys/miniFilter/minispy/minispy.sln
+++ b/filesys/miniFilter/minispy/minispy.sln
@@ -3,13 +3,13 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0
MinimumVisualStudioVersion = 12.0
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Filter", "Filter", "{FE789860-CDFE-48E5-AE02-E418DD3A0C6D}"
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Filter", "Filter", "{0C3A5495-4158-45B9-A051-9B24F65D70AB}"
EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "User", "User", "{94944192-75BD-4A9E-B4DB-811E26C3A6E5}"
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "User", "User", "{725B0F52-4453-432A-8805-7DE59FE2C159}"
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "minispy", "filter\minispy.vcxproj", "{AB0153F1-D5E4-45E0-9308-5EF32974E9A1}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "minispy", "filter\minispy.vcxproj", "{BB97C5A3-10A8-4979-B7CA-D33B8D8F86AF}"
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "minispy", "user\minispy.vcxproj", "{DD45D2A9-C50A-4900-8F7C-991B2ADB061B}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "minispy", "user\minispy.vcxproj", "{CF307DC8-96B6-4818-AB94-4EFF2176A02B}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -19,28 +19,28 @@ Global
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {AB0153F1-D5E4-45E0-9308-5EF32974E9A1}.Debug|Win32.ActiveCfg = Debug|Win32
- {AB0153F1-D5E4-45E0-9308-5EF32974E9A1}.Debug|Win32.Build.0 = Debug|Win32
- {AB0153F1-D5E4-45E0-9308-5EF32974E9A1}.Release|Win32.ActiveCfg = Release|Win32
- {AB0153F1-D5E4-45E0-9308-5EF32974E9A1}.Release|Win32.Build.0 = Release|Win32
- {AB0153F1-D5E4-45E0-9308-5EF32974E9A1}.Debug|x64.ActiveCfg = Debug|x64
- {AB0153F1-D5E4-45E0-9308-5EF32974E9A1}.Debug|x64.Build.0 = Debug|x64
- {AB0153F1-D5E4-45E0-9308-5EF32974E9A1}.Release|x64.ActiveCfg = Release|x64
- {AB0153F1-D5E4-45E0-9308-5EF32974E9A1}.Release|x64.Build.0 = Release|x64
- {DD45D2A9-C50A-4900-8F7C-991B2ADB061B}.Debug|Win32.ActiveCfg = Debug|Win32
- {DD45D2A9-C50A-4900-8F7C-991B2ADB061B}.Debug|Win32.Build.0 = Debug|Win32
- {DD45D2A9-C50A-4900-8F7C-991B2ADB061B}.Release|Win32.ActiveCfg = Release|Win32
- {DD45D2A9-C50A-4900-8F7C-991B2ADB061B}.Release|Win32.Build.0 = Release|Win32
- {DD45D2A9-C50A-4900-8F7C-991B2ADB061B}.Debug|x64.ActiveCfg = Debug|x64
- {DD45D2A9-C50A-4900-8F7C-991B2ADB061B}.Debug|x64.Build.0 = Debug|x64
- {DD45D2A9-C50A-4900-8F7C-991B2ADB061B}.Release|x64.ActiveCfg = Release|x64
- {DD45D2A9-C50A-4900-8F7C-991B2ADB061B}.Release|x64.Build.0 = Release|x64
+ {BB97C5A3-10A8-4979-B7CA-D33B8D8F86AF}.Debug|Win32.ActiveCfg = Debug|Win32
+ {BB97C5A3-10A8-4979-B7CA-D33B8D8F86AF}.Debug|Win32.Build.0 = Debug|Win32
+ {BB97C5A3-10A8-4979-B7CA-D33B8D8F86AF}.Release|Win32.ActiveCfg = Release|Win32
+ {BB97C5A3-10A8-4979-B7CA-D33B8D8F86AF}.Release|Win32.Build.0 = Release|Win32
+ {BB97C5A3-10A8-4979-B7CA-D33B8D8F86AF}.Debug|x64.ActiveCfg = Debug|x64
+ {BB97C5A3-10A8-4979-B7CA-D33B8D8F86AF}.Debug|x64.Build.0 = Debug|x64
+ {BB97C5A3-10A8-4979-B7CA-D33B8D8F86AF}.Release|x64.ActiveCfg = Release|x64
+ {BB97C5A3-10A8-4979-B7CA-D33B8D8F86AF}.Release|x64.Build.0 = Release|x64
+ {CF307DC8-96B6-4818-AB94-4EFF2176A02B}.Debug|Win32.ActiveCfg = Debug|Win32
+ {CF307DC8-96B6-4818-AB94-4EFF2176A02B}.Debug|Win32.Build.0 = Debug|Win32
+ {CF307DC8-96B6-4818-AB94-4EFF2176A02B}.Release|Win32.ActiveCfg = Release|Win32
+ {CF307DC8-96B6-4818-AB94-4EFF2176A02B}.Release|Win32.Build.0 = Release|Win32
+ {CF307DC8-96B6-4818-AB94-4EFF2176A02B}.Debug|x64.ActiveCfg = Debug|x64
+ {CF307DC8-96B6-4818-AB94-4EFF2176A02B}.Debug|x64.Build.0 = Debug|x64
+ {CF307DC8-96B6-4818-AB94-4EFF2176A02B}.Release|x64.ActiveCfg = Release|x64
+ {CF307DC8-96B6-4818-AB94-4EFF2176A02B}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
- {AB0153F1-D5E4-45E0-9308-5EF32974E9A1} = {FE789860-CDFE-48E5-AE02-E418DD3A0C6D}
- {DD45D2A9-C50A-4900-8F7C-991B2ADB061B} = {94944192-75BD-4A9E-B4DB-811E26C3A6E5}
+ {BB97C5A3-10A8-4979-B7CA-D33B8D8F86AF} = {0C3A5495-4158-45B9-A051-9B24F65D70AB}
+ {CF307DC8-96B6-4818-AB94-4EFF2176A02B} = {725B0F52-4453-432A-8805-7DE59FE2C159}
EndGlobalSection
EndGlobal
diff --git a/filesys/miniFilter/minispy/user/minispy.vcxproj b/filesys/miniFilter/minispy/user/minispy.vcxproj
index 2f319d16..3e8556f6 100644
--- a/filesys/miniFilter/minispy/user/minispy.vcxproj
+++ b/filesys/miniFilter/minispy/user/minispy.vcxproj
@@ -19,11 +19,11 @@
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
- <ProjectGuid>{DD45D2A9-C50A-4900-8F7C-991B2ADB061B}</ProjectGuid>
+ <ProjectGuid>{CF307DC8-96B6-4818-AB94-4EFF2176A02B}</ProjectGuid>
<RootNamespace>$(MSBuildProjectName)</RootNamespace>
<Configuration Condition="'$(Configuration)' == ''">Debug</Configuration>
<Platform Condition="'$(Platform)' == ''">Win32</Platform>
- <SampleGuid>{6E48C68A-702A-40C5-99C4-4C7AAD8EE118}</SampleGuid>
+ <SampleGuid>{788C2D82-6D5B-4CBE-93DF-E9BCFD1752EF}</SampleGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
diff --git a/filesys/miniFilter/minispy/user/minispy.vcxproj.Filters b/filesys/miniFilter/minispy/user/minispy.vcxproj.Filters
index a4d62354..af65fa67 100644
--- a/filesys/miniFilter/minispy/user/minispy.vcxproj.Filters
+++ b/filesys/miniFilter/minispy/user/minispy.vcxproj.Filters
@@ -3,15 +3,15 @@
<ItemGroup>
<Filter Include="Source Files">
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx;*</Extensions>
- <UniqueIdentifier>{9EAF64A2-15CB-4825-AE64-33D70752B086}</UniqueIdentifier>
+ <UniqueIdentifier>{68C6EC96-AAC5-4AB3-A23B-0B08602FCAD8}</UniqueIdentifier>
</Filter>
<Filter Include="Header Files">
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- <UniqueIdentifier>{AC5F1AAD-A0DB-4BE1-884D-234ABCC16253}</UniqueIdentifier>
+ <UniqueIdentifier>{9722FFC4-5EA4-4C9D-B6E4-1C241D7FB3BB}</UniqueIdentifier>
</Filter>
<Filter Include="Resource Files">
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms;man;xml</Extensions>
- <UniqueIdentifier>{04DFEF0C-C42D-4BAF-84AE-C49DFBAF1C6D}</UniqueIdentifier>
+ <UniqueIdentifier>{9E01409F-C561-4CDF-873E-F9BC8CEE2221}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
diff --git a/filesys/miniFilter/minispy/user/mspyLog.c b/filesys/miniFilter/minispy/user/mspyLog.c
index 758efe2d..dee72d38 100644
--- a/filesys/miniFilter/minispy/user/mspyLog.c
+++ b/filesys/miniFilter/minispy/user/mspyLog.c
@@ -199,7 +199,7 @@ Return Value:
printf( "UNEXPECTED LOG_RECORD->Length: length=%d expected>=%d\n",
pLogRecord->Length,
- (sizeof(LOG_RECORD)+sizeof(WCHAR)));
+ (ULONG)(sizeof(LOG_RECORD)+sizeof(WCHAR)));
break;
}
@@ -1013,7 +1013,7 @@ Return Value:
fprintf( File, "\t%-12s", TIME_ERROR );
}
- fprintf(File, "\t%8x.%-4x ", RecordData->ProcessId, RecordData->ThreadId);
+ fprintf(File, "\t%8Ix.%-4Ix ", RecordData->ProcessId, RecordData->ThreadId);
PrintIrpCode( RecordData->CallbackMajorId,
RecordData->CallbackMinorId,
@@ -1153,7 +1153,7 @@ Return Value:
printf( "%-12s ", TIME_ERROR );
}
- printf("%8x.%-4x ", RecordData->ProcessId, RecordData->ThreadId);
+ printf("%8Ix.%-4Ix ", RecordData->ProcessId, RecordData->ThreadId);
PrintIrpCode( RecordData->CallbackMajorId,
RecordData->CallbackMinorId,
diff --git a/filesys/miniFilter/nullFilter/nullFilter.sln b/filesys/miniFilter/nullFilter/nullFilter.sln
index d0ad2845..afdbee02 100644
--- a/filesys/miniFilter/nullFilter/nullFilter.sln
+++ b/filesys/miniFilter/nullFilter/nullFilter.sln
@@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0
MinimumVisualStudioVersion = 12.0
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nullFilter", "nullFilter.vcxproj", "{BC90CE20-0CDF-4B17-9561-76EB460963DF}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nullFilter", "nullFilter.vcxproj", "{FB7A1B2D-5BB0-458E-B5B0-FA411CF8C73F}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -13,14 +13,14 @@ Global
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {BC90CE20-0CDF-4B17-9561-76EB460963DF}.Debug|Win32.ActiveCfg = Debug|Win32
- {BC90CE20-0CDF-4B17-9561-76EB460963DF}.Debug|Win32.Build.0 = Debug|Win32
- {BC90CE20-0CDF-4B17-9561-76EB460963DF}.Release|Win32.ActiveCfg = Release|Win32
- {BC90CE20-0CDF-4B17-9561-76EB460963DF}.Release|Win32.Build.0 = Release|Win32
- {BC90CE20-0CDF-4B17-9561-76EB460963DF}.Debug|x64.ActiveCfg = Debug|x64
- {BC90CE20-0CDF-4B17-9561-76EB460963DF}.Debug|x64.Build.0 = Debug|x64
- {BC90CE20-0CDF-4B17-9561-76EB460963DF}.Release|x64.ActiveCfg = Release|x64
- {BC90CE20-0CDF-4B17-9561-76EB460963DF}.Release|x64.Build.0 = Release|x64
+ {FB7A1B2D-5BB0-458E-B5B0-FA411CF8C73F}.Debug|Win32.ActiveCfg = Debug|Win32
+ {FB7A1B2D-5BB0-458E-B5B0-FA411CF8C73F}.Debug|Win32.Build.0 = Debug|Win32
+ {FB7A1B2D-5BB0-458E-B5B0-FA411CF8C73F}.Release|Win32.ActiveCfg = Release|Win32
+ {FB7A1B2D-5BB0-458E-B5B0-FA411CF8C73F}.Release|Win32.Build.0 = Release|Win32
+ {FB7A1B2D-5BB0-458E-B5B0-FA411CF8C73F}.Debug|x64.ActiveCfg = Debug|x64
+ {FB7A1B2D-5BB0-458E-B5B0-FA411CF8C73F}.Debug|x64.Build.0 = Debug|x64
+ {FB7A1B2D-5BB0-458E-B5B0-FA411CF8C73F}.Release|x64.ActiveCfg = Release|x64
+ {FB7A1B2D-5BB0-458E-B5B0-FA411CF8C73F}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/filesys/miniFilter/nullFilter/nullFilter.vcxproj b/filesys/miniFilter/nullFilter/nullFilter.vcxproj
index 8ba94e19..ae416e19 100644
--- a/filesys/miniFilter/nullFilter/nullFilter.vcxproj
+++ b/filesys/miniFilter/nullFilter/nullFilter.vcxproj
@@ -19,11 +19,11 @@
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
- <ProjectGuid>{BC90CE20-0CDF-4B17-9561-76EB460963DF}</ProjectGuid>
+ <ProjectGuid>{FB7A1B2D-5BB0-458E-B5B0-FA411CF8C73F}</ProjectGuid>
<RootNamespace>$(MSBuildProjectName)</RootNamespace>
<Configuration Condition="'$(Configuration)' == ''">Debug</Configuration>
<Platform Condition="'$(Platform)' == ''">Win32</Platform>
- <SampleGuid>{4420F370-92FD-41BD-93E4-3F2AF8F12A65}</SampleGuid>
+ <SampleGuid>{37C5493F-8641-40D5-AE43-952B56CD6D9D}</SampleGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
diff --git a/filesys/miniFilter/nullFilter/nullFilter.vcxproj.Filters b/filesys/miniFilter/nullFilter/nullFilter.vcxproj.Filters
index c532b6ad..bef7b460 100644
--- a/filesys/miniFilter/nullFilter/nullFilter.vcxproj.Filters
+++ b/filesys/miniFilter/nullFilter/nullFilter.vcxproj.Filters
@@ -3,19 +3,19 @@
<ItemGroup>
<Filter Include="Source Files">
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx;*</Extensions>
- <UniqueIdentifier>{E01F7D72-4DC2-420E-9147-6532FECF63A8}</UniqueIdentifier>
+ <UniqueIdentifier>{FC011592-03B3-41FE-A322-2A4A09923FC0}</UniqueIdentifier>
</Filter>
<Filter Include="Header Files">
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- <UniqueIdentifier>{E6E911AB-5725-46B5-8BDA-268D1D9B8388}</UniqueIdentifier>
+ <UniqueIdentifier>{909BB668-2A6A-4809-ACDD-EE0600211951}</UniqueIdentifier>
</Filter>
<Filter Include="Resource Files">
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms;man;xml</Extensions>
- <UniqueIdentifier>{A287192A-CE91-44F6-B0A3-7A120AB72676}</UniqueIdentifier>
+ <UniqueIdentifier>{C33A28B6-71E0-4305-A532-2E117FB9997B}</UniqueIdentifier>
</Filter>
<Filter Include="Driver Files">
<Extensions>inf;inv;inx;mof;mc;</Extensions>
- <UniqueIdentifier>{F599A534-6357-4DB9-9AD6-2B17B6AC4C43}</UniqueIdentifier>
+ <UniqueIdentifier>{9D854565-EE40-4732-836B-BF7CA4EC2AAB}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
diff --git a/filesys/miniFilter/passThrough/passThrough.sln b/filesys/miniFilter/passThrough/passThrough.sln
index 1201cecd..18fe204e 100644
--- a/filesys/miniFilter/passThrough/passThrough.sln
+++ b/filesys/miniFilter/passThrough/passThrough.sln
@@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0
MinimumVisualStudioVersion = 12.0
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "passThrough", "passThrough.vcxproj", "{AA5895EB-53F3-4888-AF0E-29923C1C6E50}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "passThrough", "passThrough.vcxproj", "{D8B8DA25-0E6D-4631-8B25-DBF5B10B45AD}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -13,14 +13,14 @@ Global
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {AA5895EB-53F3-4888-AF0E-29923C1C6E50}.Debug|Win32.ActiveCfg = Debug|Win32
- {AA5895EB-53F3-4888-AF0E-29923C1C6E50}.Debug|Win32.Build.0 = Debug|Win32
- {AA5895EB-53F3-4888-AF0E-29923C1C6E50}.Release|Win32.ActiveCfg = Release|Win32
- {AA5895EB-53F3-4888-AF0E-29923C1C6E50}.Release|Win32.Build.0 = Release|Win32
- {AA5895EB-53F3-4888-AF0E-29923C1C6E50}.Debug|x64.ActiveCfg = Debug|x64
- {AA5895EB-53F3-4888-AF0E-29923C1C6E50}.Debug|x64.Build.0 = Debug|x64
- {AA5895EB-53F3-4888-AF0E-29923C1C6E50}.Release|x64.ActiveCfg = Release|x64
- {AA5895EB-53F3-4888-AF0E-29923C1C6E50}.Release|x64.Build.0 = Release|x64
+ {D8B8DA25-0E6D-4631-8B25-DBF5B10B45AD}.Debug|Win32.ActiveCfg = Debug|Win32
+ {D8B8DA25-0E6D-4631-8B25-DBF5B10B45AD}.Debug|Win32.Build.0 = Debug|Win32
+ {D8B8DA25-0E6D-4631-8B25-DBF5B10B45AD}.Release|Win32.ActiveCfg = Release|Win32
+ {D8B8DA25-0E6D-4631-8B25-DBF5B10B45AD}.Release|Win32.Build.0 = Release|Win32
+ {D8B8DA25-0E6D-4631-8B25-DBF5B10B45AD}.Debug|x64.ActiveCfg = Debug|x64
+ {D8B8DA25-0E6D-4631-8B25-DBF5B10B45AD}.Debug|x64.Build.0 = Debug|x64
+ {D8B8DA25-0E6D-4631-8B25-DBF5B10B45AD}.Release|x64.ActiveCfg = Release|x64
+ {D8B8DA25-0E6D-4631-8B25-DBF5B10B45AD}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/filesys/miniFilter/passThrough/passThrough.vcxproj b/filesys/miniFilter/passThrough/passThrough.vcxproj
index 75615c14..32f030e1 100644
--- a/filesys/miniFilter/passThrough/passThrough.vcxproj
+++ b/filesys/miniFilter/passThrough/passThrough.vcxproj
@@ -19,11 +19,11 @@
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
- <ProjectGuid>{AA5895EB-53F3-4888-AF0E-29923C1C6E50}</ProjectGuid>
+ <ProjectGuid>{D8B8DA25-0E6D-4631-8B25-DBF5B10B45AD}</ProjectGuid>
<RootNamespace>$(MSBuildProjectName)</RootNamespace>
<Configuration Condition="'$(Configuration)' == ''">Debug</Configuration>
<Platform Condition="'$(Platform)' == ''">Win32</Platform>
- <SampleGuid>{32A5FBD2-142B-49C5-8BDD-01D1BE06EFD4}</SampleGuid>
+ <SampleGuid>{D469D3E0-FEAC-4BF9-90AF-C46E5F411DCA}</SampleGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
diff --git a/filesys/miniFilter/passThrough/passThrough.vcxproj.Filters b/filesys/miniFilter/passThrough/passThrough.vcxproj.Filters
index d310379d..40226264 100644
--- a/filesys/miniFilter/passThrough/passThrough.vcxproj.Filters
+++ b/filesys/miniFilter/passThrough/passThrough.vcxproj.Filters
@@ -3,19 +3,19 @@
<ItemGroup>
<Filter Include="Source Files">
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx;*</Extensions>
- <UniqueIdentifier>{60091B92-D84A-4E27-ADDB-D89680AD7C35}</UniqueIdentifier>
+ <UniqueIdentifier>{54536918-FB48-48CD-A187-79DC9C161CF3}</UniqueIdentifier>
</Filter>
<Filter Include="Header Files">
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- <UniqueIdentifier>{0408A889-447A-4011-9D63-5D577FBC63A4}</UniqueIdentifier>
+ <UniqueIdentifier>{AF50A734-04A5-492C-8E8B-971B0F275794}</UniqueIdentifier>
</Filter>
<Filter Include="Resource Files">
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms;man;xml</Extensions>
- <UniqueIdentifier>{D371111D-1519-4E9C-9D10-FB2DFB84B14B}</UniqueIdentifier>
+ <UniqueIdentifier>{5444E5B6-AE93-4AA4-AD28-A5F43FCEF60F}</UniqueIdentifier>
</Filter>
<Filter Include="Driver Files">
<Extensions>inf;inv;inx;mof;mc;</Extensions>
- <UniqueIdentifier>{48901523-D551-4144-A596-CF7C204FA6BE}</UniqueIdentifier>
+ <UniqueIdentifier>{DA557823-C05E-48D3-AE3A-24D4FEC497E9}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
diff --git a/filesys/miniFilter/scanner/filter/scanner.vcxproj b/filesys/miniFilter/scanner/filter/scanner.vcxproj
index bd57aea1..c6e84ce5 100644
--- a/filesys/miniFilter/scanner/filter/scanner.vcxproj
+++ b/filesys/miniFilter/scanner/filter/scanner.vcxproj
@@ -19,11 +19,11 @@
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
- <ProjectGuid>{405E5558-9053-4BC3-9FF4-760C3D487476}</ProjectGuid>
+ <ProjectGuid>{CDFBA2B4-F7A9-4910-A226-F558EE7315F5}</ProjectGuid>
<RootNamespace>$(MSBuildProjectName)</RootNamespace>
<Configuration Condition="'$(Configuration)' == ''">Debug</Configuration>
<Platform Condition="'$(Platform)' == ''">Win32</Platform>
- <SampleGuid>{767DF53C-6E68-4169-AD80-FB3D48818F9B}</SampleGuid>
+ <SampleGuid>{539E396E-305F-4FC0-A6E1-AF1512EDBD24}</SampleGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
diff --git a/filesys/miniFilter/scanner/filter/scanner.vcxproj.Filters b/filesys/miniFilter/scanner/filter/scanner.vcxproj.Filters
index c27a7abe..043528f2 100644
--- a/filesys/miniFilter/scanner/filter/scanner.vcxproj.Filters
+++ b/filesys/miniFilter/scanner/filter/scanner.vcxproj.Filters
@@ -3,19 +3,19 @@
<ItemGroup>
<Filter Include="Source Files">
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx;*</Extensions>
- <UniqueIdentifier>{E4572A93-5A55-4C6F-8F48-E2733C02A7AD}</UniqueIdentifier>
+ <UniqueIdentifier>{56B5EB3B-4AA0-436C-93AC-418233D15BDF}</UniqueIdentifier>
</Filter>
<Filter Include="Header Files">
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- <UniqueIdentifier>{24365CE1-3829-455B-96F0-F2EB7ED5A342}</UniqueIdentifier>
+ <UniqueIdentifier>{4420ECAF-874D-4553-92FB-1086047E495E}</UniqueIdentifier>
</Filter>
<Filter Include="Resource Files">
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms;man;xml</Extensions>
- <UniqueIdentifier>{6651233C-61D2-43E8-A29F-3C45DBDCE7CC}</UniqueIdentifier>
+ <UniqueIdentifier>{D03B20FA-A834-4D84-A495-72B451EBDE6D}</UniqueIdentifier>
</Filter>
<Filter Include="Driver Files">
<Extensions>inf;inv;inx;mof;mc;</Extensions>
- <UniqueIdentifier>{87D3BEF2-B470-499B-B232-4DD08E2178A6}</UniqueIdentifier>
+ <UniqueIdentifier>{86089863-95EA-4B07-90CC-D78CD1BE69F3}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
diff --git a/filesys/miniFilter/scanner/scanner.sln b/filesys/miniFilter/scanner/scanner.sln
index b761659b..e03f7317 100644
--- a/filesys/miniFilter/scanner/scanner.sln
+++ b/filesys/miniFilter/scanner/scanner.sln
@@ -3,13 +3,13 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0
MinimumVisualStudioVersion = 12.0
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Filter", "Filter", "{C50DADE3-B060-4E30-892B-C14675ACD024}"
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Filter", "Filter", "{6845BC64-C8CE-4E89-A239-6B57478F17B9}"
EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "User", "User", "{AB4A5F23-9E0F-46E9-9A2E-F9DB3646BEDD}"
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "User", "User", "{58B844BB-0779-4954-A7E5-E8F10C901E5E}"
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "scanner", "filter\scanner.vcxproj", "{405E5558-9053-4BC3-9FF4-760C3D487476}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "scanner", "filter\scanner.vcxproj", "{CDFBA2B4-F7A9-4910-A226-F558EE7315F5}"
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "scanuser", "user\scanuser.vcxproj", "{9F7E0E08-F370-462D-A8DD-885DB7B074A6}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "scanuser", "user\scanuser.vcxproj", "{85EC78BD-4D8B-4982-B635-9BE16674DD48}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -19,28 +19,28 @@ Global
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {405E5558-9053-4BC3-9FF4-760C3D487476}.Debug|Win32.ActiveCfg = Debug|Win32
- {405E5558-9053-4BC3-9FF4-760C3D487476}.Debug|Win32.Build.0 = Debug|Win32
- {405E5558-9053-4BC3-9FF4-760C3D487476}.Release|Win32.ActiveCfg = Release|Win32
- {405E5558-9053-4BC3-9FF4-760C3D487476}.Release|Win32.Build.0 = Release|Win32
- {405E5558-9053-4BC3-9FF4-760C3D487476}.Debug|x64.ActiveCfg = Debug|x64
- {405E5558-9053-4BC3-9FF4-760C3D487476}.Debug|x64.Build.0 = Debug|x64
- {405E5558-9053-4BC3-9FF4-760C3D487476}.Release|x64.ActiveCfg = Release|x64
- {405E5558-9053-4BC3-9FF4-760C3D487476}.Release|x64.Build.0 = Release|x64
- {9F7E0E08-F370-462D-A8DD-885DB7B074A6}.Debug|Win32.ActiveCfg = Debug|Win32
- {9F7E0E08-F370-462D-A8DD-885DB7B074A6}.Debug|Win32.Build.0 = Debug|Win32
- {9F7E0E08-F370-462D-A8DD-885DB7B074A6}.Release|Win32.ActiveCfg = Release|Win32
- {9F7E0E08-F370-462D-A8DD-885DB7B074A6}.Release|Win32.Build.0 = Release|Win32
- {9F7E0E08-F370-462D-A8DD-885DB7B074A6}.Debug|x64.ActiveCfg = Debug|x64
- {9F7E0E08-F370-462D-A8DD-885DB7B074A6}.Debug|x64.Build.0 = Debug|x64
- {9F7E0E08-F370-462D-A8DD-885DB7B074A6}.Release|x64.ActiveCfg = Release|x64
- {9F7E0E08-F370-462D-A8DD-885DB7B074A6}.Release|x64.Build.0 = Release|x64
+ {CDFBA2B4-F7A9-4910-A226-F558EE7315F5}.Debug|Win32.ActiveCfg = Debug|Win32
+ {CDFBA2B4-F7A9-4910-A226-F558EE7315F5}.Debug|Win32.Build.0 = Debug|Win32
+ {CDFBA2B4-F7A9-4910-A226-F558EE7315F5}.Release|Win32.ActiveCfg = Release|Win32
+ {CDFBA2B4-F7A9-4910-A226-F558EE7315F5}.Release|Win32.Build.0 = Release|Win32
+ {CDFBA2B4-F7A9-4910-A226-F558EE7315F5}.Debug|x64.ActiveCfg = Debug|x64
+ {CDFBA2B4-F7A9-4910-A226-F558EE7315F5}.Debug|x64.Build.0 = Debug|x64
+ {CDFBA2B4-F7A9-4910-A226-F558EE7315F5}.Release|x64.ActiveCfg = Release|x64
+ {CDFBA2B4-F7A9-4910-A226-F558EE7315F5}.Release|x64.Build.0 = Release|x64
+ {85EC78BD-4D8B-4982-B635-9BE16674DD48}.Debug|Win32.ActiveCfg = Debug|Win32
+ {85EC78BD-4D8B-4982-B635-9BE16674DD48}.Debug|Win32.Build.0 = Debug|Win32
+ {85EC78BD-4D8B-4982-B635-9BE16674DD48}.Release|Win32.ActiveCfg = Release|Win32
+ {85EC78BD-4D8B-4982-B635-9BE16674DD48}.Release|Win32.Build.0 = Release|Win32
+ {85EC78BD-4D8B-4982-B635-9BE16674DD48}.Debug|x64.ActiveCfg = Debug|x64
+ {85EC78BD-4D8B-4982-B635-9BE16674DD48}.Debug|x64.Build.0 = Debug|x64
+ {85EC78BD-4D8B-4982-B635-9BE16674DD48}.Release|x64.ActiveCfg = Release|x64
+ {85EC78BD-4D8B-4982-B635-9BE16674DD48}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
- {405E5558-9053-4BC3-9FF4-760C3D487476} = {C50DADE3-B060-4E30-892B-C14675ACD024}
- {9F7E0E08-F370-462D-A8DD-885DB7B074A6} = {AB4A5F23-9E0F-46E9-9A2E-F9DB3646BEDD}
+ {CDFBA2B4-F7A9-4910-A226-F558EE7315F5} = {6845BC64-C8CE-4E89-A239-6B57478F17B9}
+ {85EC78BD-4D8B-4982-B635-9BE16674DD48} = {58B844BB-0779-4954-A7E5-E8F10C901E5E}
EndGlobalSection
EndGlobal
diff --git a/filesys/miniFilter/scanner/user/scanUser.c b/filesys/miniFilter/scanner/user/scanUser.c
index da57b75c..e766261c 100644
--- a/filesys/miniFilter/scanner/user/scanUser.c
+++ b/filesys/miniFilter/scanner/user/scanUser.c
@@ -190,7 +190,7 @@ Return Value
break;
}
- printf( "Received message, size %d\n", pOvlp->InternalHigh );
+ printf( "Received message, size %Id\n", pOvlp->InternalHigh );
notification = &message->Notification;
diff --git a/filesys/miniFilter/scanner/user/scanuser.vcxproj b/filesys/miniFilter/scanner/user/scanuser.vcxproj
index c357ca88..c2421120 100644
--- a/filesys/miniFilter/scanner/user/scanuser.vcxproj
+++ b/filesys/miniFilter/scanner/user/scanuser.vcxproj
@@ -19,11 +19,11 @@
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
- <ProjectGuid>{9F7E0E08-F370-462D-A8DD-885DB7B074A6}</ProjectGuid>
+ <ProjectGuid>{85EC78BD-4D8B-4982-B635-9BE16674DD48}</ProjectGuid>
<RootNamespace>$(MSBuildProjectName)</RootNamespace>
<Configuration Condition="'$(Configuration)' == ''">Debug</Configuration>
<Platform Condition="'$(Platform)' == ''">Win32</Platform>
- <SampleGuid>{AFC074E2-1EBC-483A-9FC8-58096F057282}</SampleGuid>
+ <SampleGuid>{9CE4D10A-7741-49CE-B437-3EE38B7A1DB4}</SampleGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
diff --git a/filesys/miniFilter/scanner/user/scanuser.vcxproj.Filters b/filesys/miniFilter/scanner/user/scanuser.vcxproj.Filters
index cda88648..7599ccc8 100644
--- a/filesys/miniFilter/scanner/user/scanuser.vcxproj.Filters
+++ b/filesys/miniFilter/scanner/user/scanuser.vcxproj.Filters
@@ -3,15 +3,15 @@
<ItemGroup>
<Filter Include="Source Files">
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx;*</Extensions>
- <UniqueIdentifier>{2283E0B4-0268-4650-BE85-A2FA93908595}</UniqueIdentifier>
+ <UniqueIdentifier>{D5A4D49A-D6AE-4159-B919-7E13BED474C5}</UniqueIdentifier>
</Filter>
<Filter Include="Header Files">
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- <UniqueIdentifier>{A4F1A0C4-9F84-4903-892E-977BAF91917D}</UniqueIdentifier>
+ <UniqueIdentifier>{D08A6EDE-21C1-491E-A693-67FB47DB6E9D}</UniqueIdentifier>
</Filter>
<Filter Include="Resource Files">
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms;man;xml</Extensions>
- <UniqueIdentifier>{27540953-32D1-4CEB-9A26-1A00BA5A354B}</UniqueIdentifier>
+ <UniqueIdentifier>{52F79952-01DB-4878-8287-0A8B91178B37}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
diff --git a/filesys/miniFilter/simrep/simrep.c b/filesys/miniFilter/simrep/simrep.c
index 4daf17ca..3db3f15d 100644
--- a/filesys/miniFilter/simrep/simrep.c
+++ b/filesys/miniFilter/simrep/simrep.c
@@ -1730,7 +1730,6 @@ Return Value:
UNICODE_STRING newFileName;
struct {
- BOOLEAN ReplaceIfExists;
HANDLE RootDirectory;
ULONG FileNameLength;
PWSTR FileName;
@@ -1749,6 +1748,7 @@ Return Value:
switch (fileInfoClass) {
case FileRenameInformation:
+ case FileRenameInformationEx:
//
// Note: We should never see a rename of the mapping path \x\y itself
@@ -1759,7 +1759,12 @@ Return Value:
renameInfo = Cbd->Iopb->Parameters.SetFileInformation.InfoBuffer;
- setInfo.ReplaceIfExists = renameInfo->ReplaceIfExists;
+ //
+ // Accessing ReplaceIfExists -
+ // Using FileRenameInformation - renameInfo->ReplaceIfExists
+ // Using FileRenameInformationEx - FlagOn( renameInfo->Flags, FILE_RENAME_REPLACE_IF_EXISTS )
+ //
+
setInfo.RootDirectory = renameInfo->RootDirectory;
setInfo.FileNameLength = renameInfo->FileNameLength;
setInfo.FileName = renameInfo->FileName;
@@ -1770,7 +1775,8 @@ Return Value:
linkInfo = Cbd->Iopb->Parameters.SetFileInformation.InfoBuffer;
- setInfo.ReplaceIfExists = linkInfo->ReplaceIfExists;
+ // Accessing ReplaceIfExists - linkInfo->ReplaceIfExists
+
setInfo.RootDirectory = linkInfo->RootDirectory;
setInfo.FileNameLength = linkInfo->FileNameLength;
setInfo.FileName = linkInfo->FileName;
@@ -1815,6 +1821,7 @@ Return Value:
case FileIdFullDirectoryInformation: // 38
case FileValidDataLengthInformation: // 39
case FileShortNameInformation: // 40
+ case FileDispositionInformationEx: // 64
goto SimRepPreSetInformationCleanup;
@@ -1928,7 +1935,8 @@ Return Value:
// destination from FLT_GET_DESTINATION_FILE_NAME_INFORMATION.
//
- if (fileInfoClass == FileRenameInformation) {
+ if ((fileInfoClass == FileRenameInformation) ||
+ (fileInfoClass == FileRenameInformationEx)) {
bufferLength = FIELD_OFFSET( FILE_RENAME_INFORMATION, FileName ) + newFileName.Length;
@@ -1942,7 +1950,7 @@ Return Value:
newRenameInfo = (PFILE_RENAME_INFORMATION)buffer;
- newRenameInfo->ReplaceIfExists = renameInfo->ReplaceIfExists;
+ newRenameInfo->Flags = renameInfo->Flags;
newRenameInfo->RootDirectory = NULL;
newRenameInfo->FileNameLength = newFileName.Length;
diff --git a/filesys/miniFilter/simrep/simrep.sln b/filesys/miniFilter/simrep/simrep.sln
index 820fab27..eacfb5a7 100644
--- a/filesys/miniFilter/simrep/simrep.sln
+++ b/filesys/miniFilter/simrep/simrep.sln
@@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0
MinimumVisualStudioVersion = 12.0
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "simrep", "simrep.vcxproj", "{EC584CEA-EE54-4673-9934-2E77A90EC210}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "simrep", "simrep.vcxproj", "{E007014C-F23C-4E49-A483-D3AE86B8B988}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -13,14 +13,14 @@ Global
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {EC584CEA-EE54-4673-9934-2E77A90EC210}.Debug|Win32.ActiveCfg = Debug|Win32
- {EC584CEA-EE54-4673-9934-2E77A90EC210}.Debug|Win32.Build.0 = Debug|Win32
- {EC584CEA-EE54-4673-9934-2E77A90EC210}.Release|Win32.ActiveCfg = Release|Win32
- {EC584CEA-EE54-4673-9934-2E77A90EC210}.Release|Win32.Build.0 = Release|Win32
- {EC584CEA-EE54-4673-9934-2E77A90EC210}.Debug|x64.ActiveCfg = Debug|x64
- {EC584CEA-EE54-4673-9934-2E77A90EC210}.Debug|x64.Build.0 = Debug|x64
- {EC584CEA-EE54-4673-9934-2E77A90EC210}.Release|x64.ActiveCfg = Release|x64
- {EC584CEA-EE54-4673-9934-2E77A90EC210}.Release|x64.Build.0 = Release|x64
+ {E007014C-F23C-4E49-A483-D3AE86B8B988}.Debug|Win32.ActiveCfg = Debug|Win32
+ {E007014C-F23C-4E49-A483-D3AE86B8B988}.Debug|Win32.Build.0 = Debug|Win32
+ {E007014C-F23C-4E49-A483-D3AE86B8B988}.Release|Win32.ActiveCfg = Release|Win32
+ {E007014C-F23C-4E49-A483-D3AE86B8B988}.Release|Win32.Build.0 = Release|Win32
+ {E007014C-F23C-4E49-A483-D3AE86B8B988}.Debug|x64.ActiveCfg = Debug|x64
+ {E007014C-F23C-4E49-A483-D3AE86B8B988}.Debug|x64.Build.0 = Debug|x64
+ {E007014C-F23C-4E49-A483-D3AE86B8B988}.Release|x64.ActiveCfg = Release|x64
+ {E007014C-F23C-4E49-A483-D3AE86B8B988}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/filesys/miniFilter/simrep/simrep.vcxproj b/filesys/miniFilter/simrep/simrep.vcxproj
index c5f59320..3bc8d1da 100644
--- a/filesys/miniFilter/simrep/simrep.vcxproj
+++ b/filesys/miniFilter/simrep/simrep.vcxproj
@@ -19,11 +19,11 @@
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
- <ProjectGuid>{EC584CEA-EE54-4673-9934-2E77A90EC210}</ProjectGuid>
+ <ProjectGuid>{E007014C-F23C-4E49-A483-D3AE86B8B988}</ProjectGuid>
<RootNamespace>$(MSBuildProjectName)</RootNamespace>
<Configuration Condition="'$(Configuration)' == ''">Debug</Configuration>
<Platform Condition="'$(Platform)' == ''">Win32</Platform>
- <SampleGuid>{E984D0ED-160E-4FD6-BEF1-1757750C5048}</SampleGuid>
+ <SampleGuid>{C81FEAC2-1F94-45CB-BED1-670C90145D61}</SampleGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
diff --git a/filesys/miniFilter/simrep/simrep.vcxproj.Filters b/filesys/miniFilter/simrep/simrep.vcxproj.Filters
index 6164fa35..5020e8e2 100644
--- a/filesys/miniFilter/simrep/simrep.vcxproj.Filters
+++ b/filesys/miniFilter/simrep/simrep.vcxproj.Filters
@@ -3,19 +3,19 @@
<ItemGroup>
<Filter Include="Source Files">
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx;*</Extensions>
- <UniqueIdentifier>{27314838-BE3C-4784-A1B3-F9602A9963E7}</UniqueIdentifier>
+ <UniqueIdentifier>{D32E9355-EB79-4170-900D-068997E9B1B1}</UniqueIdentifier>
</Filter>
<Filter Include="Header Files">
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- <UniqueIdentifier>{015E9141-968D-497D-92A0-A3A5E9AC9E79}</UniqueIdentifier>
+ <UniqueIdentifier>{EDD908F5-A7A3-4D70-BFBC-64ABC3DB5F3F}</UniqueIdentifier>
</Filter>
<Filter Include="Resource Files">
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms;man;xml</Extensions>
- <UniqueIdentifier>{9711FBE9-3E19-4FA7-B349-84AF2E4CF11C}</UniqueIdentifier>
+ <UniqueIdentifier>{87B836AE-66FA-41ED-A411-C2065BDBF404}</UniqueIdentifier>
</Filter>
<Filter Include="Driver Files">
<Extensions>inf;inv;inx;mof;mc;</Extensions>
- <UniqueIdentifier>{86BE30D7-22F0-413F-AE02-B4D5A5104ED8}</UniqueIdentifier>
+ <UniqueIdentifier>{F2A59718-BA87-4522-8863-8827FB568F1E}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
diff --git a/filesys/miniFilter/swapBuffers/swapBuffers.sln b/filesys/miniFilter/swapBuffers/swapBuffers.sln
index 4da41d0a..75941f53 100644
--- a/filesys/miniFilter/swapBuffers/swapBuffers.sln
+++ b/filesys/miniFilter/swapBuffers/swapBuffers.sln
@@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0
MinimumVisualStudioVersion = 12.0
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "swapBuffers", "swapBuffers.vcxproj", "{BA465874-4CF2-44E3-915C-025AA92540DF}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "swapBuffers", "swapBuffers.vcxproj", "{85E4144B-986D-4B01-BA1C-2536DCF175DD}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -13,14 +13,14 @@ Global
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {BA465874-4CF2-44E3-915C-025AA92540DF}.Debug|Win32.ActiveCfg = Debug|Win32
- {BA465874-4CF2-44E3-915C-025AA92540DF}.Debug|Win32.Build.0 = Debug|Win32
- {BA465874-4CF2-44E3-915C-025AA92540DF}.Release|Win32.ActiveCfg = Release|Win32
- {BA465874-4CF2-44E3-915C-025AA92540DF}.Release|Win32.Build.0 = Release|Win32
- {BA465874-4CF2-44E3-915C-025AA92540DF}.Debug|x64.ActiveCfg = Debug|x64
- {BA465874-4CF2-44E3-915C-025AA92540DF}.Debug|x64.Build.0 = Debug|x64
- {BA465874-4CF2-44E3-915C-025AA92540DF}.Release|x64.ActiveCfg = Release|x64
- {BA465874-4CF2-44E3-915C-025AA92540DF}.Release|x64.Build.0 = Release|x64
+ {85E4144B-986D-4B01-BA1C-2536DCF175DD}.Debug|Win32.ActiveCfg = Debug|Win32
+ {85E4144B-986D-4B01-BA1C-2536DCF175DD}.Debug|Win32.Build.0 = Debug|Win32
+ {85E4144B-986D-4B01-BA1C-2536DCF175DD}.Release|Win32.ActiveCfg = Release|Win32
+ {85E4144B-986D-4B01-BA1C-2536DCF175DD}.Release|Win32.Build.0 = Release|Win32
+ {85E4144B-986D-4B01-BA1C-2536DCF175DD}.Debug|x64.ActiveCfg = Debug|x64
+ {85E4144B-986D-4B01-BA1C-2536DCF175DD}.Debug|x64.Build.0 = Debug|x64
+ {85E4144B-986D-4B01-BA1C-2536DCF175DD}.Release|x64.ActiveCfg = Release|x64
+ {85E4144B-986D-4B01-BA1C-2536DCF175DD}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/filesys/miniFilter/swapBuffers/swapBuffers.vcxproj b/filesys/miniFilter/swapBuffers/swapBuffers.vcxproj
index 9e6aae5a..f70162d3 100644
--- a/filesys/miniFilter/swapBuffers/swapBuffers.vcxproj
+++ b/filesys/miniFilter/swapBuffers/swapBuffers.vcxproj
@@ -19,11 +19,11 @@
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
- <ProjectGuid>{BA465874-4CF2-44E3-915C-025AA92540DF}</ProjectGuid>
+ <ProjectGuid>{85E4144B-986D-4B01-BA1C-2536DCF175DD}</ProjectGuid>
<RootNamespace>$(MSBuildProjectName)</RootNamespace>
<Configuration Condition="'$(Configuration)' == ''">Debug</Configuration>
<Platform Condition="'$(Platform)' == ''">Win32</Platform>
- <SampleGuid>{5B91FF85-2F51-495B-A642-4BBC6954AB83}</SampleGuid>
+ <SampleGuid>{740DFB1D-45E5-406F-BBB6-4AF0E6C30DBA}</SampleGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
diff --git a/filesys/miniFilter/swapBuffers/swapBuffers.vcxproj.Filters b/filesys/miniFilter/swapBuffers/swapBuffers.vcxproj.Filters
index c2817dd1..0685d0ed 100644
--- a/filesys/miniFilter/swapBuffers/swapBuffers.vcxproj.Filters
+++ b/filesys/miniFilter/swapBuffers/swapBuffers.vcxproj.Filters
@@ -3,19 +3,19 @@
<ItemGroup>
<Filter Include="Source Files">
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx;*</Extensions>
- <UniqueIdentifier>{159547E7-C82E-4A51-A93D-C8DE79977FEE}</UniqueIdentifier>
+ <UniqueIdentifier>{C7B744F5-D8E3-44AF-B03B-3F3CD4420654}</UniqueIdentifier>
</Filter>
<Filter Include="Header Files">
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- <UniqueIdentifier>{AB3B367F-927B-4FA4-8067-72568D0512C0}</UniqueIdentifier>
+ <UniqueIdentifier>{FC5D5051-223C-4C4F-83DF-26C02D84A949}</UniqueIdentifier>
</Filter>
<Filter Include="Resource Files">
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms;man;xml</Extensions>
- <UniqueIdentifier>{E0EC87A0-D8CE-4087-AD03-3E0C756787BC}</UniqueIdentifier>
+ <UniqueIdentifier>{C06B2AEB-030A-415F-9470-EAE415E74AAC}</UniqueIdentifier>
</Filter>
<Filter Include="Driver Files">
<Extensions>inf;inv;inx;mof;mc;</Extensions>
- <UniqueIdentifier>{8D4C070B-DBC0-4CCB-9D2D-2FF993AA33E5}</UniqueIdentifier>
+ <UniqueIdentifier>{34BC5A6E-3317-4C17-B297-7E2C99187FBC}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>