mirror of
https://github.com/electron/electron.git
synced 2026-01-10 07:58:08 -05:00
check for sandbox param on root (#19216)
This commit is contained in:
committed by
John Kleinschmidt
parent
6d5e494782
commit
b49ca7ba2e
@@ -201,6 +201,14 @@ bool AtomMainDelegate::BasicStartupComplete(int* exit_code) {
|
||||
base::win::PinUser32();
|
||||
#endif
|
||||
|
||||
#if defined(OS_LINUX)
|
||||
// Check for --no-sandbox parameter when running as root.
|
||||
if (getuid() == 0 && IsSandboxEnabled(command_line))
|
||||
LOG(FATAL) << "Running as root without --"
|
||||
<< service_manager::switches::kNoSandbox
|
||||
<< " is not supported. See https://crbug.com/638180.";
|
||||
#endif
|
||||
|
||||
content_client_ = std::make_unique<AtomContentClient>();
|
||||
SetContentClient(content_client_.get());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user