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

Unified Diff: src/platform/minijail/options.cc

Issue 466049: Baseline minijail with a commandline switch driven main. (Closed)
Patch Set: fix overly long lines Created 11 years 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 | « src/platform/minijail/options.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/platform/minijail/options.cc
diff --git a/src/platform/minijail/options.cc b/src/platform/minijail/options.cc
new file mode 100644
index 0000000000000000000000000000000000000000..78b6df3bd85aec3994cefd61599c9d5c50dea0ba
--- /dev/null
+++ b/src/platform/minijail/options.cc
@@ -0,0 +1,33 @@
+// Copyright (c) 2009 The Chromium OS Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+// Some portions Copyright (c) 2009 The Chromium Authors.
+//
+// Default implementation of the Options interface.
+
+#include "minijail/options.h"
+
+#include <base/basictypes.h>
+#include <base/logging.h>
+#include <base/scoped_ptr.h>
+
+namespace chromeos {
+
+namespace minijail {
+
+bool Options::FixUpDependencies() {
+ if (add_readonly_mounts() && !namespace_vfs()) {
+ DLOG(INFO) << "add_readonly_mounts(true) implies "
+ << "namespace_vfs(true): correcting.";
+ set_namespace_vfs(true);
+ }
+ if (enforce_syscalls_benchmark() && enforce_syscalls_by_source()) {
+ LOG(ERROR) << "enforce_syscalls_benchmark(true) and "
+ << "enforce_syscalls_by_source(true) cannot both be set.";
+ return false;
+ }
+ return true;
+}
+
+} // namespace minijail
+} // namespace chromeos
« no previous file with comments | « src/platform/minijail/options.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698