fix: always disable setuid sandbox on linux (#15722)
This commit is contained in:
parent
0642be296d
commit
20116d7f05
1 changed files with 8 additions and 10 deletions
|
@ -209,16 +209,14 @@ void AtomMainDelegate::PreSandboxStartup() {
|
|||
if (!IsBrowserProcess(command_line))
|
||||
return;
|
||||
|
||||
if (!command_line->HasSwitch(switches::kEnableMixedSandbox)) {
|
||||
if (command_line->HasSwitch(switches::kEnableSandbox)) {
|
||||
// Disable setuid sandbox since it is not longer required on
|
||||
// linux(namespace sandbox is available on most distros).
|
||||
command_line->AppendSwitch(
|
||||
service_manager::switches::kDisableSetuidSandbox);
|
||||
} else {
|
||||
// Disable renderer sandbox for most of node's functions.
|
||||
command_line->AppendSwitch(service_manager::switches::kNoSandbox);
|
||||
}
|
||||
// Disable setuid sandbox since it is not longer required on
|
||||
// linux (namespace sandbox is available on most distros).
|
||||
command_line->AppendSwitch(service_manager::switches::kDisableSetuidSandbox);
|
||||
|
||||
if (!command_line->HasSwitch(switches::kEnableMixedSandbox) &&
|
||||
!command_line->HasSwitch(switches::kEnableSandbox)) {
|
||||
// Disable renderer sandbox for most of node's functions.
|
||||
command_line->AppendSwitch(service_manager::switches::kNoSandbox);
|
||||
}
|
||||
|
||||
// Allow file:// URIs to read other file:// URIs by default.
|
||||
|
|
Loading…
Add table
Reference in a new issue