diff options
author | jschuh@chromium.org <jschuh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-13 22:29:33 +0000 |
---|---|---|
committer | jschuh@chromium.org <jschuh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-13 22:29:33 +0000 |
commit | 7986921c089dbbe2bf1b9f87c522e571a7061c96 (patch) | |
tree | 01ab711215af7321e0e897baed59c2c9114d1dcb /content/app | |
parent | d3796a1d076661bc0bd5fb2b1e848e29aa08e343 (diff) | |
download | chromium_src-7986921c089dbbe2bf1b9f87c522e571a7061c96.zip chromium_src-7986921c089dbbe2bf1b9f87c522e571a7061c96.tar.gz chromium_src-7986921c089dbbe2bf1b9f87c522e571a7061c96.tar.bz2 |
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@156657 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/app')
-rw-r--r-- | content/app/startup_helper_win.cc | 13 |
1 files changed, 7 insertions, 6 deletions
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); } } |