diff --git a/ChangeLog b/ChangeLog index 1cdf267aa..e7bebfe5d 100644 --- 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 @@ -5480,4 +5483,4 @@ - Wrote replacements for strlcpy and mkdtemp - Released 1.0pre1 -$Id: ChangeLog,v 1.1237 2001/06/05 20:27:53 mouring Exp $ +$Id: ChangeLog,v 1.1238 2001/06/05 20:32:21 mouring Exp $ diff --git a/clientloop.c b/clientloop.c index cea6e77dc..74926836d 100644 --- a/clientloop.c +++ b/clientloop.c @@ -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) diff --git a/readconf.c b/readconf.c index 542c76f33..e9aa1818a 100644 --- a/readconf.c +++ b/readconf.c @@ -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 c2932582f..e1024d63c 100644 --- 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 #include @@ -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 0ee62868f..383c7fe9b 100644 --- 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 */