diff options
Diffstat (limited to 'chrome/common/sandbox_mac.mm')
-rw-r--r-- | chrome/common/sandbox_mac.mm | 40 |
1 files changed, 1 insertions, 39 deletions
diff --git a/chrome/common/sandbox_mac.mm b/chrome/common/sandbox_mac.mm index 63869ee..ca8ac6c 100644 --- a/chrome/common/sandbox_mac.mm +++ b/chrome/common/sandbox_mac.mm @@ -15,7 +15,6 @@ extern "C" { #include "base/command_line.h" #include "base/file_util.h" #include "base/mac_util.h" -#include "base/rand_util_c.h" #include "base/scoped_cftyperef.h" #include "base/scoped_nsautorelease_pool.h" #include "base/string16.h" @@ -235,10 +234,6 @@ void SandboxWarmup() { NULL)); CGImageSourceGetStatus(img); } - - { // Native Client access to /dev/random. - GetUrandomFD(); - } } // Turns on the OS X sandbox for this process. @@ -255,37 +250,16 @@ bool EnableSandbox(SandboxProcessType sandbox_type, // TODO(jeremy): Look at using include syntax to unify common parts of sandbox // definition files. NSString* sandbox_config_filename = nil; - bool allow_nacl_lines = false; switch (sandbox_type) { case SANDBOX_TYPE_RENDERER: sandbox_config_filename = @"renderer"; break; - case SANDBOX_TYPE_MOST_RESTRICTIVE: case SANDBOX_TYPE_WORKER: - sandbox_config_filename = @"most-restrictive"; + sandbox_config_filename = @"worker"; break; case SANDBOX_TYPE_UTILITY: sandbox_config_filename = @"utility"; break; - case SANDBOX_TYPE_NACL_PLUGIN: - // The Native Client plugin is a standard renderer sandbox with some - // additional lines to support use of Unix sockets. - // TODO(msneck): Remove the use of Unix sockets from Native Client and - // then remove the associated rules from chrome/renderer/renderer.sb. - // See http://code.google.com/p/nativeclient/issues/detail?id=344 - sandbox_config_filename = @"renderer"; - allow_nacl_lines = true; - break; - case SANDBOX_TYPE_NACL_LOADER: - // The Native Client loader is the most-restrictive sandbox with some - // additional lines to support use of Unix sockets. - // TODO(msneck): Remove the use of Unix sockets from Native Client and - // then remove the associated rules from - // chrome/browser/most-restrictive.sb. - // See http://code.google.com/p/nativeclient/issues/detail?id=344 - sandbox_config_filename = @"most-restrictive"; - allow_nacl_lines = true; - break; default: NOTREACHED(); return false; @@ -314,13 +288,6 @@ bool EnableSandbox(SandboxProcessType sandbox_type, withString:@""]; } - // Enable Native Client lines if they are allowed. - if (allow_nacl_lines) { - sandbox_data = [sandbox_data - stringByReplacingOccurrencesOfString:@";NACL" - withString:@""]; - } - if (!allowed_dir.empty()) { // The sandbox only understands "real" paths. This resolving step is // needed so the caller doesn't need to worry about things like /var @@ -374,11 +341,6 @@ bool EnableSandbox(SandboxProcessType sandbox_type, sandbox_data = [sandbox_data stringByReplacingOccurrencesOfString:@"USER_HOMEDIR" withString:home_dir_escaped_ns]; - } else { - // Sandbox rules only for versions before 10.6. - sandbox_data = [sandbox_data - stringByReplacingOccurrencesOfString:@";BEFORE_10.6" - withString:@""]; } char* error_buff = NULL; |