OLD | NEW |
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 <sddl.h> | 7 #include <sddl.h> |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 617 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
628 return SBOX_ALL_OK; | 628 return SBOX_ALL_OK; |
629 } | 629 } |
630 | 630 |
631 const AppContainerAttributes* PolicyBase::GetAppContainer() const { | 631 const AppContainerAttributes* PolicyBase::GetAppContainer() const { |
632 if (!appcontainer_list_.get() || !appcontainer_list_->HasAppContainer()) | 632 if (!appcontainer_list_.get() || !appcontainer_list_->HasAppContainer()) |
633 return NULL; | 633 return NULL; |
634 | 634 |
635 return appcontainer_list_.get(); | 635 return appcontainer_list_.get(); |
636 } | 636 } |
637 | 637 |
638 const PSID PolicyBase::GetLowBoxSid() const { | 638 PSID PolicyBase::GetLowBoxSid() const { |
639 return lowbox_sid_; | 639 return lowbox_sid_; |
640 } | 640 } |
641 | 641 |
642 bool PolicyBase::AddTarget(TargetProcess* target) { | 642 bool PolicyBase::AddTarget(TargetProcess* target) { |
643 if (NULL != policy_) | 643 if (NULL != policy_) |
644 policy_maker_->Done(); | 644 policy_maker_->Done(); |
645 | 645 |
646 if (!ApplyProcessMitigationsToSuspendedProcess(target->Process(), | 646 if (!ApplyProcessMitigationsToSuspendedProcess(target->Process(), |
647 mitigations_)) { | 647 mitigations_)) { |
648 return false; | 648 return false; |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
874 break; | 874 break; |
875 } | 875 } |
876 | 876 |
877 default: { return SBOX_ERROR_UNSUPPORTED; } | 877 default: { return SBOX_ERROR_UNSUPPORTED; } |
878 } | 878 } |
879 | 879 |
880 return SBOX_ALL_OK; | 880 return SBOX_ALL_OK; |
881 } | 881 } |
882 | 882 |
883 } // namespace sandbox | 883 } // namespace sandbox |
OLD | NEW |