]> andersk Git - openssh.git/blobdiff - mux.c
- djm@cvs.openbsd.org 2010/01/13 01:40:16
[openssh.git] / mux.c
diff --git a/mux.c b/mux.c
index ce3015c3fc9150e95ab67866244dbfe723a3f6ba..239edd5f5e36737cb1aa5c7ba3c984c208b632c6 100644 (file)
--- a/mux.c
+++ b/mux.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mux.c,v 1.6 2008/06/13 00:47:53 dtucker Exp $ */
+/* $OpenBSD: mux.c,v 1.9 2010/01/09 05:04:24 djm Exp $ */
 /*
  * Copyright (c) 2002-2008 Damien Miller <djm@openbsd.org>
  *
 
 /* from ssh.c */
 extern int tty_flag;
+extern int force_tty_flag;
 extern Options options;
 extern int stdin_null_flag;
 extern char *host;
-int subsystem_flag;
+extern int subsystem_flag;
 extern Buffer command;
 
 /* Context for session open confirmation callback */
@@ -594,11 +595,11 @@ muxclient(const char *path)
 
        /* Get authorisation status and PID of controlee */
        if (ssh_msg_recv(sock, &m) == -1) {
-               error("%s: msg_recv", __func__);
+               error("%s: Did not receive reply from master", __func__);
                goto muxerr;
        }
        if (buffer_get_char(&m) != SSHMUX_VER) {
-               error("%s: wrong version", __func__);
+               error("%s: Master replied with wrong version", __func__);
                goto muxerr;
        }
        if (buffer_get_int_ret(&allowed, &m) != 0) {
@@ -683,7 +684,7 @@ muxclient(const char *path)
        signal(SIGWINCH, control_client_sigrelay);
 
        if (tty_flag)
-               enter_raw_mode();
+               enter_raw_mode(force_tty_flag);
 
        /*
         * Stick around until the controlee closes the client_fd.
@@ -708,7 +709,7 @@ muxclient(const char *path)
        }
 
        close(sock);
-       leave_raw_mode();
+       leave_raw_mode(force_tty_flag);
        if (i > (int)sizeof(int))
                fatal("%s: master returned too much data (%d > %lu)",
                    __func__, i, (u_long)sizeof(int));
This page took 0.414537 seconds and 4 git commands to generate.