summaryrefslogtreecommitdiff
path: root/usr.bin/ssh/ssh.c
diff options
context:
space:
mode:
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);