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

Unified Diff: sandbox/linux/bpf_dsl/bpf_dsl_more_unittest.cc

Issue 721553002: sandbox: Extend BrokerPolicy to support file creation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: minor fix Created 6 years, 1 month 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
Index: sandbox/linux/bpf_dsl/bpf_dsl_more_unittest.cc
diff --git a/sandbox/linux/bpf_dsl/bpf_dsl_more_unittest.cc b/sandbox/linux/bpf_dsl/bpf_dsl_more_unittest.cc
index c56c81911fa83936e8c2e8b4fd383d5c99080ec9..d40dde21d27a782b7f19407dc9fcca0788ccc962 100644
--- a/sandbox/linux/bpf_dsl/bpf_dsl_more_unittest.cc
+++ b/sandbox/linux/bpf_dsl/bpf_dsl_more_unittest.cc
@@ -56,6 +56,7 @@
#endif
namespace sandbox {
+using syscall_broker::BrokerPermission;
namespace bpf_dsl {
namespace {
@@ -755,12 +756,11 @@ bool NoOpCallback() {
class InitializedOpenBroker {
public:
InitializedOpenBroker() : initialized_(false) {
- std::vector<std::string> allowed_files;
- allowed_files.push_back("/proc/allowed");
- allowed_files.push_back("/proc/cpuinfo");
+ std::vector<syscall_broker::BrokerPermission> permissions;
+ permissions.push_back(BROKER_PERM_READ_ONLY("/proc/allowed"));
+ permissions.push_back(BROKER_PERM_READ_ONLY("/proc/cpuinfo"));
- broker_process_.reset(
- new BrokerProcess(EPERM, allowed_files, std::vector<std::string>()));
+ broker_process_.reset(new BrokerProcess(EPERM, permissions));
BPF_ASSERT(broker_process() != NULL);
BPF_ASSERT(broker_process_->Init(base::Bind(&NoOpCallback)));

Powered by Google App Engine
This is Rietveld 408576698