summaryrefslogtreecommitdiff
path: root/usr.bin/ssh/ssh.c
diff options
context:
space:
mode:
authorDamien Miller <djm@cvs.openbsd.org>2004-06-17 15:10:15 +0000
committerDamien Miller <djm@cvs.openbsd.org>2004-06-17 15:10:15 +0000
commit3a55c8c87458ea7988be376c7e0ca408b1c1409a (patch)
tree184da3cf2a5f52d63e20e8ed72ea7304bcf9660b /usr.bin/ssh/ssh.c
parent523188aba06aeedcd6e58a5499cc1980979a1874 (diff)
Add option for confirmation (ControlMaster=ask) via ssh-askpass before opening
shared connections; ok markus@
Diffstat (limited to 'usr.bin/ssh/ssh.c')
-rw-r--r--usr.bin/ssh/ssh.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.bin/ssh/ssh.c b/usr.bin/ssh/ssh.c
index 7a1376bf425..f34818916ce 100644
--- a/usr.bin/ssh/ssh.c
+++ b/usr.bin/ssh/ssh.c
@@ -40,7 +40,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: ssh.c,v 1.215 2004/06/17 14:52:48 djm Exp $");
+RCSID("$OpenBSD: ssh.c,v 1.216 2004/06/17 15:10:14 djm Exp $");
#include <openssl/evp.h>
#include <openssl/err.h>
@@ -1028,7 +1028,7 @@ ssh_control_listener(void)
struct sockaddr_un addr;
mode_t old_umask;
- if (options.control_path == NULL || options.control_master != 1)
+ if (options.control_path == NULL || options.control_master <= 0)
return;
memset(&addr, '\0', sizeof(addr));
@@ -1250,6 +1250,9 @@ control_client(const char *path)
fatal("%s: msg_recv", __func__);
if (buffer_get_char(&m) != 0)
fatal("%s: wrong version", __func__);
+ /* Connection allowed? */
+ if (buffer_get_int(&m) != 1)
+ fatal("Connection to master denied");
control_server_pid = buffer_get_int(&m);
buffer_clear(&m);