diff --git a/bin/shell/osh.pl b/bin/shell/osh.pl index 60ddc1a..03e620c 100755 --- a/bin/shell/osh.pl +++ b/bin/shell/osh.pl @@ -1240,10 +1240,18 @@ $user = $user || $config->{'defaultLogin'} || $remoteself || $sysself; # log request osh_debug("final request : " . "$user\@$ip -p $port -- $command'\n"); -my $displayLine = sprintf("%s => %s => %s", +my $displayLine = sprintf( + "%s => %s => %s", OVH::Bastion::machine_display(ip => $hostfrom, port => $portfrom)->value, OVH::Bastion::machine_display(ip => $bastionhost, port => $bastionport, user => $self)->value, - OVH::Bastion::machine_display(ip => $hostto, port => $port, user => $user)->value, + OVH::Bastion::machine_display( + ip => $hostto, + port => $port, + user => $user, + proxyIp => $proxyIp, + proxyPort => $proxyPort + )->value, + ); if (!$quiet) { diff --git a/lib/perl/OVH/Bastion/allowkeeper.inc b/lib/perl/OVH/Bastion/allowkeeper.inc index b6c6bd3..37d51dd 100644 --- a/lib/perl/OVH/Bastion/allowkeeper.inc +++ b/lib/perl/OVH/Bastion/allowkeeper.inc @@ -683,7 +683,13 @@ sub access_modify { else { return R('ERR_CANNOT_OPEN_FILE', msg => "Error opening $file: $!"); } - my $machine = OVH::Bastion::machine_display(ip => $ip, port => $port, user => $user)->value; + my $machine = OVH::Bastion::machine_display( + ip => $ip, + port => $port, + user => $user, + proxyIp => $proxyIp, + proxyPort => $proxyPort + )->value; my $ttlmsg = $ttl ? (' (expires in ' . OVH::Bastion::duration2human(seconds => $ttl)->value->{'human'} . ')') : ''; $returnmsg = "Access to $machine successfully added$ttlmsg"; @@ -708,7 +714,13 @@ sub access_modify { if (open(my $fh_file, '>', $file)) { print $fh_file $newFile; close($fh_file); - my $machine = OVH::Bastion::machine_display(ip => $ip, port => $port, user => $user)->value; + my $machine = OVH::Bastion::machine_display( + ip => $ip, + port => $port, + user => $user, + proxyIp => $proxyIp, + proxyPort => $proxyPort + )->value; $returnmsg = "Access to $machine successfully removed"; } else {