[BTRFS] Import BTRFS upstream commit e43183a0 "open_file: set granted_access when...
authorMark Harmstone <mark@harmstone.com>
Sun, 11 Nov 2018 18:47:35 +0000 (18:47 +0000)
committerHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Sun, 11 Nov 2018 20:47:29 +0000 (21:47 +0100)
Better solution for the original problem described at:
https://github.com/maharmstone/btrfs/pull/123

drivers/filesystems/btrfs/create.c

index 39fbf09..4c4c5dd 100644 (file)
@@ -3557,6 +3557,7 @@ static NTSTATUS open_file(PDEVICE_OBJECT DeviceObject, _Requires_lock_held_(_Cur
         release_fcb_lock(Vcb);
 
         Irp->IoStatus.Information = NT_SUCCESS(Status) ? FILE_CREATED : 0;
+        granted_access = IrpSp->Parameters.Create.SecurityContext->DesiredAccess;
     }
 
     if (NT_SUCCESS(Status) && !(options & FILE_NO_INTERMEDIATE_BUFFERING))