mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-10 01:48:00 +00:00
Uppity: expect SSH1_CMSG_EXIT_CONFIRMATION.
I've only just noticed that the server-side SSH-1 connection layer had no handler for that message, so when an SSH-1 connection terminates in the normal way, Uppity's event log reports 'Unexpected packet received, type 33 (SSH1_CMSG_EXIT_CONFIRMATION)', which is wrong in that it _should_ be expected!
This commit is contained in:
parent
bf743bf85c
commit
6dc8860f8a
@ -239,6 +239,15 @@ bool ssh1_handle_direction_specific_packet(
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
case SSH1_CMSG_EXIT_CONFIRMATION:
|
||||||
|
if (!s->sent_exit_status) {
|
||||||
|
ssh_proto_error(s->ppl.ssh, "Received SSH1_CMSG_EXIT_CONFIRMATION"
|
||||||
|
" without having sent SSH1_SMSG_EXIT_STATUS");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
ppl_logevent("Client sent exit confirmation");
|
||||||
|
return true;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -301,6 +310,8 @@ static void ssh1sesschan_send_exit_status(SshChannel *sc, int status)
|
|||||||
pktout = ssh_bpp_new_pktout(s->ppl.bpp, SSH1_SMSG_EXIT_STATUS);
|
pktout = ssh_bpp_new_pktout(s->ppl.bpp, SSH1_SMSG_EXIT_STATUS);
|
||||||
put_uint32(pktout, status);
|
put_uint32(pktout, status);
|
||||||
pq_push(s->ppl.out_pq, pktout);
|
pq_push(s->ppl.out_pq, pktout);
|
||||||
|
|
||||||
|
s->sent_exit_status = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ssh1sesschan_send_exit_signal(
|
static void ssh1sesschan_send_exit_signal(
|
||||||
|
@ -50,6 +50,7 @@ struct ssh1_connection_state {
|
|||||||
struct outstanding_succfail *succfail_head, *succfail_tail;
|
struct outstanding_succfail *succfail_head, *succfail_tail;
|
||||||
|
|
||||||
bool compressing; /* used in server mode only */
|
bool compressing; /* used in server mode only */
|
||||||
|
bool sent_exit_status; /* also for server mode */
|
||||||
|
|
||||||
ConnectionLayer cl;
|
ConnectionLayer cl;
|
||||||
PacketProtocolLayer ppl;
|
PacketProtocolLayer ppl;
|
||||||
|
Loading…
Reference in New Issue
Block a user