summaryrefslogtreecommitdiffstats
path: root/remoting/host/client_session.cc
diff options
context:
space:
mode:
authorpsj@chromium.org <psj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-20 13:28:14 +0000
committerpsj@chromium.org <psj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-20 13:28:14 +0000
commit3a5b82c105248302907e2f8813823fbf00c76db5 (patch)
tree1cd67526ccf64a7a3eb54d00b11f3b189521913e /remoting/host/client_session.cc
parentd358f57009b85fb7440208afa5ba87636b491889 (diff)
downloadchromium_src-3a5b82c105248302907e2f8813823fbf00c76db5.zip
chromium_src-3a5b82c105248302907e2f8813823fbf00c76db5.tar.gz
chromium_src-3a5b82c105248302907e2f8813823fbf00c76db5.tar.bz2
Add gnubby authentication to remoting host
The remoting host changes, including the associated policy definitions, required to proxy gnubby traffic through a Chrome Remote Desktop session. BUG=134250 Review URL: https://codereview.chromium.org/138753005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@252217 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/host/client_session.cc')
-rw-r--r--remoting/host/client_session.cc17
1 files changed, 16 insertions, 1 deletions
diff --git a/remoting/host/client_session.cc b/remoting/host/client_session.cc
index 52feba7..6057f12 100644
--- a/remoting/host/client_session.cc
+++ b/remoting/host/client_session.cc
@@ -197,9 +197,15 @@ void ClientSession::DeliverClientMessage(
reply.set_data(message.data().substr(0, 16));
connection_->client_stub()->DeliverHostMessage(reply);
return;
+ } else if (message.type() == "gnubby-auth") {
+ if (gnubby_auth_handler_) {
+ gnubby_auth_handler_->DeliverClientMessage(message.data());
+ } else {
+ HOST_LOG << "gnubby auth is not enabled";
+ }
+ return;
}
}
- // No messages are currently supported.
HOST_LOG << "Unexpected message received: "
<< message.type() << ": " << message.data();
}
@@ -288,6 +294,10 @@ void ClientSession::OnConnectionAuthenticated(
audio_encoder.Pass(),
connection_->audio_stub());
}
+
+ // Create a GnubbyAuthHandler to proxy gnubbyd messages.
+ gnubby_auth_handler_ = desktop_environment_->CreateGnubbyAuthHandler(
+ connection_->client_stub());
}
void ClientSession::OnConnectionChannelsConnected(
@@ -412,6 +422,11 @@ void ClientSession::SetDisableInputs(bool disable_inputs) {
disable_clipboard_filter_.set_enabled(!disable_inputs);
}
+void ClientSession::SetGnubbyAuthHandlerForTesting(
+ GnubbyAuthHandler* gnubby_auth_handler) {
+ gnubby_auth_handler_.reset(gnubby_auth_handler);
+}
+
scoped_ptr<protocol::ClipboardStub> ClientSession::CreateClipboardProxy() {
DCHECK(CalledOnValidThread());