This runs an interactive shell session on the host, rathern than
running `sh -c ""' on it.

Evidently ssh checks for the presence of a command line specification
after (foolishly, but now historically unavoidably) concatenating all
the command line arguments with spaces in between.

Turn  ssh host ""  into  ssh host " "  which is the expected no-op.

Signed-off-by: Ian Jackson <ijack...@chiark.greenend.org.uk>
---
 Osstest/TestSupport.pm | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm
index 19bdd23..b947a0c 100644
--- a/Osstest/TestSupport.pm
+++ b/Osstest/TestSupport.pm
@@ -676,6 +676,7 @@ sub tcmd { # $tcmd will be put between '' but not escaped
     my ($stdin,$stdout,$user,$ho,$tcmd,$timeout,$extrasshopts) = @_;
     $timeout=30 if !defined $timeout;
     target_adjust_timeout($ho,\$timeout);
+    $tcmd = ' ' if $tcmd eq ''; # ssh host '' logs in !
     tcmdex($timeout,$stdin,$stdout,
            'ssh', sshopts(), @{ $extrasshopts || [] },
            sshuho($user,$ho), $tcmd);
-- 
2.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

Reply via email to