Windows: Enforce Share Access
[openafs.git] / src / WINNT / afsrdr / kernel / lib / AFSCleanup.cpp
index c56faf4..527c675 100644 (file)
@@ -108,6 +108,8 @@ AFSCleanup( IN PDEVICE_OBJECT LibDeviceObject,
 
         stFileCleanup.ProcessId = (ULONGLONG)PsGetCurrentProcessId();
 
+        stFileCleanup.Identifier = (ULONGLONG)pFileObject;
+
         //
         // Perform the cleanup functionality depending on the type of node it is
         //
@@ -359,6 +361,12 @@ AFSCleanup( IN PDEVICE_OBJECT LibDeviceObject,
                     ulNotificationFlags |= AFS_REQUEST_FLAG_FILE_DELETED;
 
                     //
+                    // Indicate the file access mode that is being released
+                    //
+
+                    stFileCleanup.FileAccess = pCcb->FileAccess;
+
+                    //
                     // Push the request to the service
                     //
 
@@ -521,6 +529,12 @@ AFSCleanup( IN PDEVICE_OBJECT LibDeviceObject,
                     }
 
                     //
+                    // Indicate the file access mode that is being released
+                    //
+
+                    stFileCleanup.FileAccess = pCcb->FileAccess;
+
+                    //
                     // Push the request to the service
                     //
 
@@ -683,6 +697,12 @@ AFSCleanup( IN PDEVICE_OBJECT LibDeviceObject,
                     ulNotificationFlags |= AFS_REQUEST_FLAG_FILE_DELETED;
 
                     //
+                    // Indicate the file access mode that is being released
+                    //
+
+                    stFileCleanup.FileAccess = pCcb->FileAccess;
+
+                    //
                     // Push the request to the service
                     //
 
@@ -785,6 +805,12 @@ AFSCleanup( IN PDEVICE_OBJECT LibDeviceObject,
                         }
                     }
 
+                    //
+                    // Indicate the file access mode that is being released
+                    //
+
+                    stFileCleanup.FileAccess = pCcb->FileAccess;
+
                     AFSProcessRequest( AFS_REQUEST_TYPE_CLEANUP_PROCESSING,
                                        ulNotificationFlags | AFS_REQUEST_FLAG_SYNCHRONOUS,
                                        &pFcb->AuthGroup,
@@ -936,6 +962,12 @@ AFSCleanup( IN PDEVICE_OBJECT LibDeviceObject,
                     ulNotificationFlags |= AFS_REQUEST_FLAG_FILE_DELETED;
 
                     //
+                    // Indicate the file access mode that is being released
+                    //
+
+                    stFileCleanup.FileAccess = pCcb->FileAccess;
+
+                    //
                     // Push the request to the service
                     //
 
@@ -1038,6 +1070,12 @@ AFSCleanup( IN PDEVICE_OBJECT LibDeviceObject,
                         }
                     }
 
+                    //
+                    // Indicate the file access mode that is being released
+                    //
+
+                    stFileCleanup.FileAccess = pCcb->FileAccess;
+
                     AFSProcessRequest( AFS_REQUEST_TYPE_CLEANUP_PROCESSING,
                                        ulNotificationFlags | AFS_REQUEST_FLAG_SYNCHRONOUS,
                                        &pFcb->AuthGroup,