summaryrefslogtreecommitdiffstats
path: root/content/browser/zygote_host_linux.cc
diff options
context:
space:
mode:
authorthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-10 23:34:26 +0000
committerthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-10 23:34:26 +0000
commit5ffeb96b1481be87363ca5adc830b900e3efd725 (patch)
tree469cd0797e3f6e24dd358e0ea6d505f9b6e7f5e3 /content/browser/zygote_host_linux.cc
parentf3a51efc5a8eccc52dd3a3d9820e6ca617453ffd (diff)
downloadchromium_src-5ffeb96b1481be87363ca5adc830b900e3efd725.zip
chromium_src-5ffeb96b1481be87363ca5adc830b900e3efd725.tar.gz
chromium_src-5ffeb96b1481be87363ca5adc830b900e3efd725.tar.bz2
Linux: Fix the sandbox error message when the helper binary is missing.
BUG=none TEST=none Review URL: http://codereview.chromium.org/7590005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@96256 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/zygote_host_linux.cc')
-rw-r--r--content/browser/zygote_host_linux.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/content/browser/zygote_host_linux.cc b/content/browser/zygote_host_linux.cc
index c390d7a..aea94a59 100644
--- a/content/browser/zygote_host_linux.cc
+++ b/content/browser/zygote_host_linux.cc
@@ -121,8 +121,12 @@ void ZygoteHost::Init(const std::string& sandbox_cmd) {
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)) {