Chromium Code Reviews
|
| OLD | NEW |
|---|---|
| (Empty) | |
| 1 ;; | |
|
Mark Mentovai
2009/11/10 02:12:44
Needs lice: Copyright 2009 blahblah blah blah.
| |
| 2 ;; nacl-sandbox.sb | |
| 3 ;; Policy to sandbox NaCl. | |
| 4 ;; | |
| 5 ;; 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
| |
| 6 | |
| 7 (version 1) | |
| 8 (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
| |
| 9 (deny default) | |
| 10 (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
| |
| 11 (allow file-read-data (regex #".nexe$")) | |
|
Mark Mentovai
2009/11/10 02:12:44
Backslash the dot.
| |
| 12 (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
| |
| 13 | |
| 14 ;; provides basic access to devices, symlinks, and libraries. | |
| 15 (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
| |
| 16 | |
| 17 ;; bsd.sb allows write access to these paths. We need read access, but there's | |
| 18 ;; no reason to write here. | |
| 19 (deny file-write-data | |
| 20 (regex #"^(/private)?/etc/localtime$" | |
|
Mark Mentovai
2009/11/10 02:12:44
There are other things that bsd.sb allows writes t
| |
| 21 #"^/usr/share/nls/" | |
| 22 #"^/usr/share/zoneinfo/")) | |
| 23 | |
| 24 (deny ipc-posix-shm) | |
| 25 (allow sysctl-read) | |
| 26 | |
| 27 ; allow mach-lookups to Apple stuff | |
| 28 (allow mach-lookup (global-name | |
|
jeremy
2009/11/10 08:26:24
Why do you need all of these? we make do without
| |
| 29 "com.apple.CoreServices.coreservicesd" | |
| 30 "com.apple.DiskArbitration.diskarbitrationd" | |
| 31 "com.apple.SecurityServer" | |
| 32 "com.apple.SystemConfiguration.configd" | |
| 33 "com.apple.bsd.dirhelper" | |
| 34 "com.apple.FontObjectsServer" | |
| 35 "com.apple.windowserver.session" | |
| 36 "com.apple.windowserver.active" | |
| 37 "com.apple.audio.coreaudiod" | |
| 38 "com.apple.audio.systemsoundserver" | |
| 39 )) | |
| 40 | |
| 41 (deny network*) | |
| 42 (allow network-outbound (to unix-socket)) | |
| OLD | NEW |