]> andersk Git - openssh.git/blobdiff - clientloop.c
- jmc@cvs.openbsd.org 2006/02/06 21:44:47
[openssh.git] / clientloop.c
index 001c8f119a997984694034c4fff70570646825ca..b76f7cfe05369cd11661ead9d068ecf913915066 100644 (file)
@@ -59,7 +59,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: clientloop.c,v 1.145 2005/10/30 08:52:17 djm Exp $");
+RCSID("$OpenBSD: clientloop.c,v 1.149 2005/12/30 15:56:37 reyk Exp $");
 
 #include "ssh.h"
 #include "ssh1.h"
@@ -77,6 +77,7 @@ RCSID("$OpenBSD: clientloop.c,v 1.145 2005/10/30 08:52:17 djm Exp $");
 #include "log.h"
 #include "readconf.h"
 #include "clientloop.h"
+#include "sshconnect.h"
 #include "authfd.h"
 #include "atomicio.h"
 #include "sshpty.h"
@@ -914,6 +915,15 @@ process_cmdline(void)
                logit("      -Lport:host:hostport    Request local forward");
                logit("      -Rport:host:hostport    Request remote forward");
                logit("      -KRhostport             Cancel remote forward");
+               if (!options.permit_local_command)
+                       goto out;
+               logit("      !args                   Execute local command");
+               goto out;
+       }
+
+       if (*s == '!' && options.permit_local_command) {
+               s++;
+               ssh_local_cmd(s);
                goto out;
        }
 
@@ -1376,7 +1386,7 @@ client_loop(int have_pty, int escape_char_arg, int ssh2_chan_id)
                session_ident = ssh2_chan_id;
                if (escape_char != SSH_ESCAPECHAR_NONE)
                        channel_register_filter(session_ident,
-                           simple_escape_filter);
+                           simple_escape_filter, NULL);
                if (session_ident != -1)
                        channel_register_cleanup(session_ident,
                            client_channel_closed, 0);
@@ -1678,7 +1688,7 @@ client_request_x11(const char *request_type, int rchan)
 
        if (!options.forward_x11) {
                error("Warning: ssh server tried X11 forwarding.");
-               error("Warning: this is probably a break in attempt by a malicious server.");
+               error("Warning: this is probably a break-in attempt by a malicious server.");
                return NULL;
        }
        originator = packet_get_string(NULL);
@@ -1711,7 +1721,7 @@ client_request_agent(const char *request_type, int rchan)
 
        if (!options.forward_agent) {
                error("Warning: ssh server tried agent forwarding.");
-               error("Warning: this is probably a break in attempt by a malicious server.");
+               error("Warning: this is probably a break-in attempt by a malicious server.");
                return NULL;
        }
        sock =  ssh_get_authentication_socket();
This page took 0.046705 seconds and 4 git commands to generate.