Index: mojo/runner/child_process.cc |
diff --git a/mojo/runner/child_process.cc b/mojo/runner/child_process.cc |
index eda7829a2af093b1e4b26ce79e2f84f5a43905f2..85ce4b31526dca02fdf1dee64b59857513aef3b6 100644 |
--- a/mojo/runner/child_process.cc |
+++ b/mojo/runner/child_process.cc |
@@ -310,7 +310,13 @@ int ChildProcessMain() { |
if (sandbox_warm) |
sandbox_warm(); |
+ // TODO(erg,jln): Allowing access to all of /dev/shm/ makes it easy to |
+ // spy on other shared memory using processes. This is a temporary hack |
+ // so that we have some sandbox until we have proper shared memory |
+ // support integrated into mojo. |
std::vector<BrokerFilePermission> permissions; |
+ permissions.push_back( |
+ BrokerFilePermission::ReadWriteCreateUnlinkRecursive("/dev/shm/")); |
sandbox.reset(new mandoline::LinuxSandbox(permissions)); |
sandbox->Warmup(); |
sandbox->EngageNamespaceSandbox(); |