diff options
author | jschuh@chromium.org <jschuh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-17 02:20:46 +0000 |
---|---|---|
committer | jschuh@chromium.org <jschuh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-17 02:20:46 +0000 |
commit | 5c41e6e1cd446c3b2bc0ed17e66dffbc76f7c650 (patch) | |
tree | 81e2f1a63b2109464dde8efa38b32381e2001829 /ipc/ipc_channel_win.h | |
parent | ab25e338556b9580c54b3f4025009eaaf6ac83d3 (diff) | |
download | chromium_src-5c41e6e1cd446c3b2bc0ed17e66dffbc76f7c650.zip chromium_src-5c41e6e1cd446c3b2bc0ed17e66dffbc76f7c650.tar.gz chromium_src-5c41e6e1cd446c3b2bc0ed17e66dffbc76f7c650.tar.bz2 |
Verify the child process with a secret hello
BUG=117627
TEST=IPCSyncChannelTest.Verified
Review URL: http://codereview.chromium.org/9692035
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@127327 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ipc/ipc_channel_win.h')
-rw-r--r-- | ipc/ipc_channel_win.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/ipc/ipc_channel_win.h b/ipc/ipc_channel_win.h index 7a48695..d680fb7 100644 --- a/ipc/ipc_channel_win.h +++ b/ipc/ipc_channel_win.h @@ -43,7 +43,8 @@ class Channel::ChannelImpl : public internal::ChannelReader, bool DidEmptyInputBuffers() OVERRIDE; virtual void HandleHelloMessage(const Message& msg) OVERRIDE; - static const std::wstring PipeName(const std::string& channel_id); + static const string16 PipeName(const std::string& channel_id, + int32* secret); bool CreatePipe(const IPC::ChannelHandle &channel_handle, Mode mode); bool ProcessConnection(); @@ -79,6 +80,16 @@ class Channel::ChannelImpl : public internal::ChannelReader, // problems. TODO(darin): make this unnecessary bool processing_incoming_; + // Determines if we should validate a client's secret on connection. + bool validate_client_; + + // This is a unique per-channel value used to authenticate the client end of + // a connection. If the value is non-zero, the client passes it in the hello + // and the host validates. (We don't send the zero value fto preserve IPC + // compatability with existing clients that don't validate the channel.) + int32 client_secret_; + + base::WeakPtrFactory<ChannelImpl> weak_factory_; scoped_ptr<base::NonThreadSafe> thread_check_; |