forked from Mirrors/wine-wine
ntdll: Report a failed executable mmap on nonexec filesystems.
parent
a2af7ccd99
commit
e7cb2d35f0
|
@ -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)
|
if (mmap( (char *)view->base + start, size, prot, flags, fd, offset ) != (void *)-1)
|
||||||
goto done;
|
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 */
|
/* mmap() failed; if this is because the file offset is not */
|
||||||
/* page-aligned (EINVAL), or because the underlying filesystem */
|
/* page-aligned (EINVAL), or because the underlying filesystem */
|
||||||
/* does not support mmap() (ENOEXEC,ENODEV), we do it by hand. */
|
/* does not support mmap() (ENOEXEC,ENODEV), we do it by hand. */
|
||||||
|
|
Loading…
Reference in New Issue