diff options
author | jeremy@chromium.org <jeremy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-26 13:41:39 +0000 |
---|---|---|
committer | jeremy@chromium.org <jeremy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-26 13:41:39 +0000 |
commit | abf23550d6399dc647c984f9135447f658bbaf35 (patch) | |
tree | c11beddce1c0de5c5746ad676b99c2267b017560 /chrome/browser/utility.sb | |
parent | 670dca99f9c8615c544d6fefaace29208c9223d2 (diff) | |
download | chromium_src-abf23550d6399dc647c984f9135447f658bbaf35.zip chromium_src-abf23550d6399dc647c984f9135447f658bbaf35.tar.gz chromium_src-abf23550d6399dc647c984f9135447f658bbaf35.tar.bz2 |
Mac: block ability to stat arbitrary files in the Sandbox.
This change removes the ability to stat any file on disk and instead only allows stating files to which we have read access.
The complication with removing the ability to stat an arbitrary path is that without extra work you get into a situation where you can stat a leaf directory, but not it's parent. e.g. stat("/foo/bar") succeeds while stat("/foo") fails with errno == EPERM.
The only place we currently run into this is the utility process where the file system is off limits except for one directory.
This causes problems in 2 places:
1) DirectoryExists() works it's way from / down to the leaf directory stating each directory as it goes.
2) The extension installation code calls realpath() which fails if it can't stat parent directories.
The fix for the above is to explictly allow stating parent directories. We achieve this in the sandbox code by adding a function which generates the appropriate sandbox syntax.
This CL also contains unit tests for the above functionality and re-enables it [bug 56765, the underlying issue appears to be unrelated to the test and previously fixed].
BUG=42989, 56765
TEST=Chrome should continue to render web pages correctly, installing extensions and themes should continue to work on OS X.
Review URL: http://codereview.chromium.org/4044002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63884 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/utility.sb')
-rw-r--r-- | chrome/browser/utility.sb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/chrome/browser/utility.sb b/chrome/browser/utility.sb index 1d3a12b..4bbac11 100644 --- a/chrome/browser/utility.sb +++ b/chrome/browser/utility.sb @@ -14,4 +14,4 @@ ; *** The contents of chrome/common/common.sb are implicitly included here. *** ; Enable full access to given directory if needed. -;ENABLE_DIRECTORY_ACCESS (allow file-read* file-write* (regex #"DIR_TO_ALLOW_ACCESS"))
\ No newline at end of file +;ENABLE_DIRECTORY_ACCESS
\ No newline at end of file |