diff options
author | wez@chromium.org <wez@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-06 11:07:13 +0000 |
---|---|---|
committer | wez@chromium.org <wez@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-06 11:07:13 +0000 |
commit | 464c1e2dc81262c924391affc940a2e122132091 (patch) | |
tree | bc123ebf596bf1dc2d24d6871ac64455a2bbd86a /ipc/ipc_channel_proxy.cc | |
parent | 08a62b874cbc45d9b6f9854cd0a11be0662e77e8 (diff) | |
download | chromium_src-464c1e2dc81262c924391affc940a2e122132091.zip chromium_src-464c1e2dc81262c924391affc940a2e122132091.tar.gz chromium_src-464c1e2dc81262c924391affc940a2e122132091.tar.bz2 |
Limit access to named IPC channels with SO_PEERCRED, not file permissions.
BUG=
TEST=Run Chrome & configure a service, to get the service process to start. Close Chrome and run a copy as a different user, but from the same user-data-dir. New Chrome should not be able to communicate with the service process.
Review URL: http://codereview.chromium.org/6631002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80602 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ipc/ipc_channel_proxy.cc')
-rw-r--r-- | ipc/ipc_channel_proxy.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ipc/ipc_channel_proxy.cc b/ipc/ipc_channel_proxy.cc index a92d511..c219829 100644 --- a/ipc/ipc_channel_proxy.cc +++ b/ipc/ipc_channel_proxy.cc @@ -375,6 +375,13 @@ int ChannelProxy::GetClientFileDescriptor() const { DCHECK(channel) << context_.get()->channel_id_; return channel->GetClientFileDescriptor(); } + +bool ChannelProxy::GetClientEuid(uid_t* client_euid) const { + Channel *channel = context_.get()->channel_.get(); + // Channel must have been created first. + DCHECK(channel) << context_.get()->channel_id_; + return channel->GetClientEuid(client_euid); +} #endif //----------------------------------------------------------------------------- |