From b49ca7ba2edec202c6a828edb8cad8300d55cb5b Mon Sep 17 00:00:00 2001 From: Micha Hanselmann Date: Mon, 15 Jul 2019 07:38:41 -0700 Subject: [PATCH] check for sandbox param on root (#19216) --- shell/app/atom_main_delegate.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/shell/app/atom_main_delegate.cc b/shell/app/atom_main_delegate.cc index 444362ed00..4e1ac0a5f0 100644 --- a/shell/app/atom_main_delegate.cc +++ b/shell/app/atom_main_delegate.cc @@ -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(); SetContentClient(content_client_.get());