Module: wine Branch: master Commit: e7cb2d35f0bac1f4e9c7969e66e3013118802279 URL: http://source.winehq.org/git/wine.git/?a=commit;h=e7cb2d35f0bac1f4e9c7969e66... Author: Marcus Meissner <meissner(a)suse.de> Date: Fri Dec 10 15:51:43 2010 +0100 ntdll: Report a failed executable mmap on nonexec filesystems. --- dlls/ntdll/virtual.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c index d7a04c3..6f8b9a3 100644 --- a/dlls/ntdll/virtual.c +++ b/dlls/ntdll/virtual.c @@ -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. */