summaryrefslogtreecommitdiff
path: root/ssh.c
diff options
context:
space:
mode:
Diffstat (limited to 'ssh.c')
-rw-r--r--ssh.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/ssh.c b/ssh.c
index 1b03543c3..d85e56fd7 100644
--- a/ssh.c
+++ b/ssh.c
@@ -40,7 +40,7 @@
40 */ 40 */
41 41
42#include "includes.h" 42#include "includes.h"
43RCSID("$OpenBSD: ssh.c,v 1.233 2005/03/01 17:22:06 jmc Exp $"); 43RCSID("$OpenBSD: ssh.c,v 1.234 2005/03/10 22:01:06 deraadt Exp $");
44 44
45#include <openssl/evp.h> 45#include <openssl/evp.h>
46#include <openssl/err.h> 46#include <openssl/err.h>
@@ -861,8 +861,8 @@ ssh_init_forwarding(void)
861 for (i = 0; i < options.num_local_forwards; i++) { 861 for (i = 0; i < options.num_local_forwards; i++) {
862 debug("Local connections to %.200s:%d forwarded to remote " 862 debug("Local connections to %.200s:%d forwarded to remote "
863 "address %.200s:%d", 863 "address %.200s:%d",
864 (options.local_forwards[i].listen_host == NULL) ? 864 (options.local_forwards[i].listen_host == NULL) ?
865 (options.gateway_ports ? "*" : "LOCALHOST") : 865 (options.gateway_ports ? "*" : "LOCALHOST") :
866 options.local_forwards[i].listen_host, 866 options.local_forwards[i].listen_host,
867 options.local_forwards[i].listen_port, 867 options.local_forwards[i].listen_port,
868 options.local_forwards[i].connect_host, 868 options.local_forwards[i].connect_host,
@@ -881,6 +881,8 @@ ssh_init_forwarding(void)
881 for (i = 0; i < options.num_remote_forwards; i++) { 881 for (i = 0; i < options.num_remote_forwards; i++) {
882 debug("Remote connections from %.200s:%d forwarded to " 882 debug("Remote connections from %.200s:%d forwarded to "
883 "local address %.200s:%d", 883 "local address %.200s:%d",
884 (options.remote_forwards[i].listen_host == NULL) ?
885 (options.gateway_ports ? "*" : "LOCALHOST") :
884 options.remote_forwards[i].listen_host, 886 options.remote_forwards[i].listen_host,
885 options.remote_forwards[i].listen_port, 887 options.remote_forwards[i].listen_port,
886 options.remote_forwards[i].connect_host, 888 options.remote_forwards[i].connect_host,
@@ -1098,7 +1100,7 @@ ssh_control_listener(void)
1098 old_umask = umask(0177); 1100 old_umask = umask(0177);
1099 if (bind(control_fd, (struct sockaddr*)&addr, addr_len) == -1) { 1101 if (bind(control_fd, (struct sockaddr*)&addr, addr_len) == -1) {
1100 control_fd = -1; 1102 control_fd = -1;
1101 if (errno == EINVAL) 1103 if (errno == EINVAL || errno == EADDRINUSE)
1102 fatal("ControlSocket %s already exists", 1104 fatal("ControlSocket %s already exists",
1103 options.control_path); 1105 options.control_path);
1104 else 1106 else
@@ -1348,7 +1350,7 @@ control_client(const char *path)
1348 1350
1349 switch (mux_command) { 1351 switch (mux_command) {
1350 case SSHMUX_COMMAND_ALIVE_CHECK: 1352 case SSHMUX_COMMAND_ALIVE_CHECK:
1351 fprintf(stderr, "Master running (pid=%d)\r\n", 1353 fprintf(stderr, "Master running (pid=%d)\r\n",
1352 control_server_pid); 1354 control_server_pid);
1353 exit(0); 1355 exit(0);
1354 case SSHMUX_COMMAND_TERMINATE: 1356 case SSHMUX_COMMAND_TERMINATE: