Alexandre Julliard : ntdll: Print a warning when failing to set execute permissions on a section.

Alexandre Julliard julliard at winehq.org
Wed Jun 16 13:23:21 CDT 2010


Module: wine
Branch: master
Commit: b9a13d6d819ac265b1a75005045b42edfecfb704
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=b9a13d6d819ac265b1a75005045b42edfecfb704

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Wed Jun 16 20:06:47 2010 +0200

ntdll: Print a warning when failing to set execute permissions on a section.

---

 dlls/ntdll/virtual.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c
index 23a5d4c..84427fb 100644
--- a/dlls/ntdll/virtual.c
+++ b/dlls/ntdll/virtual.c
@@ -1285,7 +1285,9 @@ static NTSTATUS map_image( HANDLE hmapping, int fd, char *base, SIZE_T total_siz
             (nt->OptionalHeader.AddressOfEntryPoint < sec->VirtualAddress + size))
             vprot |= VPROT_EXEC;
 
-        VIRTUAL_SetProt( view, ptr + sec->VirtualAddress, size, vprot );
+        if (!VIRTUAL_SetProt( view, ptr + sec->VirtualAddress, size, vprot ) && (vprot & VPROT_EXEC))
+            ERR( "failed to set %08x protection on section %.8s, noexec filesystem?\n",
+                 sec->Characteristics, sec->Name );
     }
 
  done:




More information about the wine-cvs mailing list