summaryrefslogtreecommitdiffstats
path: root/content/app
diff options
context:
space:
mode:
authorjschuh@chromium.org <jschuh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-13 15:08:36 +0000
committerjschuh@chromium.org <jschuh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-13 15:08:36 +0000
commita38d2e10b905b3be8316f235403ac2c49cead029 (patch)
tree3744c13489eba26db87e8bc5925f0ec724a751cb /content/app
parenta155abbffdce8ecfef657cca7c0b58d092b7e4b8 (diff)
downloadchromium_src-a38d2e10b905b3be8316f235403ac2c49cead029.zip
chromium_src-a38d2e10b905b3be8316f235403ac2c49cead029.tar.gz
chromium_src-a38d2e10b905b3be8316f235403ac2c49cead029.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@156550 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/app')
-rw-r--r--content/app/startup_helper_win.cc13
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);
}
}