diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | ssh.c | 15 |
2 files changed, 17 insertions, 4 deletions
@@ -13,6 +13,10 @@ | |||
13 | - dtucker@cvs.openbsd.org 2005/05/26 09:08:12 | 13 | - dtucker@cvs.openbsd.org 2005/05/26 09:08:12 |
14 | [ssh-keygen.c] | 14 | [ssh-keygen.c] |
15 | uint32_t -> u_int32_t for consistency; ok djm@ | 15 | uint32_t -> u_int32_t for consistency; ok djm@ |
16 | - djm@cvs.openbsd.org 2005/05/27 08:30:37 | ||
17 | [ssh.c] | ||
18 | fix -O for cases where no ControlPath has been specified or socket at | ||
19 | ControlPath is not contactable; spotted by and ok avsm@ | ||
16 | 20 | ||
17 | 20050531 | 21 | 20050531 |
18 | - (dtucker) [contrib/aix/pam.conf] Correct comments. From davidl at | 22 | - (dtucker) [contrib/aix/pam.conf] Correct comments. From davidl at |
@@ -2661,4 +2665,4 @@ | |||
2661 | - (djm) Trim deprecated options from INSTALL. Mention UsePAM | 2665 | - (djm) Trim deprecated options from INSTALL. Mention UsePAM |
2662 | - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu | 2666 | - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu |
2663 | 2667 | ||
2664 | $Id: ChangeLog,v 1.3806 2005/06/01 13:02:25 dtucker Exp $ | 2668 | $Id: ChangeLog,v 1.3807 2005/06/01 13:08:51 dtucker Exp $ |
@@ -40,7 +40,7 @@ | |||
40 | */ | 40 | */ |
41 | 41 | ||
42 | #include "includes.h" | 42 | #include "includes.h" |
43 | RCSID("$OpenBSD: ssh.c,v 1.239 2005/05/10 10:30:43 djm Exp $"); | 43 | RCSID("$OpenBSD: ssh.c,v 1.240 2005/05/27 08:30:37 djm Exp $"); |
44 | 44 | ||
45 | #include <openssl/evp.h> | 45 | #include <openssl/evp.h> |
46 | #include <openssl/err.h> | 46 | #include <openssl/err.h> |
@@ -145,7 +145,7 @@ pid_t proxy_command_pid = 0; | |||
145 | int control_fd = -1; | 145 | int control_fd = -1; |
146 | 146 | ||
147 | /* Multiplexing control command */ | 147 | /* Multiplexing control command */ |
148 | static u_int mux_command = SSHMUX_COMMAND_OPEN; | 148 | static u_int mux_command = 0; |
149 | 149 | ||
150 | /* Only used in control client mode */ | 150 | /* Only used in control client mode */ |
151 | volatile sig_atomic_t control_client_terminate = 0; | 151 | volatile sig_atomic_t control_client_terminate = 0; |
@@ -612,8 +612,13 @@ again: | |||
612 | options.control_path = tilde_expand_filename( | 612 | options.control_path = tilde_expand_filename( |
613 | options.control_path, original_real_uid); | 613 | options.control_path, original_real_uid); |
614 | } | 614 | } |
615 | if (options.control_path != NULL && options.control_master == 0) | 615 | if (mux_command != 0 && options.control_path == NULL) |
616 | fatal("No ControlPath specified for \"-O\" command"); | ||
617 | if (options.control_path != NULL && options.control_master == 0) { | ||
618 | if (mux_command == 0) | ||
619 | mux_command = SSHMUX_COMMAND_OPEN; | ||
616 | control_client(options.control_path); | 620 | control_client(options.control_path); |
621 | } | ||
617 | 622 | ||
618 | /* Open a connection to the remote host. */ | 623 | /* Open a connection to the remote host. */ |
619 | if (ssh_connect(host, &hostaddr, options.port, | 624 | if (ssh_connect(host, &hostaddr, options.port, |
@@ -1303,6 +1308,10 @@ control_client(const char *path) | |||
1303 | fatal("%s socket(): %s", __func__, strerror(errno)); | 1308 | fatal("%s socket(): %s", __func__, strerror(errno)); |
1304 | 1309 | ||
1305 | if (connect(sock, (struct sockaddr*)&addr, addr_len) == -1) { | 1310 | if (connect(sock, (struct sockaddr*)&addr, addr_len) == -1) { |
1311 | if (mux_command != SSHMUX_COMMAND_OPEN) { | ||
1312 | fatal("Control socket connect(%.100s): %s", path, | ||
1313 | strerror(errno)); | ||
1314 | } | ||
1306 | if (errno == ENOENT) | 1315 | if (errno == ENOENT) |
1307 | debug("Control socket \"%.100s\" does not exist", path); | 1316 | debug("Control socket \"%.100s\" does not exist", path); |
1308 | else { | 1317 | else { |