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

Unified Diff: src/trusted/sandbox/mac/nacl-sandbox.sb

Issue 379019: NaCl mac sandbox file. To be used with sandbox-exec. Base URL: http://nativeclient.googlecode.com/svn/trunk/src/native_client/
Patch Set: Created 11 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698