Commit d3deac4d authored by Joe Downing's avatar Joe Downing Committed by Commit Bot

Revert "macOS V2 Sandbox: Report correct sandbox profile for nacl-loader."

This reverts commit abc48df4.

Reason for revert: Speculative revert due to MacSandbox* test failures in content_unittests:
https://ci.chromium.org/p/chromium/builders/luci.chromium.ci/Mac10.11%20Tests/29903

failures:
MacSandboxTest.FileAccess
MacSandboxTest.UrandomAccess
MacSandboxTest.OpenSSLAccess
MacSandboxTest.ClipboardAccess

Failure log:
https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket.appspot.com/8932209461845513232/+/steps/content_unittests_on__none__GPU_on_Mac_on_Mac-10.11/0/logs/MacSandboxTest.ClipboardAccess/0

Original change's description:
> macOS V2 Sandbox: Report correct sandbox profile for nacl-loader.
> 
> The nacl loader process, used only on macOS, currently tries to load an
> invalid profile type under the V2 sandbox. This loads the correct type.
> This also adds necessary IOKit resource access to the nacl sandbox profile.
> 
> Bug: 892554
> Change-Id: I3118c00a17502efdd88545ef35e81e3a480d2f15
> Reviewed-on: https://chromium-review.googlesource.com/c/1289070
> Reviewed-by: Robert Sesek <rsesek@chromium.org>
> Reviewed-by: Derek Schuff <dschuff@chromium.org>
> Commit-Queue: Greg Kerr <kerrnel@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#601244}

TBR=dschuff@chromium.org,kerrnel@chromium.org,rsesek@chromium.org

Change-Id: I6825d62c07e111781530bfcb45618782a1570799
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 892554
Reviewed-on: https://chromium-review.googlesource.com/c/1292525Reviewed-by: default avatarJoe Downing <joedow@chromium.org>
Commit-Queue: Joe Downing <joedow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#601284}
parent 1e30e78e
......@@ -9,7 +9,6 @@ include_rules = [
"+sandbox/linux/services",
"+sandbox/linux/suid",
"+sandbox/linux/system_headers",
"+sandbox/mac",
"+sandbox/sandbox_buildflags.h",
"+sandbox/win/src",
"+services/service_manager/sandbox",
......
......@@ -6,22 +6,13 @@
#import <Cocoa/Cocoa.h>
#include "base/command_line.h"
#include "base/logging.h"
#include "components/nacl/common/nacl_switches.h"
#include "content/public/common/sandbox_init.h"
#include "sandbox/mac/seatbelt.h"
#include "sandbox/mac/seatbelt_exec.h"
#include "services/service_manager/sandbox/sandbox_type.h"
void NaClMainPlatformDelegate::EnableSandbox(
const content::MainFunctionParams& parameters) {
if (base::CommandLine::ForCurrentProcess()->HasSwitch(
sandbox::switches::kSeatbeltClientName)) {
// Make sure the sandbox is actually enabled if the V2 flag is present.
CHECK(sandbox::Seatbelt::IsSandboxed());
} else {
CHECK(content::InitializeSandbox(service_manager::SANDBOX_TYPE_NACL_LOADER))
<< "Error initializing sandbox for " << switches::kNaClLoaderProcess;
}
CHECK(content::InitializeSandbox(service_manager::SANDBOX_TYPE_NACL_LOADER))
<< "Error initializing sandbox for " << switches::kNaClLoaderProcess;
}
......@@ -12,10 +12,3 @@
; Allow a Native Client application to use semaphores, specifically
; sem_init(), et.al.
(allow ipc-posix-sem)
(allow iokit-get-properties
(iokit-registry-entry-class "IORegisterForSystemPower"))
(allow iokit-open
(iokit-user-client-class "IOSurfaceSendRight")
(iokit-user-client-class "RootDomainUserClient"))
......@@ -126,11 +126,6 @@ SandboxType SandboxTypeFromCommandLine(const base::CommandLine& command_line) {
if (process_type == switches::kPpapiPluginProcess)
return SANDBOX_TYPE_PPAPI;
#if defined(OS_MACOSX)
if (process_type == switches::kNaClLoaderProcess)
return SANDBOX_TYPE_NACL_LOADER;
#endif
// This is a process which we don't know about.
return SANDBOX_TYPE_INVALID;
}
......
......@@ -107,7 +107,6 @@ const char kEnableSandboxLogging[] = "enable-sandbox-logging";
// Flags spied upon from other layers.
const char kGpuProcess[] = "gpu-process";
const char kNaClLoaderProcess[] = "nacl-loader";
const char kPpapiBrokerProcess[] = "ppapi-broker";
const char kPpapiPluginProcess[] = "ppapi";
const char kRendererProcess[] = "renderer";
......
......@@ -59,7 +59,6 @@ SERVICE_MANAGER_SANDBOX_EXPORT extern const char kEnableSandboxLogging[];
// Flags spied upon from other layers.
SERVICE_MANAGER_SANDBOX_EXPORT extern const char kGpuProcess[];
SERVICE_MANAGER_SANDBOX_EXPORT extern const char kNaClLoaderProcess[];
SERVICE_MANAGER_SANDBOX_EXPORT extern const char kPpapiBrokerProcess[];
SERVICE_MANAGER_SANDBOX_EXPORT extern const char kPpapiPluginProcess[];
SERVICE_MANAGER_SANDBOX_EXPORT extern const char kRendererProcess[];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment