summaryrefslogtreecommitdiff
path: root/mux.c
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2016-08-06 10:49:59 +0100
committerColin Watson <cjwatson@debian.org>2016-08-07 12:18:58 +0100
commit477bb7636238c106f8cd7c868a8c0c5eabcfb3db (patch)
tree601176af2ecf358c36b766776a86845ad7a3cd6f /mux.c
parent747fac2de0d889183f67f6900194c0462c558544 (diff)
parent4c914ccd85bbf391c4dc61b85e3c178fef465e3f (diff)
New upstream release (7.3p1).
Diffstat (limited to 'mux.c')
-rw-r--r--mux.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/mux.c b/mux.c
index 6bf53ebd9..98e3c0068 100644
--- a/mux.c
+++ b/mux.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: mux.c,v 1.58 2016/01/13 23:04:47 djm Exp $ */ 1/* $OpenBSD: mux.c,v 1.60 2016/06/03 03:14:41 dtucker Exp $ */
2/* 2/*
3 * Copyright (c) 2002-2008 Damien Miller <djm@openbsd.org> 3 * Copyright (c) 2002-2008 Damien Miller <djm@openbsd.org>
4 * 4 *
@@ -88,8 +88,6 @@ extern char *host;
88extern int subsystem_flag; 88extern int subsystem_flag;
89extern Buffer command; 89extern Buffer command;
90extern volatile sig_atomic_t quit_pending; 90extern volatile sig_atomic_t quit_pending;
91extern char *stdio_forward_host;
92extern int stdio_forward_port;
93 91
94/* Context for session open confirmation callback */ 92/* Context for session open confirmation callback */
95struct mux_session_confirm_ctx { 93struct mux_session_confirm_ctx {
@@ -1297,7 +1295,7 @@ muxserver_listen(void)
1297 /* Now atomically "move" the mux socket into position */ 1295 /* Now atomically "move" the mux socket into position */
1298 if (link(options.control_path, orig_control_path) != 0) { 1296 if (link(options.control_path, orig_control_path) != 0) {
1299 if (errno != EEXIST) { 1297 if (errno != EEXIST) {
1300 fatal("%s: link mux listener %s => %s: %s", __func__, 1298 fatal("%s: link mux listener %s => %s: %s", __func__,
1301 options.control_path, orig_control_path, 1299 options.control_path, orig_control_path,
1302 strerror(errno)); 1300 strerror(errno));
1303 } 1301 }
@@ -1991,8 +1989,8 @@ mux_client_request_stdio_fwd(int fd)
1991 buffer_put_int(&m, MUX_C_NEW_STDIO_FWD); 1989 buffer_put_int(&m, MUX_C_NEW_STDIO_FWD);
1992 buffer_put_int(&m, muxclient_request_id); 1990 buffer_put_int(&m, muxclient_request_id);
1993 buffer_put_cstring(&m, ""); /* reserved */ 1991 buffer_put_cstring(&m, ""); /* reserved */
1994 buffer_put_cstring(&m, stdio_forward_host); 1992 buffer_put_cstring(&m, options.stdio_forward_host);
1995 buffer_put_int(&m, stdio_forward_port); 1993 buffer_put_int(&m, options.stdio_forward_port);
1996 1994
1997 if (mux_client_write_packet(fd, &m) != 0) 1995 if (mux_client_write_packet(fd, &m) != 0)
1998 fatal("%s: write packet: %s", __func__, strerror(errno)); 1996 fatal("%s: write packet: %s", __func__, strerror(errno));
@@ -2116,7 +2114,7 @@ muxclient(const char *path)
2116 u_int pid; 2114 u_int pid;
2117 2115
2118 if (muxclient_command == 0) { 2116 if (muxclient_command == 0) {
2119 if (stdio_forward_host != NULL) 2117 if (options.stdio_forward_host != NULL)
2120 muxclient_command = SSHMUX_COMMAND_STDIO_FWD; 2118 muxclient_command = SSHMUX_COMMAND_STDIO_FWD;
2121 else 2119 else
2122 muxclient_command = SSHMUX_COMMAND_OPEN; 2120 muxclient_command = SSHMUX_COMMAND_OPEN;