From a38d2e10b905b3be8316f235403ac2c49cead029 Mon Sep 17 00:00:00 2001 From: "jschuh@chromium.org" Date: Thu, 13 Sep 2012 15:08:36 +0000 Subject: Add sandbox support for Windows process mitigations BUG=147752 Review URL: https://codereview.chromium.org/10690058 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@156550 0039d316-1c4b-4281-b951-d872f2087c98 --- content/app/startup_helper_win.cc | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'content/app') diff --git a/content/app/startup_helper_win.cc b/content/app/startup_helper_win.cc index 9ead36d..17fd323 100644 --- a/content/app/startup_helper_win.cc +++ b/content/app/startup_helper_win.cc @@ -10,7 +10,7 @@ #include "base/base_switches.h" #include "base/command_line.h" #include "base/win/windows_version.h" -#include "sandbox/win/src/dep.h" +#include "sandbox/win/src/process_mitigations.h" #include "sandbox/win/src/sandbox_factory.h" namespace { @@ -37,12 +37,13 @@ namespace content { void InitializeSandboxInfo(sandbox::SandboxInterfaceInfo* info) { info->broker_services = sandbox::SandboxFactory::GetBrokerServices(); - if (!info->broker_services) + if (!info->broker_services) { info->target_services = sandbox::SandboxFactory::GetTargetServices(); - - if (base::win::GetVersion() < base::win::VERSION_VISTA) { - // Enforces strong DEP support. Vista uses the NXCOMPAT flag in the exe. - sandbox::SetCurrentProcessDEP(sandbox::DEP_ENABLED); + } else { + // Ensure the proper mitigations are enforced for the browser process. + sandbox::ApplyProcessMitigationsToCurrentProcess( + sandbox::MITIGATION_DEP | + sandbox::MITIGATION_DEP_NO_ATL_THUNK); } } -- cgit v1.1