Commit 03993b45 authored by Alexandre Julliard's avatar Alexandre Julliard

ntdll: Also check for EACCES to detect noexec failures.

parent 2e364d25
...@@ -1177,6 +1177,7 @@ static NTSTATUS map_file_into_view( struct file_view *view, int fd, size_t start ...@@ -1177,6 +1177,7 @@ static NTSTATUS map_file_into_view( struct file_view *view, int fd, size_t start
return STATUS_NOT_SUPPORTED; return STATUS_NOT_SUPPORTED;
} }
break; break;
case EACCES:
case EPERM: /* noexec filesystem, fall back to read() */ case EPERM: /* noexec filesystem, fall back to read() */
if (flags & MAP_SHARED) if (flags & MAP_SHARED)
{ {
...@@ -1334,6 +1335,7 @@ static NTSTATUS map_pe_header( void *ptr, size_t size, int fd, BOOL *removable ) ...@@ -1334,6 +1335,7 @@ static NTSTATUS map_pe_header( void *ptr, size_t size, int fd, BOOL *removable )
switch (errno) switch (errno)
{ {
case EPERM: case EPERM:
case EACCES:
WARN( "noexec file system, falling back to read\n" ); WARN( "noexec file system, falling back to read\n" );
break; break;
case ENOEXEC: case ENOEXEC:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment