From 3a359a2f910ee7d3357dc3a0b22ed2b4575461c5 Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Fri, 3 Aug 2018 17:03:48 +0000 Subject: [PATCH] #1646: simulate remote command probing via 'type' on win32, and fixup error handling: use generic send method with timeout (just in case) git-svn-id: https://xpra.org/svn/Xpra/trunk@20015 3bb7dfac-3a0b-4e04-842a-767bc560f471 --- src/xpra/server/ssh.py | 44 ++++++++++++++++++++++++++++-------------- 1 file changed, 30 insertions(+), 14 deletions(-) diff --git a/src/xpra/server/ssh.py b/src/xpra/server/ssh.py index aad9abb306..5e49e3cf80 100644 --- a/src/xpra/server/ssh.py +++ b/src/xpra/server/ssh.py @@ -16,7 +16,8 @@ from xpra.net.ssh import SSHSocketConnection from xpra.util import csv, envint -from xpra.os_util import osexpand, getuid, WIN32, POSIX +from xpra.os_util import osexpand, getuid, bytestostr, WIN32, POSIX,\ + monotonic_time from xpra.platform.paths import get_ssh_conf_dirs @@ -115,31 +116,46 @@ def check_channel_shell_request(self, channel): return False def check_channel_exec_request(self, channel, command): + def chan_send(send_fn, data, timeout=5): + start = monotonic_time() + while data and monotonic_time()-start=2: subcommand = cmd[1].strip("\"'")