mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-05-28 23:34:49 -05:00
SshProxy: display auth banners from proxy connections.
Now the banners (plus their surrounding antispoof prompts) have their own SeatOutputType, it's easy to distinguish them in sshproxy_output and do the right thing with them.
This commit is contained in:
parent
d32d49c2e0
commit
5ca0a75636
18
sshproxy.c
18
sshproxy.c
@ -258,9 +258,21 @@ static size_t sshproxy_output(Seat *seat, SeatOutputType type,
|
||||
const void *data, size_t len)
|
||||
{
|
||||
SshProxy *sp = container_of(seat, SshProxy, seat);
|
||||
bufchain_add(&sp->ssh_to_socket, data, len);
|
||||
try_send_ssh_to_socket(sp);
|
||||
return bufchain_size(&sp->ssh_to_socket);
|
||||
if (type == SEAT_OUTPUT_AUTH_BANNER) {
|
||||
if (sp->clientseat) {
|
||||
/*
|
||||
* If we have access to the outer Seat, pass the SSH login
|
||||
* banner on to it.
|
||||
*/
|
||||
return seat_output(sp->clientseat, type, data, len);
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
} else {
|
||||
bufchain_add(&sp->ssh_to_socket, data, len);
|
||||
try_send_ssh_to_socket(sp);
|
||||
return bufchain_size(&sp->ssh_to_socket);
|
||||
}
|
||||
}
|
||||
|
||||
static bool sshproxy_eof(Seat *seat)
|
||||
|
Loading…
x
Reference in New Issue
Block a user