Windows: log FSCTL_CSC_INTERNAL requests
authorPeter Scott <pscott@kerneldrivers.com>
Mon, 31 Oct 2011 22:05:31 +0000 (18:05 -0400)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Tue, 1 Nov 2011 14:49:39 +0000 (07:49 -0700)
FSCTL_CSC_INTERNAL requests are not supported and will
return STATUS_INVALID_DEVICE_REQUEST.  However, log them
for easier debugging.

FSCTL_CSC_INTERNAL is defined in ntifs.h only for
Vista and above.  Since afsredir is built for XP
and above its value must be conditionally defined
by us.

Change-Id: I39cf1f9d068d28ab6c9267c302d49feece6af700
Reviewed-on: http://gerrit.openafs.org/5773
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>

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

index 05cda83..546cd0e 100644 (file)
@@ -284,6 +284,20 @@ AFSProcessUserFsRequest( IN PIRP Irp)
                 break;
             }
 
+#ifndef FSCTL_CSC_INTERNAL
+#define FSCTL_CSC_INTERNAL                  CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 107, METHOD_NEITHER, FILE_ANY_ACCESS)
+#endif
+            case FSCTL_CSC_INTERNAL:
+            {
+                AFSDbgLogMsg( AFS_SUBSYSTEM_FILE_PROCESSING,
+                              AFS_TRACE_LEVEL_VERBOSE_2,
+                              "AFSProcessUserFsRequest Processing FSCTL_CSC_INTERNAL request\n");
+
+                ntStatus = STATUS_INVALID_DEVICE_REQUEST;
+
+                break;
+            }
+
             case FSCTL_GET_REPARSE_POINT:
             {