diff options
author | cevans@chromium.org <cevans@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-18 18:54:19 +0000 |
---|---|---|
committer | cevans@chromium.org <cevans@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-18 18:54:19 +0000 |
commit | eabfdeb699894c7257152cd931b4aacefa0ef683 (patch) | |
tree | 4deb9e0430a92a77b96b56a331bc936b64c0fd8a /content/common | |
parent | 0d514f81965f27087a2705314849bd4eb0384a90 (diff) | |
download | chromium_src-eabfdeb699894c7257152cd931b4aacefa0ef683.zip chromium_src-eabfdeb699894c7257152cd931b4aacefa0ef683.tar.gz chromium_src-eabfdeb699894c7257152cd931b4aacefa0ef683.tar.bz2 |
Fix CHECK() loading Pepper Flash when inside the suid sandbox.
BUG=123969
Review URL: https://chromiumcodereview.appspot.com/10115036
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@132836 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/common')
-rw-r--r-- | content/common/sandbox_init_linux.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/content/common/sandbox_init_linux.cc b/content/common/sandbox_init_linux.cc index 5422312..5ae816f 100644 --- a/content/common/sandbox_init_linux.cc +++ b/content/common/sandbox_init_linux.cc @@ -49,11 +49,13 @@ namespace { static void CheckSingleThreaded() { - int num_threads = file_util::CountFilesCreatedAfter( - FilePath("/proc/self/task"), base::Time::UnixEpoch()); // Possibly racy, but it's ok because this is more of a debug check to catch // new threaded situations arising during development. - CHECK_EQ(num_threads, 1); + // It also has to be a DCHECK() because production builds will be running + // the suid sandbox, which will prevent /proc access in some contexts. + DCHECK_EQ(file_util::CountFilesCreatedAfter(FilePath("/proc/self/task"), + base::Time::UnixEpoch()), + 1); } static void SIGSYS_Handler(int signal, siginfo_t* info, void* void_context) { |