Chromium Code Reviews| Index: src/trusted/sandbox/mac/nacl-sandbox.sb |
| =================================================================== |
| --- src/trusted/sandbox/mac/nacl-sandbox.sb (revision 0) |
| +++ src/trusted/sandbox/mac/nacl-sandbox.sb (revision 0) |
| @@ -0,0 +1,42 @@ |
| +;; |
|
Mark Mentovai
2009/11/10 02:12:44
Needs lice: Copyright 2009 blahblah blah blah.
|
| +;; nacl-sandbox.sb |
| +;; Policy to sandbox NaCl. |
| +;; |
| +;; Run with sandbox-exec -f ./nacl-sandbox.sb -- sel_ldr -f module.nexe |
|
jeremy
2009/11/10 08:26:24
In the rest of Chrome we turn on the Sandbox progr
|
| + |
| +(version 1) |
| +(debug deny) |
|
Mark Mentovai
2009/11/10 02:12:44
Is this going to be loaded by Chrome? Jeremy put
jeremy
2009/11/10 08:26:24
Like Mark said, this is why I think it's best you
|
| +(deny default) |
| +(allow file-read-data (regex #"Frameworks/SDL.framework")) |
|
Mark Mentovai
2009/11/10 02:12:44
Anchor the beginning and end with leading and trai
jeremy
2009/11/10 08:26:24
Are you sure you need this? Can you load this pro
|
| +(allow file-read-data (regex #".nexe$")) |
|
Mark Mentovai
2009/11/10 02:12:44
Backslash the dot.
|
| +(allow process-exec (regex #"^.*sel_ldr$")) |
|
Mark Mentovai
2009/11/10 02:12:44
What's up with ^.*? Seems like you don't want to
|
| + |
| +;; provides basic access to devices, symlinks, and libraries. |
| +(import "/usr/share/sandbox/bsd.sb") |
|
jeremy
2009/11/10 08:26:24
Do you need all of this? in Chrome we don't and w
|
| + |
| +;; bsd.sb allows write access to these paths. We need read access, but there's |
| +;; no reason to write here. |
| +(deny file-write-data |
| + (regex #"^(/private)?/etc/localtime$" |
|
Mark Mentovai
2009/11/10 02:12:44
There are other things that bsd.sb allows writes t
|
| + #"^/usr/share/nls/" |
| + #"^/usr/share/zoneinfo/")) |
| + |
| +(deny ipc-posix-shm) |
| +(allow sysctl-read) |
| + |
| +; allow mach-lookups to Apple stuff |
| +(allow mach-lookup (global-name |
|
jeremy
2009/11/10 08:26:24
Why do you need all of these? we make do without
|
| + "com.apple.CoreServices.coreservicesd" |
| + "com.apple.DiskArbitration.diskarbitrationd" |
| + "com.apple.SecurityServer" |
| + "com.apple.SystemConfiguration.configd" |
| + "com.apple.bsd.dirhelper" |
| + "com.apple.FontObjectsServer" |
| + "com.apple.windowserver.session" |
| + "com.apple.windowserver.active" |
| + "com.apple.audio.coreaudiod" |
| + "com.apple.audio.systemsoundserver" |
| + )) |
| + |
| +(deny network*) |
| +(allow network-outbound (to unix-socket)) |
| Property changes on: src/trusted/sandbox/mac/nacl-sandbox.sb |
| ___________________________________________________________________ |
| Added: svn:eol-style |
| + LF |