]> andersk Git - openssh.git/commitdiff
- stevesk@cvs.openbsd.org 2001/05/24 18:57:53
authormouring <mouring>
Tue, 5 Jun 2001 20:32:21 +0000 (20:32 +0000)
committermouring <mouring>
Tue, 5 Jun 2001 20:32:21 +0000 (20:32 +0000)
     [clientloop.c readconf.c ssh.c ssh.h]
     don't perform escape processing when ``EscapeChar none''; ok markus@

ChangeLog
clientloop.c
readconf.c
ssh.c
ssh.h

index 145ff7752b643443f26dbaa2b845ca9c39db3594..69e918c1e52fbb3afb8ef5089da1bb9bd8ad980c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -50,6 +50,9 @@
    - markus@cvs.openbsd.org 2001/05/24 11:12:42
      [auth.c]                                  
      fix comment; from jakob@                  
+   - stevesk@cvs.openbsd.org 2001/05/24 18:57:53                         
+     [clientloop.c readconf.c ssh.c ssh.h]                               
+     don't perform escape processing when ``EscapeChar none''; ok markus@
 
 20010528
  - (tim) [conifgure.in] add setvbuf test needed for sftp-int.c
index cea6e77dcee294c331ae29ed75bff8e1a3dac4a9..74926836d22155979bb6008e1d93facf6b62966f 100644 (file)
@@ -59,7 +59,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: clientloop.c,v 1.71 2001/05/16 21:53:53 markus Exp $");
+RCSID("$OpenBSD: clientloop.c,v 1.72 2001/05/24 18:57:53 stevesk Exp $");
 
 #include "ssh.h"
 #include "ssh1.h"
@@ -572,7 +572,7 @@ process_escapes(Buffer *bin, Buffer *bout, Buffer *berr, char *buf, int len)
 "%c?\r\n\
 Supported escape sequences:\r\n\
 ~.  - terminate connection\r\n\
-~R - Request rekey (SSH protocol 2 only)\r\n\
+~R  - Request rekey (SSH protocol 2 only)\r\n\
 ~^Z - suspend ssh\r\n\
 ~#  - list forwarded connections\r\n\
 ~&  - background ssh (when waiting for connections to terminate)\r\n\
@@ -657,7 +657,7 @@ client_process_input(fd_set * readset)
                                packet_start(SSH_CMSG_EOF);
                                packet_send();
                        }
-               } else if (escape_char == -1) {
+               } else if (escape_char == SSH_ESCAPECHAR_NONE) {
                        /*
                         * Normal successful read, and no escape character.
                         * Just append the data to buffer.
@@ -765,8 +765,8 @@ client_channel_closed(int id, void *arg)
 /*
  * Implements the interactive session with the server.  This is called after
  * the user has been authenticated, and a command has been started on the
- * remote host.  If escape_char != -1, it is the character used as an escape
- * character for terminating or suspending the session.
+ * remote host.  If escape_char != SSH_ESCAPECHAR_NONE, it is the character
+ * used as an escape character for terminating or suspending the session.
  */
 
 int
@@ -829,7 +829,7 @@ client_loop(int have_pty, int escape_char_arg, int ssh2_chan_id)
 
        if (compat20) {
                session_ident = ssh2_chan_id;
-               if (escape_char != -1)
+               if (escape_char != SSH_ESCAPECHAR_NONE)
                        channel_register_filter(session_ident,
                            simple_escape_filter);
                if (session_ident != -1)
index 542c76f330d8737a56ac713839f89c385efb606a..e9aa1818af2a9993b29374e26f06cc92e0d67aae 100644 (file)
@@ -12,7 +12,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: readconf.c,v 1.78 2001/05/18 14:13:28 markus Exp $");
+RCSID("$OpenBSD: readconf.c,v 1.79 2001/05/24 18:57:53 stevesk Exp $");
 
 #include "ssh.h"
 #include "xmalloc.h"
@@ -641,7 +641,7 @@ parse_int:
                else if (strlen(arg) == 1)
                        value = (u_char) arg[0];
                else if (strcmp(arg, "none") == 0)
-                       value = -2;
+                       value = SSH_ESCAPECHAR_NONE;
                else {
                        fatal("%.200s line %d: Bad escape character.",
                              filename, linenum);
diff --git a/ssh.c b/ssh.c
index c2932582fd4e4a1d632473fed7ecf43f701a9edb..e1024d63ccf07317a9294c90beb55f8b03a1751a 100644 (file)
--- a/ssh.c
+++ b/ssh.c
@@ -39,7 +39,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: ssh.c,v 1.118 2001/05/04 23:47:34 markus Exp $");
+RCSID("$OpenBSD: ssh.c,v 1.119 2001/05/24 18:57:53 stevesk Exp $");
 
 #include <openssl/evp.h>
 #include <openssl/err.h>
@@ -422,7 +422,7 @@ main(int ac, char **av)
                        else if (strlen(optarg) == 1)
                                options.escape_char = (u_char) optarg[0];
                        else if (strcmp(optarg, "none") == 0)
-                               options.escape_char = -2;
+                               options.escape_char = SSH_ESCAPECHAR_NONE;
                        else {
                                fprintf(stderr, "Bad escape character '%s'.\n", optarg);
                                exit(1);
@@ -961,7 +961,8 @@ ssh_session(void)
        }
 
        /* Enter the interactive session. */
-       return client_loop(have_tty, tty_flag ? options.escape_char : -1, 0);
+       return client_loop(have_tty, tty_flag ?
+           options.escape_char : SSH_ESCAPECHAR_NONE, 0);
 }
 
 void
@@ -1117,7 +1118,8 @@ ssh_session2(void)
                if (daemon(1, 1) < 0)
                        fatal("daemon() failed: %.200s", strerror(errno));
 
-       return client_loop(tty_flag, tty_flag ? options.escape_char : -1, id);
+       return client_loop(tty_flag, tty_flag ?
+           options.escape_char : SSH_ESCAPECHAR_NONE, id);
 }
 
 void
diff --git a/ssh.h b/ssh.h
index 0ee62868f64a07119413163c4c220184bb66b14b..383c7fe9b1c9214225718f62c951d0bbb5063d6f 100644 (file)
--- a/ssh.h
+++ b/ssh.h
@@ -10,7 +10,7 @@
  * called by a name other than "ssh" or "Secure Shell".
  */
 
-/* RCSID("$OpenBSD: ssh.h,v 1.62 2001/01/23 10:45:10 markus Exp $"); */
+/* RCSID("$OpenBSD: ssh.h,v 1.63 2001/05/24 18:57:53 stevesk Exp $"); */
 
 #ifndef SSH_H
 #define SSH_H
@@ -96,4 +96,7 @@
 /* Name of Kerberos service for SSH to use. */
 #define KRB4_SERVICE_NAME              "rcmd"
 
+/* Used to identify ``EscapeChar none'' */
+#define SSH_ESCAPECHAR_NONE            -2
+
 #endif                         /* SSH_H */
This page took 0.056724 seconds and 5 git commands to generate.