Use shell to run command (so PATH is searched)
This commit is contained in:
+2
-1
@@ -178,7 +178,8 @@ if ( $pid == 0 ) { # child
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ( scalar @command > 0 ) {
|
if ( scalar @command > 0 ) {
|
||||||
push @server, ( '--', @command );
|
my $command_string = q{"} . (join ' ', @command) . q{"};
|
||||||
|
push @server, ( '--', '/bin/sh', '-c', $command_string );
|
||||||
}
|
}
|
||||||
|
|
||||||
exec 'ssh', '-S', 'none', '-o', "ProxyCommand=$0 --fake-proxy -- %h %p", '-t', $userhost, '--', @server;
|
exec 'ssh', '-S', 'none', '-o', "ProxyCommand=$0 --fake-proxy -- %h %p", '-t', $userhost, '--', @server;
|
||||||
|
|||||||
Reference in New Issue
Block a user