]> andersk Git - openssh.git/blobdiff - clientloop.c
- djm@cvs.openbsd.org 2006/03/19 07:41:30
[openssh.git] / clientloop.c
index 001c8f119a997984694034c4fff70570646825ca..6d58a5afbc8ac25ce9e2076ec7499bb7ba302377 100644 (file)
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: clientloop.c,v 1.145 2005/10/30 08:52:17 djm Exp $");
+
+#include <sys/types.h>
+#ifdef HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#include <sys/ioctl.h>
+
+#include <ctype.h>
+#ifdef HAVE_PATHS_H
+#include <paths.h>
+#endif
+#include <signal.h>
+#include <termios.h>
 
 #include "ssh.h"
 #include "ssh1.h"
@@ -77,6 +89,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 +927,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 +1398,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 +1700,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 +1733,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.037336 seconds and 4 git commands to generate.