Author: pschweitzer
Date: Thu Nov 27 20:28:50 2014
New Revision: 65508
URL:
http://svn.reactos.org/svn/reactos?rev=65508&view=rev
Log:
[FASTFAT]
Properly handle shared accesses on volume open.
No need to add the support for this in cleanup, it was already there.
Modified:
trunk/reactos/drivers/filesystems/fastfat/create.c
Modified: trunk/reactos/drivers/filesystems/fastfat/create.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/fastfa…
==============================================================================
--- trunk/reactos/drivers/filesystems/fastfat/create.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/fastfat/create.c [iso-8859-1] Thu Nov 27 20:28:50
2014
@@ -503,6 +503,27 @@
}
pFcb = DeviceExt->VolumeFcb;
+
+ if (pFcb->OpenHandleCount == 0)
+ {
+
IoSetShareAccess(Stack->Parameters.Create.SecurityContext->DesiredAccess,
+ Stack->Parameters.Create.ShareAccess,
+ FileObject,
+ &pFcb->FCBShareAccess);
+ }
+ else
+ {
+ Status =
IoCheckShareAccess(Stack->Parameters.Create.SecurityContext->DesiredAccess,
+ Stack->Parameters.Create.ShareAccess,
+ FileObject,
+ &pFcb->FCBShareAccess,
+ FALSE);
+ if (!NT_SUCCESS(Status))
+ {
+ return Status;
+ }
+ }
+
vfatAttachFCBToFileObject(DeviceExt, pFcb, FileObject);
DeviceExt->OpenHandleCount++;