diff options
author | agl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-04 21:34:05 +0000 |
---|---|---|
committer | agl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-04 21:34:05 +0000 |
commit | baf556aa12ddfb301f2a54f5c741505b55bad18c (patch) | |
tree | e738f95ccf34d908305acfad8d6c957a805df422 /ipc/ipc_channel_posix.h | |
parent | 7b29027a3a491c28a3e1db30b849ce0d1eda6931 (diff) | |
download | chromium_src-baf556aa12ddfb301f2a54f5c741505b55bad18c.zip chromium_src-baf556aa12ddfb301f2a54f5c741505b55bad18c.tar.gz chromium_src-baf556aa12ddfb301f2a54f5c741505b55bad18c.tar.bz2 |
On Linux, move the passing of filedescriptors to a dedicated socketpair().
(Patch by Markus)
This allows the fast path to use read()/write() instead of recvmsg()/sendmsg()
which is much cheaper for the Seccomp sandbox.
Also, fixed minor seccomp sandbox issues discovered by this change.
BUG=19120
ISSUE=164373
http://codereview.chromium.org/177049
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25518 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ipc/ipc_channel_posix.h')
-rw-r--r-- | ipc/ipc_channel_posix.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ipc/ipc_channel_posix.h b/ipc/ipc_channel_posix.h index aa69d4f..2a8bc71 100644 --- a/ipc/ipc_channel_posix.h +++ b/ipc/ipc_channel_posix.h @@ -83,6 +83,12 @@ class Channel::ChannelImpl : public MessageLoopForIO::Watcher { // pipe_ that is passed to the client. int client_pipe_; +#if defined(OS_LINUX) + // Linux uses a dedicated socketpair() for passing file descriptors. + int fd_pipe_; + int remote_fd_pipe_; +#endif + // The "name" of our pipe. On Windows this is the global identifier for // the pipe. On POSIX it's used as a key in a local map of file descriptors. std::string pipe_name_; |