dropbear: fix regression where TTY modes weren't reset for client
[openwrt/openwrt.git] / package / network / services / dropbear / patches / 010-tty-modes-werent-reset-for-client.patch
1 Hash: 7bc6280613f5ab4ee86c14c779739070e5784dfe
2 From: Matt Johnston <matt@ucc.asn.au>
3 Date: Sun, 24 Mar 2019 20:41:02 +0800
4 Subject: Fix regression where TTY modes weren't reset for client
5
6 --- a/cli-chansession.c
7 +++ b/cli-chansession.c
8 @@ -35,7 +35,7 @@
9 #include "chansession.h"
10 #include "agentfwd.h"
11
12 -static void cli_cleanupchansess(const struct Channel *channel);
13 +static void cli_closechansess(const struct Channel *channel);
14 static int cli_initchansess(struct Channel *channel);
15 static void cli_chansessreq(struct Channel *channel);
16 static void send_chansess_pty_req(const struct Channel *channel);
17 @@ -51,8 +51,8 @@ const struct ChanType clichansess = {
18 cli_initchansess, /* inithandler */
19 NULL, /* checkclosehandler */
20 cli_chansessreq, /* reqhandler */
21 - NULL, /* closehandler */
22 - cli_cleanupchansess, /* cleanup */
23 + cli_closechansess, /* closehandler */
24 + NULL, /* cleanup */
25 };
26
27 static void cli_chansessreq(struct Channel *channel) {
28 @@ -84,7 +84,7 @@ out:
29
30
31 /* If the main session goes, we close it up */
32 -static void cli_cleanupchansess(const struct Channel *UNUSED(channel)) {
33 +static void cli_closechansess(const struct Channel *UNUSED(channel)) {
34 cli_tty_cleanup(); /* Restore tty modes etc */
35
36 /* This channel hasn't gone yet, so we have > 1 */
37 @@ -388,8 +388,8 @@ static const struct ChanType cli_chan_ne
38 cli_init_netcat, /* inithandler */
39 NULL,
40 NULL,
41 + cli_closechansess,
42 NULL,
43 - cli_cleanupchansess
44 };
45
46 void cli_send_netcat_request() {