Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1011)

Unified Diff: chrome/browser/browser_main_gtk.cc

Issue 6621045: Add cmdline switch for folks that really did want to run as root.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browser_main_gtk.cc
===================================================================
--- chrome/browser/browser_main_gtk.cc (revision 77186)
+++ chrome/browser/browser_main_gtk.cc (working copy)
@@ -76,6 +76,9 @@
void BrowserMainPartsGtk::DetectRunningAsRoot() {
if (geteuid() == 0) {
const CommandLine& command_line = *CommandLine::ForCurrentProcess();
+ if (!parsed_command_line().HasSwitch(switches::kUserDataDir))
+ return;
+
gfx::GtkInitFromCommandLine(command_line);
// Get just enough of our resource machinery up so we can extract the
@@ -94,6 +97,7 @@
"%s",
message.c_str());
+ LOG(ERROR) << "Startup refusing to run as root.";
message = l10n_util::GetStringFUTF8(
IDS_REFUSE_TO_RUN_AS_ROOT_2,
l10n_util::GetStringUTF16(IDS_PRODUCT_NAME));
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698