diff options
author | psj@chromium.org <psj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-20 13:28:14 +0000 |
---|---|---|
committer | psj@chromium.org <psj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-20 13:28:14 +0000 |
commit | 3a5b82c105248302907e2f8813823fbf00c76db5 (patch) | |
tree | 1cd67526ccf64a7a3eb54d00b11f3b189521913e /remoting/tools | |
parent | d358f57009b85fb7440208afa5ba87636b491889 (diff) | |
download | chromium_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/tools')
-rwxr-xr-x | remoting/tools/me2me_virtual_host.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/remoting/tools/me2me_virtual_host.py b/remoting/tools/me2me_virtual_host.py index 3cd1fc0..a275f3a 100755 --- a/remoting/tools/me2me_virtual_host.py +++ b/remoting/tools/me2me_virtual_host.py @@ -204,6 +204,7 @@ class Desktop: self.pulseaudio_pipe = None self.server_supports_exact_resize = False self.host_ready = False + self.ssh_auth_sockname = None g_desktops.append(self) @staticmethod @@ -304,6 +305,10 @@ class Desktop: return True + def _setup_gnubby(self): + self.ssh_auth_sockname = ("/tmp/chromoting.%s.ssh_auth_sock" % + os.environ["USER"]) + def _launch_x_server(self, extra_x_args): x_auth_file = os.path.expanduser("~/.Xauthority") self.child_env["XAUTHORITY"] = x_auth_file @@ -361,6 +366,10 @@ class Desktop: chrome_profile = os.path.join(CONFIG_DIR, "chrome-profile") self.child_env["CHROME_USER_DATA_DIR"] = chrome_profile + # Set SSH_AUTH_SOCK to the file name to listen on. + if self.ssh_auth_sockname: + self.child_env["SSH_AUTH_SOCK"] = self.ssh_auth_sockname + # Wait for X to be active. for _test in range(5): proc = subprocess.Popen("xdpyinfo", env=self.child_env, stdout=devnull) @@ -433,6 +442,7 @@ class Desktop: def launch_session(self, x_args): self._init_child_env() self._setup_pulseaudio() + self._setup_gnubby() self._launch_x_server(x_args) self._launch_x_session() @@ -443,6 +453,8 @@ class Desktop: args.append("--audio-pipe-name=%s" % self.pulseaudio_pipe) if self.server_supports_exact_resize: args.append("--server-supports-exact-resize") + if self.ssh_auth_sockname: + args.append("--ssh-auth-sockname=%s" % self.ssh_auth_sockname) # Have the host process use SIGUSR1 to signal a successful start. def sigusr1_handler(signum, frame): |