|
Lines 151-157
int ostdin_null_flag, ono_shell_flag, otty_flag, orequest_tty;
Link Here
|
| 151 |
*/ |
151 |
*/ |
| 152 |
int fork_after_authentication_flag = 0; |
152 |
int fork_after_authentication_flag = 0; |
| 153 |
|
153 |
|
| 154 |
/* forward stdio to remote host and port */ |
154 |
/* forward stdio to remote host and port or unix socket */ |
| 155 |
char *stdio_forward_host = NULL; |
155 |
char *stdio_forward_host = NULL; |
| 156 |
int stdio_forward_port = 0; |
156 |
int stdio_forward_port = 0; |
| 157 |
|
157 |
|
|
Lines 761-767
main(int ac, char **av)
Link Here
|
| 761 |
if (muxclient_command != 0) |
761 |
if (muxclient_command != 0) |
| 762 |
fatal("Cannot specify stdio forward with -O"); |
762 |
fatal("Cannot specify stdio forward with -O"); |
| 763 |
if (parse_forward(&fwd, optarg, 1, 0)) { |
763 |
if (parse_forward(&fwd, optarg, 1, 0)) { |
| 764 |
stdio_forward_host = fwd.listen_host; |
764 |
stdio_forward_host = |
|
|
765 |
((fwd.listen_port == PORT_STREAMLOCAL) ? |
| 766 |
fwd.listen_path : fwd.listen_host); |
| 765 |
stdio_forward_port = fwd.listen_port; |
767 |
stdio_forward_port = fwd.listen_port; |
| 766 |
free(fwd.connect_host); |
768 |
free(fwd.connect_host); |
| 767 |
} else { |
769 |
} else { |
|
Lines 1498-1504
ssh_init_stdio_forwarding(void)
Link Here
|
| 1498 |
if (!compat20) |
1500 |
if (!compat20) |
| 1499 |
fatal("stdio forwarding require Protocol 2"); |
1501 |
fatal("stdio forwarding require Protocol 2"); |
| 1500 |
|
1502 |
|
| 1501 |
debug3("%s: %s:%d", __func__, stdio_forward_host, stdio_forward_port); |
1503 |
if (stdio_forward_port == PORT_STREAMLOCAL) |
|
|
1504 |
debug3("%s: stream local %s", __func__, stdio_forward_host); |
| 1505 |
else |
| 1506 |
debug3("%s: %s:%d", __func__, stdio_forward_host, |
| 1507 |
stdio_forward_port); |
| 1502 |
|
1508 |
|
| 1503 |
if ((in = dup(STDIN_FILENO)) < 0 || |
1509 |
if ((in = dup(STDIN_FILENO)) < 0 || |
| 1504 |
(out = dup(STDOUT_FILENO)) < 0) |
1510 |
(out = dup(STDOUT_FILENO)) < 0) |