[issue15762] Windows 8 certification

2012-08-22 Thread Aaron Galea

New submission from Aaron Galea:

Hi

We have an application created with python2.7 and created into an executable 
using py2exe. However we are getting an issue with Windows 8 certification due 
to compiler parameters. We would like to have this application Windows 8 
certified but we can't get pass the following warning:
===
Windows security features test 


WARNING 
Binary analyzer
•
Warning: The binary analyzer test detected the following errors: 
◦File C:\Program Files (x86)\TestApp\test.exe has failed the DBCheck check.
◦File C:\Program Files (x86)\TestApp\test.exe has failed the NXCheck check.

•
Impact if not fixed: If the app doesn’t use the available Windows protections, 
it can increase the vulnerability of customer's computer to malware. 

•
How to fix: Apply the SAFESEH, DYNAMICBASE, and NXCOMPAT options when you link 
the app. See link below for more information:
Fixing Binary Analyzer Errors 



In order to fix this issue I had to modify the file msvc9compiler.py by 
changing the following line from:

self.ldflags_shared = ['/DLL', '/nologo', '/INCREMENTAL:NO']

to

self.ldflags_shared = ['/DLL', '/nologo', '/INCREMENTAL:NO', '/DYNAMICBASE', 
'/SAFESEH', '/NXCOMPAT']

and rebuild py2exe. Once I have done this the test passed.

I could go about it by having local patch available to my team but preferably I 
try to avoid patching the standard python modules.

My question is if there is another way to do this? and whether it would be a 
good idea to include these flags in future distutils?

--
assignee: eric.araujo
components: Distutils
messages: 168859
nosy: agale031176, eric.araujo, tarek
priority: normal
severity: normal
status: open
title: Windows 8 certification
type: enhancement
versions: Python 2.7

___
Python tracker 
<http://bugs.python.org/issue15762>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15762] Windows 8 certification

2012-08-24 Thread Aaron Galea

Aaron Galea added the comment:

Its a distutils issue not py2exe. Not sure where I should post about this 
problem. 

The change I applied was in msvc9compiler.py in distutils. Once this change has 
been applied py2exe was rebuild to generate the correct runw.exe with the 
correct settings in the PE header of the executable.

--

___
Python tracker 
<http://bugs.python.org/issue15762>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com