summaryrefslogtreecommitdiffstats
path: root/content/child
diff options
context:
space:
mode:
authortommycli@chromium.org <tommycli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-16 20:30:48 +0000
committertommycli@chromium.org <tommycli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-16 20:30:48 +0000
commitbee16c0bf837e872690db347d42a183e0daa6eb0 (patch)
treec1b33759bebece5db613b0404455fdabb231e107 /content/child
parentc971d4c019f5d62a03be2e889bf7f73103ee3f83 (diff)
downloadchromium_src-bee16c0bf837e872690db347d42a183e0daa6eb0.zip
chromium_src-bee16c0bf837e872690db347d42a183e0daa6eb0.tar.gz
chromium_src-bee16c0bf837e872690db347d42a183e0daa6eb0.tar.bz2
ChildProcessSecurityPolicy: Port FileAPIMessageFilter to use new checks
This CL: * Closes the P1 security hole described in http://crbug.com/284792 by changing the message contents to contain Pepper file open flags instead of base::PlatformFileFlags and checking those in FileAPIMessageFilter. * Ports the rest of FileAPIMessageFilter to use new CPSP calls. * Ports one call in ResourceDispatcherHostImpl. * Makes base::PlatformFileFlags-based methods private in CPSP. Refactoring document / plans here: https://docs.google.com/a/google.com/document/d/1QGkGWuwgSuaRqovz4wyb0upqPKDVsgYOFKt44E7gmOE/edit?usp=sharing BUG=262142,284792 Review URL: https://chromiumcodereview.appspot.com/23760004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@223399 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/child')
-rw-r--r--content/child/fileapi/file_system_dispatcher.cc8
-rw-r--r--content/child/fileapi/file_system_dispatcher.h8
2 files changed, 8 insertions, 8 deletions
diff --git a/content/child/fileapi/file_system_dispatcher.cc b/content/child/fileapi/file_system_dispatcher.cc
index 095dc58..c564f8d 100644
--- a/content/child/fileapi/file_system_dispatcher.cc
+++ b/content/child/fileapi/file_system_dispatcher.cc
@@ -324,16 +324,16 @@ void FileSystemDispatcher::TouchFile(
request_id, path, last_access_time, last_modified_time));
}
-void FileSystemDispatcher::OpenFile(
+void FileSystemDispatcher::OpenPepperFile(
const GURL& file_path,
- int file_flags,
+ int pp_open_flags,
const OpenFileCallback& success_callback,
const StatusCallback& error_callback) {
int request_id = dispatchers_.Add(
CallbackDispatcher::Create(success_callback, error_callback));
ChildThread::current()->Send(
- new FileSystemHostMsg_OpenFile(
- request_id, file_path, file_flags));
+ new FileSystemHostMsg_OpenPepperFile(
+ request_id, file_path, pp_open_flags));
}
void FileSystemDispatcher::NotifyCloseFile(int file_open_id) {
diff --git a/content/child/fileapi/file_system_dispatcher.h b/content/child/fileapi/file_system_dispatcher.h
index 7c34ba7..f3957c3 100644
--- a/content/child/fileapi/file_system_dispatcher.h
+++ b/content/child/fileapi/file_system_dispatcher.h
@@ -122,10 +122,10 @@ class FileSystemDispatcher : public IPC::Listener {
// This returns a raw open PlatformFile, unlike the above, which are
// self-contained operations.
- void OpenFile(const GURL& file_path,
- int file_flags, // passed to FileUtilProxy::CreateOrOpen
- const OpenFileCallback& success_callback,
- const StatusCallback& error_callback);
+ void OpenPepperFile(const GURL& file_path,
+ int pp_open_flags,
+ const OpenFileCallback& success_callback,
+ const StatusCallback& error_callback);
// This must be paired with OpenFile, and called after finished using the
// raw PlatformFile returned from OpenFile.
void NotifyCloseFile(int file_open_id);