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))
|
if (!IsBrowserProcess(command_line))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!command_line->HasSwitch(switches::kEnableMixedSandbox)) {
|
// Disable setuid sandbox since it is not longer required on
|
||||||
if (command_line->HasSwitch(switches::kEnableSandbox)) {
|
// linux (namespace sandbox is available on most distros).
|
||||||
// Disable setuid sandbox since it is not longer required on
|
command_line->AppendSwitch(service_manager::switches::kDisableSetuidSandbox);
|
||||||
// linux(namespace sandbox is available on most distros).
|
|
||||||
command_line->AppendSwitch(
|
if (!command_line->HasSwitch(switches::kEnableMixedSandbox) &&
|
||||||
service_manager::switches::kDisableSetuidSandbox);
|
!command_line->HasSwitch(switches::kEnableSandbox)) {
|
||||||
} else {
|
// Disable renderer sandbox for most of node's functions.
|
||||||
// Disable renderer sandbox for most of node's functions.
|
command_line->AppendSwitch(service_manager::switches::kNoSandbox);
|
||||||
command_line->AppendSwitch(service_manager::switches::kNoSandbox);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Allow file:// URIs to read other file:// URIs by default.
|
// Allow file:// URIs to read other file:// URIs by default.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue