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

Side by Side Diff: sandbox/win/src/sandbox_policy_base.cc

Issue 10944015: Enable DEP earlier on Vista and below (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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "sandbox/win/src/sandbox_policy_base.h" 5 #include "sandbox/win/src/sandbox_policy_base.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/win/windows_version.h" 10 #include "base/win/windows_version.h"
(...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after
471 if (!appcontainer_list_.get() || !appcontainer_list_->HasAppContainer()) 471 if (!appcontainer_list_.get() || !appcontainer_list_->HasAppContainer())
472 return NULL; 472 return NULL;
473 473
474 return appcontainer_list_.get(); 474 return appcontainer_list_.get();
475 } 475 }
476 476
477 bool PolicyBase::AddTarget(TargetProcess* target) { 477 bool PolicyBase::AddTarget(TargetProcess* target) {
478 if (NULL != policy_) 478 if (NULL != policy_)
479 policy_maker_->Done(); 479 policy_maker_->Done();
480 480
481 if (!ApplyProcessMitigationsToSuspendedProcess(target->Process(), 481 if (!ApplyProcessMitigationsToSuspendedTarget(target, mitigations_))
482 mitigations_)) {
483 return false; 482 return false;
484 }
485 483
486 if (!SetupAllInterceptions(target)) 484 if (!SetupAllInterceptions(target))
487 return false; 485 return false;
488 486
489 if (!SetupHandleCloser(target)) 487 if (!SetupHandleCloser(target))
490 return false; 488 return false;
491 489
492 // Initialize the sandbox infrastructure for the target. 490 // Initialize the sandbox infrastructure for the target.
493 if (ERROR_SUCCESS != target->Init(this, policy_, kIPCMemSize, kPolMemSize)) 491 if (ERROR_SUCCESS != target->Init(this, policy_, kIPCMemSize, kPolMemSize))
494 return false; 492 return false;
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
624 622
625 // Finally, setup imports on the target so the interceptions can work. 623 // Finally, setup imports on the target so the interceptions can work.
626 return SetupNtdllImports(target); 624 return SetupNtdllImports(target);
627 } 625 }
628 626
629 bool PolicyBase::SetupHandleCloser(TargetProcess* target) { 627 bool PolicyBase::SetupHandleCloser(TargetProcess* target) {
630 return handle_closer_.InitializeTargetHandles(target); 628 return handle_closer_.InitializeTargetHandles(target);
631 } 629 }
632 630
633 } // namespace sandbox 631 } // namespace sandbox
OLDNEW
« sandbox/win/src/process_mitigations.cc ('K') | « sandbox/win/src/process_mitigations.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698