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

Unified Diff: content/browser/zygote_host_linux.cc

Issue 7590005: Linux: Fix the sandbox error message when the helper binary is missing. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/zygote_host_linux.cc
===================================================================
--- content/browser/zygote_host_linux.cc (revision 96030)
+++ content/browser/zygote_host_linux.cc (working copy)
@@ -121,8 +121,12 @@
if (!sandbox_cmd.empty()) {
struct stat st;
- if (stat(sandbox_binary_.c_str(), &st) == 0 &&
- access(sandbox_binary_.c_str(), X_OK) == 0 &&
+ if (stat(sandbox_binary_.c_str(), &st) != 0) {
+ LOG(FATAL) << "The SUID sandbox helper binary is missing: "
+ << sandbox_binary_ << " Aborting now.";
+ }
+
+ if (access(sandbox_binary_.c_str(), X_OK) == 0 &&
(st.st_uid == 0) &&
(st.st_mode & S_ISUID) &&
(st.st_mode & S_IXOTH)) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698