[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH][xeniface] Fix compiler options
Adds '/ZH:SHA_256' '/CETCOMPAT' '/sdl' to compiler and '/SafeSEH' to x86 linker command lines These changes were prompted by binskim https://github.com/microsoft/binskim Note: Rule BA2004 (Warning_NativeWithInsecureStaticLibraryCompilands) is still reported for xeniface_coinst.dll, xencontrol.dll and xenagent.exe Signed-off-by: Owen Smith <owen.smith@xxxxxxxxxx> --- vs2019/xenagent/xenagent.vcxproj | 3 +++ vs2019/xencontrol/xencontrol.vcxproj | 3 +++ vs2019/xeniface/xeniface.vcxproj | 8 +++++++- vs2019/xeniface_coinst/xeniface_coinst.vcxproj | 3 +++ 4 files changed, 16 insertions(+), 1 deletion(-) diff --git a/vs2019/xenagent/xenagent.vcxproj b/vs2019/xenagent/xenagent.vcxproj index 1076c81..02b7b65 100644 --- a/vs2019/xenagent/xenagent.vcxproj +++ b/vs2019/xenagent/xenagent.vcxproj @@ -22,6 +22,8 @@ </PropertyGroup> <ItemDefinitionGroup> <ClCompile> + <AdditionalOptions>/ZH:SHA_256 %(AdditionalOptions)</AdditionalOptions> + <SDLCheck>true</SDLCheck> <AdditionalIncludeDirectories>$(SolutionDir)..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions>PROJECT=$(ProjectName);WIN32;_WINDOWS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <WarningLevel>EnableAllWarnings</WarningLevel> @@ -33,6 +35,7 @@ </ClCompile> <Link> <AdditionalDependencies>powrprof.lib;%(AdditionalDependencies)</AdditionalDependencies> + <CETCompat>true</CETCompat> </Link> <ResourceCompile> <AdditionalIncludeDirectories>$(SolutionDir)..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> diff --git a/vs2019/xencontrol/xencontrol.vcxproj b/vs2019/xencontrol/xencontrol.vcxproj index 36383d8..5474ceb 100644 --- a/vs2019/xencontrol/xencontrol.vcxproj +++ b/vs2019/xencontrol/xencontrol.vcxproj @@ -19,6 +19,8 @@ </PropertyGroup> <ItemDefinitionGroup> <ClCompile> + <AdditionalOptions>/ZH:SHA_256 %(AdditionalOptions)</AdditionalOptions> + <SDLCheck>true</SDLCheck> <AdditionalIncludeDirectories>$(SolutionDir)..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions>WIN32;_WINDOWS;_USRDLL;XENCONTROL_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <WarningLevel>EnableAllWarnings</WarningLevel> @@ -32,6 +34,7 @@ </ClCompile> <Link> <AdditionalDependencies>setupapi.lib;ws2_32.lib;shlwapi.lib;wtsapi32.lib;userenv.lib;version.lib;ntdll.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;%(AdditionalDependencies)</AdditionalDependencies> + <CETCompat>true</CETCompat> </Link> <ResourceCompile> <AdditionalIncludeDirectories>$(SolutionDir)..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> diff --git a/vs2019/xeniface/xeniface.vcxproj b/vs2019/xeniface/xeniface.vcxproj index 7e6b79d..b9756dd 100644 --- a/vs2019/xeniface/xeniface.vcxproj +++ b/vs2019/xeniface/xeniface.vcxproj @@ -19,6 +19,7 @@ </PropertyGroup> <ItemDefinitionGroup> <ClCompile> + <AdditionalOptions>/ZH:SHA_256 %(AdditionalOptions)</AdditionalOptions> <AdditionalIncludeDirectories>$(WindowsSdkDir)\include\km;..\..\include;</AdditionalIncludeDirectories> <PreprocessorDefinitions>PROJECT=$(ProjectName);POOL_NX_OPTIN=1;NT_PROCESSOR_GROUPS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <IntrinsicFunctions>true</IntrinsicFunctions> @@ -30,7 +31,6 @@ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> </ResourceCompile> <Link> - <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers> <AdditionalDependencies>$(DDK_LIB_PATH)\ntstrsafe.lib;$(DDK_LIB_PATH)\procgrp.lib;%(AdditionalDependencies)</AdditionalDependencies> <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration> <CETCompat>true</CETCompat> @@ -43,11 +43,17 @@ <ClCompile> <PreprocessorDefinitions>__i386__;%(PreprocessorDefinitions)</PreprocessorDefinitions> </ClCompile> + <Link> + <ImageHasSafeExceptionHandlers>true</ImageHasSafeExceptionHandlers> + </Link> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Platform)'=='x64'"> <ClCompile> <PreprocessorDefinitions>__x86_64__;%(PreprocessorDefinitions)</PreprocessorDefinitions> </ClCompile> + <Link> + <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers> + </Link> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)'=='Windows 8 Release'"> <ClCompile> diff --git a/vs2019/xeniface_coinst/xeniface_coinst.vcxproj b/vs2019/xeniface_coinst/xeniface_coinst.vcxproj index 77e6836..9035a14 100644 --- a/vs2019/xeniface_coinst/xeniface_coinst.vcxproj +++ b/vs2019/xeniface_coinst/xeniface_coinst.vcxproj @@ -18,6 +18,8 @@ </PropertyGroup> <ItemDefinitionGroup> <ClCompile> + <AdditionalOptions>/ZH:SHA_256 %(AdditionalOptions)</AdditionalOptions> + <SDLCheck>true</SDLCheck> <AdditionalIncludeDirectories>$(SolutionDir)..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions>PROJECT=$(ProjectName);%(PreprocessorDefinitions)</PreprocessorDefinitions> <WarningLevel>EnableAllWarnings</WarningLevel> @@ -30,6 +32,7 @@ <Link> <ModuleDefinitionFile>../../src/coinst/xeniface_coinst.def</ModuleDefinitionFile> <AdditionalDependencies>setupapi.lib;%(AdditionalDependencies)</AdditionalDependencies> + <CETCompat>true</CETCompat> </Link> <ResourceCompile> <AdditionalIncludeDirectories>$(SolutionDir)..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> -- 2.32.0.windows.1
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |