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 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
399 HANDLE_FLAG_INHERIT); | 399 HANDLE_FLAG_INHERIT); |
400 PCHECK(result); | 400 PCHECK(result); |
401 | 401 |
402 handles_to_share_.push_back(handle); | 402 handles_to_share_.push_back(handle); |
403 } | 403 } |
404 | 404 |
405 void PolicyBase::SetLockdownDefaultDacl() { | 405 void PolicyBase::SetLockdownDefaultDacl() { |
406 lockdown_default_dacl_ = true; | 406 lockdown_default_dacl_ = true; |
407 } | 407 } |
408 | 408 |
409 const base::HandlesToInheritVector& PolicyBase::GetHandlesBeingShared() { | 409 const std::vector<HANDLE>& PolicyBase::GetHandlesBeingShared() { |
410 return handles_to_share_; | 410 return handles_to_share_; |
411 } | 411 } |
412 | 412 |
413 ResultCode PolicyBase::MakeJobObject(base::win::ScopedHandle* job) { | 413 ResultCode PolicyBase::MakeJobObject(base::win::ScopedHandle* job) { |
414 if (job_level_ != JOB_NONE) { | 414 if (job_level_ != JOB_NONE) { |
415 // Create the windows job object. | 415 // Create the windows job object. |
416 Job job_obj; | 416 Job job_obj; |
417 DWORD result = job_obj.Init(job_level_, NULL, ui_exceptions_, | 417 DWORD result = job_obj.Init(job_level_, NULL, ui_exceptions_, |
418 memory_limit_); | 418 memory_limit_); |
419 if (ERROR_SUCCESS != result) | 419 if (ERROR_SUCCESS != result) |
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
719 break; | 719 break; |
720 } | 720 } |
721 | 721 |
722 default: { return SBOX_ERROR_UNSUPPORTED; } | 722 default: { return SBOX_ERROR_UNSUPPORTED; } |
723 } | 723 } |
724 | 724 |
725 return SBOX_ALL_OK; | 725 return SBOX_ALL_OK; |
726 } | 726 } |
727 | 727 |
728 } // namespace sandbox | 728 } // namespace sandbox |
OLD | NEW |