|
Lines 122-127
extern int muxserver_sock;
Link Here
|
| 122 |
*/ |
122 |
*/ |
| 123 |
extern char *host; |
123 |
extern char *host; |
| 124 |
|
124 |
|
|
|
125 |
/* Force TTY allocation */ |
| 126 |
extern int force_tty_flag; |
| 127 |
|
| 125 |
/* |
128 |
/* |
| 126 |
* Flag to indicate that we have received a window change signal which has |
129 |
* Flag to indicate that we have received a window change signal which has |
| 127 |
* not yet been processed. This will cause a message indicating the new |
130 |
* not yet been processed. This will cause a message indicating the new |
|
Lines 602-608
client_suspend_self(Buffer *bin, Buffer
Link Here
|
| 602 |
atomicio(vwrite, fileno(stderr), buffer_ptr(berr), |
605 |
atomicio(vwrite, fileno(stderr), buffer_ptr(berr), |
| 603 |
buffer_len(berr)); |
606 |
buffer_len(berr)); |
| 604 |
|
607 |
|
| 605 |
leave_raw_mode(); |
608 |
leave_raw_mode(force_tty_flag); |
| 606 |
|
609 |
|
| 607 |
/* |
610 |
/* |
| 608 |
* Free (and clear) the buffer to reduce the amount of data that gets |
611 |
* Free (and clear) the buffer to reduce the amount of data that gets |
|
Lines 623-629
client_suspend_self(Buffer *bin, Buffer
Link Here
|
| 623 |
buffer_init(bout); |
626 |
buffer_init(bout); |
| 624 |
buffer_init(berr); |
627 |
buffer_init(berr); |
| 625 |
|
628 |
|
| 626 |
enter_raw_mode(); |
629 |
enter_raw_mode(force_tty_flag); |
| 627 |
} |
630 |
} |
| 628 |
|
631 |
|
| 629 |
static void |
632 |
static void |
|
Lines 765-771
process_cmdline(void)
Link Here
|
| 765 |
bzero(&fwd, sizeof(fwd)); |
768 |
bzero(&fwd, sizeof(fwd)); |
| 766 |
fwd.listen_host = fwd.connect_host = NULL; |
769 |
fwd.listen_host = fwd.connect_host = NULL; |
| 767 |
|
770 |
|
| 768 |
leave_raw_mode(); |
771 |
leave_raw_mode(force_tty_flag); |
| 769 |
handler = signal(SIGINT, SIG_IGN); |
772 |
handler = signal(SIGINT, SIG_IGN); |
| 770 |
cmd = s = read_passphrase("\r\nssh> ", RP_ECHO); |
773 |
cmd = s = read_passphrase("\r\nssh> ", RP_ECHO); |
| 771 |
if (s == NULL) |
774 |
if (s == NULL) |
|
Lines 868-874
process_cmdline(void)
Link Here
|
| 868 |
|
871 |
|
| 869 |
out: |
872 |
out: |
| 870 |
signal(SIGINT, handler); |
873 |
signal(SIGINT, handler); |
| 871 |
enter_raw_mode(); |
874 |
enter_raw_mode(force_tty_flag); |
| 872 |
if (cmd) |
875 |
if (cmd) |
| 873 |
xfree(cmd); |
876 |
xfree(cmd); |
| 874 |
if (fwd.listen_host != NULL) |
877 |
if (fwd.listen_host != NULL) |
|
Lines 987-993
process_escapes(Channel *c, Buffer *bin,
Link Here
|
| 987 |
* more new connections). |
990 |
* more new connections). |
| 988 |
*/ |
991 |
*/ |
| 989 |
/* Restore tty modes. */ |
992 |
/* Restore tty modes. */ |
| 990 |
leave_raw_mode(); |
993 |
leave_raw_mode(force_tty_flag); |
| 991 |
|
994 |
|
| 992 |
/* Stop listening for new connections. */ |
995 |
/* Stop listening for new connections. */ |
| 993 |
channel_stop_listening(); |
996 |
channel_stop_listening(); |
|
Lines 1279-1285
client_channel_closed(int id, void *arg)
Link Here
|
| 1279 |
{ |
1282 |
{ |
| 1280 |
channel_cancel_cleanup(id); |
1283 |
channel_cancel_cleanup(id); |
| 1281 |
session_closed = 1; |
1284 |
session_closed = 1; |
| 1282 |
leave_raw_mode(); |
1285 |
leave_raw_mode(force_tty_flag); |
| 1283 |
} |
1286 |
} |
| 1284 |
|
1287 |
|
| 1285 |
/* |
1288 |
/* |
|
Lines 1352-1358
client_loop(int have_pty, int escape_cha
Link Here
|
| 1352 |
signal(SIGWINCH, window_change_handler); |
1355 |
signal(SIGWINCH, window_change_handler); |
| 1353 |
|
1356 |
|
| 1354 |
if (have_pty) |
1357 |
if (have_pty) |
| 1355 |
enter_raw_mode(); |
1358 |
enter_raw_mode(force_tty_flag); |
| 1356 |
|
1359 |
|
| 1357 |
if (compat20) { |
1360 |
if (compat20) { |
| 1358 |
session_ident = ssh2_chan_id; |
1361 |
session_ident = ssh2_chan_id; |
|
Lines 1486-1492
client_loop(int have_pty, int escape_cha
Link Here
|
| 1486 |
channel_free_all(); |
1489 |
channel_free_all(); |
| 1487 |
|
1490 |
|
| 1488 |
if (have_pty) |
1491 |
if (have_pty) |
| 1489 |
leave_raw_mode(); |
1492 |
leave_raw_mode(force_tty_flag); |
| 1490 |
|
1493 |
|
| 1491 |
/* restore blocking io */ |
1494 |
/* restore blocking io */ |
| 1492 |
if (!isatty(fileno(stdin))) |
1495 |
if (!isatty(fileno(stdin))) |
|
Lines 2044-2050
client_init_dispatch(void)
Link Here
|
| 2044 |
void |
2047 |
void |
| 2045 |
cleanup_exit(int i) |
2048 |
cleanup_exit(int i) |
| 2046 |
{ |
2049 |
{ |
| 2047 |
leave_raw_mode(); |
2050 |
leave_raw_mode(force_tty_flag); |
| 2048 |
leave_non_blocking(); |
2051 |
leave_non_blocking(); |
| 2049 |
if (options.control_path != NULL && muxserver_sock != -1) |
2052 |
if (options.control_path != NULL && muxserver_sock != -1) |
| 2050 |
unlink(options.control_path); |
2053 |
unlink(options.control_path); |