From 03993b456c386cf2f26afe267da83d04302ac984 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Fri, 17 Nov 2017 11:54:57 +0100 Subject: [PATCH] ntdll: Also check for EACCES to detect noexec failures. Signed-off-by: Alexandre Julliard --- dlls/ntdll/virtual.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c index 9cec8727f5c..ab270779b1c 100644 --- a/dlls/ntdll/virtual.c +++ b/dlls/ntdll/virtual.c @@ -1177,6 +1177,7 @@ static NTSTATUS map_file_into_view( struct file_view *view, int fd, size_t start return STATUS_NOT_SUPPORTED; } break; + case EACCES: case EPERM: /* noexec filesystem, fall back to read() */ if (flags & MAP_SHARED) { @@ -1334,6 +1335,7 @@ static NTSTATUS map_pe_header( void *ptr, size_t size, int fd, BOOL *removable ) switch (errno) { case EPERM: + case EACCES: WARN( "noexec file system, falling back to read\n" ); break; case ENOEXEC: -- 2.11.4.GIT