Add the SYNCHRONIZE flag to the DesiredAccess parameter when using the flags FILE_SYN...
authorHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Fri, 19 Jul 2013 15:05:28 +0000 (15:05 +0000)
committerHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Fri, 19 Jul 2013 15:05:28 +0000 (15:05 +0000)
commit072209491b40c47a468cf8c3b67266205ce615bf
tree13848ad765c01e49193f940a37e1a4870c70fa61
parent29dcad6c4e750e06546b9c9e1588294090b92c2c
Add the SYNCHRONIZE flag to the DesiredAccess parameter when using the flags FILE_SYNCHRONOUS_IO_(NON)ALERT in NtCreateFile or NtOpenFile, even if one uses DesiredAccess == GENERIC_xxx (which should map to some FILE_GENERIC_xxx already containing the SYNCHRONIZE flag).
Indeed, it appears after extended testing that, when calling from user-mode, Windows checks the real presence of the SYNCHRONIZE flag when using FILE_SYNCHRONOUS_IO_(NON)ALERT even if we pass any of the GENERIC_xxx access flags...

Otherwise, when using FILE_GENERIC_(READ/WRITE) flags directly, there is no need to add the SYNCHRONIZE flag since it is already incorporated in it.

See CORE-7361 for more details.

svn path=/trunk/; revision=59514
reactos/dll/win32/kernel32/client/file/create.c
reactos/dll/win32/kernel32/client/file/npipe.c
reactos/dll/win32/kernel32/client/file/volume.c
reactos/dll/win32/ntmarta/ntmarta.c
reactos/lib/rtl/actctx.c
reactos/ntoskrnl/io/iomgr/bootlog.c
reactos/ntoskrnl/io/iomgr/ramdisk.c
reactos/ntoskrnl/kdbg/kdb_cli.c
reactos/ntoskrnl/kdbg/kdb_symbols.c