Windows: FSCTL_SET_PURGE_FAILURE_MODE
authorPeter Scott <pscott@kerneldrivers.com>
Mon, 6 Aug 2012 19:15:57 +0000 (15:15 -0400)
committerJeffrey Altman <jaltman@your-file-system.com>
Fri, 10 Aug 2012 22:41:46 +0000 (15:41 -0700)
Windows 8 adds FSCTL_SET_PURGE_FAILURE_MODE.  Failure to respond
with success prevents anti-virus filters from scanning the file
system.  For now just return success.

Change-Id: Ibb4822e1a9db13912980f4100519b69f9bff9a75
Reviewed-on: http://gerrit.openafs.org/7947
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

src/WINNT/afsrdr/kernel/lib/AFSFSControl.cpp

index 6715c95..a67e504 100644 (file)
@@ -683,7 +683,24 @@ AFSProcessUserFsRequest( IN PIRP Irp)
                 break;
             }
 
+#ifndef FSCTL_SET_PURGE_FAILURE_MODE
+#define FSCTL_SET_PURGE_FAILURE_MODE        CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 156, METHOD_BUFFERED, FILE_ANY_ACCESS)
+#endif
+
+            case FSCTL_SET_PURGE_FAILURE_MODE:
+            {
+
+                //
+                // For the time being just succeed this call
+                //
+
+                ntStatus = STATUS_SUCCESS;
+
+                break;
+            }
+
             default :
+            {
 
                 AFSDbgLogMsg( AFS_SUBSYSTEM_FILE_PROCESSING,
                               AFS_TRACE_LEVEL_VERBOSE_2,
@@ -692,6 +709,7 @@ AFSProcessUserFsRequest( IN PIRP Irp)
                 ntStatus = STATUS_INVALID_DEVICE_REQUEST;
 
                 break;
+            }
         }
 
 try_exit: