Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support mixed-sandbox mode on Linux #15795

Closed
nornagon opened this issue Nov 21, 2018 · 2 comments
Closed

Support mixed-sandbox mode on Linux #15795

nornagon opened this issue Nov 21, 2018 · 2 comments

Comments

@nornagon
Copy link
Member

Currently, --enable-mixed-sandbox is not supported on Linux because of Chromium's zygote mode on Linux, which spawns a sandboxed child process on boot, and all subsequent renderers are forked from this already-sandboxed "zygote" process.

Chromium itself does not support a "mixed" sandbox mode on Linux, so supporting this will require making changes upstream in Chromium.

Possible approaches:

  1. Turn off zygote mode entirely and spawn each new renderer from scratch.
  2. Keep a single zygote, spawn sandboxed renderers from the zygote and unsandboxed renderers without the zygote.
  3. Spawn two zygotes, one sandboxed and one unsandboxed, and switch between them based on the renderer spawn request.

I think (2) is probably the most feasible.

@GhostlyDark
Copy link
Contributor

Am I correct that as of 5-0-x mixed sandbox is already enforced? #15894
Did the PR #15870 also land in 5-0-x?

With the current v5.0.0-beta the flash plugin under linux refuses to work. This was already the case with previous versions, when I tried using a mixed or full sandbox under linux, thus I left the sandbox off (expect for the webPreferences) in order to make it run.

I kept my main.js the same:
if(process.platform != 'linux') {app.enableSandbox()}

webPreferences: {plugins: true, sandbox: true, nodeIntegration: false, enableRemoteModule: false}

@nornagon
Copy link
Member Author

nornagon commented Feb 6, 2019

Yes, 5-0-x enables mixed-sandbox mode on all platforms by default. Please open a new issue for the flash plugin :)

FWIW, sandbox: true without app.enableSandbox() does not in fact enable the sandbox.

@nornagon nornagon closed this as completed Feb 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants