wok-next diff mosh/stuff/patches/mosh.patch @ rev 19991
mosh: update dropbear patch
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Fri Oct 20 15:13:54 2017 +0200 (2017-10-20) |
parents | |
children | 56b5183a00d7 |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/mosh/stuff/patches/mosh.patch Fri Oct 20 15:13:54 2017 +0200 1.3 @@ -0,0 +1,27 @@ 1.4 +--- a/scripts/mosh 1.5 ++++ b/scripts/mosh 1.6 +@@ -347,8 +347,10 @@ 1.7 + open(STDERR, ">&STDOUT") or die; 1.8 + 1.9 + my @sshopts = ( '-n' ); 1.10 ++ my @dbopts = ( ); 1.11 + if ($ssh_pty) { 1.12 + push @sshopts, '-tt'; 1.13 ++ push @dbopts, '-t'; 1.14 + } 1.15 + 1.16 + my $ssh_connection = ""; 1.17 +@@ -395,8 +397,13 @@ 1.18 + # proxy to break mysteriously. 1.19 + $ENV{ 'SHELL' } = '/bin/sh'; 1.20 + my $quoted_proxy_command = shell_quote( $0, "--family=$family" ); 1.21 ++ my $host = $userhost; $host = $1 if ($userhost =~ m{@(.*)}); 1.22 ++ my $ssh = join(' ', @ssh); 1.23 ++ my $port = 22; $port = $1 if ($ssh =~ m{-p *(\d+)}); 1.24 ++ push @dbopts, ('-J', "$quoted_proxy_command --fake-proxy -- $host $port"); 1.25 + push @sshopts, ( '-S', 'none', '-o', "ProxyCommand=$quoted_proxy_command --fake-proxy -- %h %p" ); 1.26 + } 1.27 ++ @sshopts = @dbopts if (`@ssh -V 2>&1` =~ m{Dropbear}); 1.28 + my @exec_argv = ( @ssh, @sshopts, $userhost, '--', $ssh_connection . "$server " . shell_quote( @server ) ); 1.29 + exec @exec_argv; 1.30 + die "Cannot exec ssh: $!\n";