Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(897)

Unified Diff: sandbox/win/src/sandbox_policy_base.cc

Issue 10907217: Revert 156550 - Add sandbox support for Windows process mitigations (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sandbox/win/src/sandbox_policy_base.h ('k') | sandbox/win/src/sandbox_types.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sandbox/win/src/sandbox_policy_base.cc
===================================================================
--- sandbox/win/src/sandbox_policy_base.cc (revision 156553)
+++ sandbox/win/src/sandbox_policy_base.cc (working copy)
@@ -15,7 +15,6 @@
#include "sandbox/win/src/handle_policy.h"
#include "sandbox/win/src/job.h"
#include "sandbox/win/src/interception.h"
-#include "sandbox/win/src/process_mitigations.h"
#include "sandbox/win/src/named_pipe_dispatcher.h"
#include "sandbox/win/src/named_pipe_policy.h"
#include "sandbox/win/src/policy_broker.h"
@@ -54,7 +53,6 @@
namespace sandbox {
SANDBOX_INTERCEPT IntegrityLevel g_shared_delayed_integrity_level;
-SANDBOX_INTERCEPT MitigationFlags g_shared_delayed_mitigations;
// Initializes static members.
HWINSTA PolicyBase::alternate_winstation_handle_ = NULL;
@@ -72,8 +70,6 @@
relaxed_interceptions_(true),
integrity_level_(INTEGRITY_LEVEL_LAST),
delayed_integrity_level_(INTEGRITY_LEVEL_LAST),
- mitigations_(0),
- delayed_mitigations_(0),
policy_maker_(NULL),
policy_(NULL) {
::InitializeCriticalSection(&lock_);
@@ -280,30 +276,6 @@
return SBOX_ALL_OK;
}
-ResultCode PolicyBase::SetProcessMitigations(
- MitigationFlags flags) {
- if (!CanSetProcessMitigationsPreStartup(flags))
- return SBOX_ERROR_BAD_PARAMS;
- mitigations_ = flags;
- return SBOX_ALL_OK;
-}
-
-MitigationFlags PolicyBase::GetProcessMitigations() {
- return mitigations_;
-}
-
-ResultCode PolicyBase::SetDelayedProcessMitigations(
- MitigationFlags flags) {
- if (!CanSetProcessMitigationsPostStartup(flags))
- return SBOX_ERROR_BAD_PARAMS;
- delayed_mitigations_ = flags;
- return SBOX_ALL_OK;
-}
-
-MitigationFlags PolicyBase::GetDelayedProcessMitigations() {
- return delayed_mitigations_;
-}
-
void PolicyBase::SetStrictInterceptions() {
relaxed_interceptions_ = false;
}
@@ -478,11 +450,6 @@
if (NULL != policy_)
policy_maker_->Done();
- if (!ApplyProcessMitigationsToSuspendedProcess(target->Process(),
- mitigations_)) {
- return false;
- }
-
if (!SetupAllInterceptions(target))
return false;
@@ -502,19 +469,6 @@
if (SBOX_ALL_OK != ret)
return false;
- // Add in delayed mitigations and pseudo-mitigations enforced at startup.
- g_shared_delayed_mitigations = delayed_mitigations_ |
- FilterPostStartupProcessMitigations(mitigations_);
- if (!CanSetProcessMitigationsPostStartup(g_shared_delayed_mitigations))
- return false;
-
- ret = target->TransferVariable("g_shared_delayed_mitigations",
- &g_shared_delayed_mitigations,
- sizeof(g_shared_delayed_mitigations));
- g_shared_delayed_mitigations = 0;
- if (SBOX_ALL_OK != ret)
- return false;
-
AutoLock lock(&lock_);
targets_.push_back(target);
return true;
« no previous file with comments | « sandbox/win/src/sandbox_policy_base.h ('k') | sandbox/win/src/sandbox_types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698