From dac252ecb42fb17c2f3f2deb559262514b58e990 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Tue, 12 Dec 2017 15:15:02 +0100 Subject: [PATCH] ntdll: Only require MAP_SHARED for writable mappings. Signed-off-by: Alexandre Julliard --- dlls/ntdll/virtual.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c index 1156fc17074..22965d01ee1 100644 --- a/dlls/ntdll/virtual.c +++ b/dlls/ntdll/virtual.c @@ -1146,7 +1146,7 @@ static NTSTATUS map_file_into_view( struct file_view *view, int fd, size_t start { void *ptr; int prot = VIRTUAL_GetUnixProt( vprot | VPROT_COMMITTED /* make sure it is accessible */ ); - unsigned int flags = MAP_FIXED | ((vprot & VPROT_WRITECOPY) ? MAP_PRIVATE : MAP_SHARED); + unsigned int flags = MAP_FIXED | ((vprot & VPROT_WRITE) ? MAP_SHARED : MAP_PRIVATE); assert( start < view->size ); assert( start + size <= view->size );