Commit e7cb2d35 authored by Marcus Meissner's avatar Marcus Meissner Committed by Alexandre Julliard

ntdll: Report a failed executable mmap on nonexec filesystems.

parent a2af7ccd
......@@ -877,6 +877,9 @@ static NTSTATUS map_file_into_view( struct file_view *view, int fd, size_t start
if (mmap( (char *)view->base + start, size, prot, flags, fd, offset ) != (void *)-1)
goto done;
if ((errno == EPERM) && (prot & PROT_EXEC))
ERR( "failed to set %08x protection on file map, noexec filesystem?\n", prot );
/* mmap() failed; if this is because the file offset is not */
/* page-aligned (EINVAL), or because the underlying filesystem */
/* does not support mmap() (ENOEXEC,ENODEV), we do it by hand. */
......
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