diff --git a/bin/admin/install b/bin/admin/install index cc46e767e..34434dd9d 100755 --- a/bin/admin/install +++ b/bin/admin/install @@ -37,7 +37,7 @@ trap 'trap_exit' EXIT declare -A opt -TTYREC_VERSION_NEEDED=1.1.6.1 +TTYREC_VERSION_NEEDED=1.1.7.0 set_default_options() { diff --git a/bin/admin/install-ttyrec.sh b/bin/admin/install-ttyrec.sh index 3a35edd0c..29c438853 100755 --- a/bin/admin/install-ttyrec.sh +++ b/bin/admin/install-ttyrec.sh @@ -54,7 +54,7 @@ action_static() { # only used when/if the API is down and we're in CI mode default_urls() { - local ver="1.1.6.7" + local ver="1.1.7.0" local rpmver="${ver}-1" local list=" -${rpmver}.aarch64.rpm diff --git a/bin/plugin/open/scp.json b/bin/plugin/open/scp.json index f0ea23782..457cadaa0 100644 --- a/bin/plugin/open/scp.json +++ b/bin/plugin/open/scp.json @@ -1,3 +1,4 @@ { - "execution_mode": "binary" + "execution_mode": "binary", + "stealth_stdout": true } diff --git a/bin/shell/osh.pl b/bin/shell/osh.pl index 9e6d1d171..6a3585654 100755 --- a/bin/shell/osh.pl +++ b/bin/shell/osh.pl @@ -1054,17 +1054,25 @@ sub main_exit { # build ttyrec command that'll prefix the real command $fnret = OVH::Bastion::build_ttyrec_cmdline( - ip => $osh_command, - port => 0, - user => 0, - account => $self, - uniqid => $log_uniq_id, - home => $home, - realm => $realm, - remoteaccount => $remoteself, - debug => $osh_debug, - tty => $tty, - notty => $notty + ip => $osh_command, + port => 0, + user => 0, + account => $self, + uniqid => $log_uniq_id, + home => $home, + realm => $realm, + remoteaccount => $remoteself, + debug => $osh_debug, + tty => $tty, + notty => $notty, + stealth_stdout => OVH::Bastion::plugin_config( + plugin => $osh_command, + key => "stealth_stdout" + )->value ? 1 : 0, + stealth_stderr => OVH::Bastion::plugin_config( + plugin => $osh_command, + key => "stealth_stderr" + )->value ? 1 : 0, ); main_exit(OVH::Bastion::EXIT_TTYREC_CMDLINE_FAILED, "ttyrec_failed", $fnret->msg) if !$fnret; diff --git a/lib/perl/OVH/Bastion.pm b/lib/perl/OVH/Bastion.pm index 12cea705c..9d8f9c7c3 100644 --- a/lib/perl/OVH/Bastion.pm +++ b/lib/perl/OVH/Bastion.pm @@ -1128,6 +1128,8 @@ sub build_ttyrec_cmdline_part1of2 { push @ttyrec, '-v' if $params{'debug'}; push @ttyrec, '-T', 'always' if $params{'tty'}; push @ttyrec, '-T', 'never' if $params{'notty'}; + push @ttyrec, '--stealth-stdout' if $params{'stealth_stdout'}; + push @ttyrec, '--stealth-stderr' if $params{'stealth_stderr'}; my $fnret = OVH::Bastion::account_config( account => $params{'account'}, diff --git a/tests/functional/fake_ttyrec.sh b/tests/functional/fake_ttyrec.sh index 1ea0c7414..2eda87235 100755 --- a/tests/functional/fake_ttyrec.sh +++ b/tests/functional/fake_ttyrec.sh @@ -4,7 +4,7 @@ set -- $(getopt -o 'ZcCupVhvanf:z:d:t:T:k:s:e:l:F:' -l "zstd,level:,verbose,append,cheatcodes,no-cheatcodes,shell-cmd:,dir:,output:,uuid:,no-openpty,lock-timeout:,kill-timeout:,msg:,count-bytes,term:,version,help,zstd-try,max-flush-time:,name-format:" -- "$@") while [ "$1" != "--" ]; do if [ "$1" = "-V" ]; then - echo "fake-ttyrec v1.1.6.1" + echo "fake-ttyrec v1.1.7.0" exit 0 fi shift