summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2001-06-05 20:32:21 +0000
committerBen Lindstrom <mouring@eviladmin.org>2001-06-05 20:32:21 +0000
commit2b1f71baeec8c1545885dc3ec5e3ac7d96319853 (patch)
tree721f4689e8ec622e2cc5e25c6ba36b5fab835f7b
parent60567ff89008d4f519079646d984f708f6c449b7 (diff)
- 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@
-rw-r--r--ChangeLog5
-rw-r--r--clientloop.c12
-rw-r--r--readconf.c4
-rw-r--r--ssh.c10
-rw-r--r--ssh.h5
5 files changed, 22 insertions, 14 deletions
diff --git a/ChangeLog b/ChangeLog
index 1cdf267aa..e7bebfe5d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -50,6 +50,9 @@
50 - markus@cvs.openbsd.org 2001/05/24 11:12:42 50 - markus@cvs.openbsd.org 2001/05/24 11:12:42
51 [auth.c] 51 [auth.c]
52 fix comment; from jakob@ 52 fix comment; from jakob@
53 - stevesk@cvs.openbsd.org 2001/05/24 18:57:53
54 [clientloop.c readconf.c ssh.c ssh.h]
55 don't perform escape processing when ``EscapeChar none''; ok markus@
53 56
5420010528 5720010528
55 - (tim) [conifgure.in] add setvbuf test needed for sftp-int.c 58 - (tim) [conifgure.in] add setvbuf test needed for sftp-int.c
@@ -5480,4 +5483,4 @@
5480 - Wrote replacements for strlcpy and mkdtemp 5483 - Wrote replacements for strlcpy and mkdtemp
5481 - Released 1.0pre1 5484 - Released 1.0pre1
5482 5485
5483$Id: ChangeLog,v 1.1237 2001/06/05 20:27:53 mouring Exp $ 5486$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 @@
59 */ 59 */
60 60
61#include "includes.h" 61#include "includes.h"
62RCSID("$OpenBSD: clientloop.c,v 1.71 2001/05/16 21:53:53 markus Exp $"); 62RCSID("$OpenBSD: clientloop.c,v 1.72 2001/05/24 18:57:53 stevesk Exp $");
63 63
64#include "ssh.h" 64#include "ssh.h"
65#include "ssh1.h" 65#include "ssh1.h"
@@ -572,7 +572,7 @@ process_escapes(Buffer *bin, Buffer *bout, Buffer *berr, char *buf, int len)
572"%c?\r\n\ 572"%c?\r\n\
573Supported escape sequences:\r\n\ 573Supported escape sequences:\r\n\
574~. - terminate connection\r\n\ 574~. - terminate connection\r\n\
575~R - Request rekey (SSH protocol 2 only)\r\n\ 575~R - Request rekey (SSH protocol 2 only)\r\n\
576~^Z - suspend ssh\r\n\ 576~^Z - suspend ssh\r\n\
577~# - list forwarded connections\r\n\ 577~# - list forwarded connections\r\n\
578~& - background ssh (when waiting for connections to terminate)\r\n\ 578~& - background ssh (when waiting for connections to terminate)\r\n\
@@ -657,7 +657,7 @@ client_process_input(fd_set * readset)
657 packet_start(SSH_CMSG_EOF); 657 packet_start(SSH_CMSG_EOF);
658 packet_send(); 658 packet_send();
659 } 659 }
660 } else if (escape_char == -1) { 660 } else if (escape_char == SSH_ESCAPECHAR_NONE) {
661 /* 661 /*
662 * Normal successful read, and no escape character. 662 * Normal successful read, and no escape character.
663 * Just append the data to buffer. 663 * Just append the data to buffer.
@@ -765,8 +765,8 @@ client_channel_closed(int id, void *arg)
765/* 765/*
766 * Implements the interactive session with the server. This is called after 766 * Implements the interactive session with the server. This is called after
767 * the user has been authenticated, and a command has been started on the 767 * the user has been authenticated, and a command has been started on the
768 * remote host. If escape_char != -1, it is the character used as an escape 768 * remote host. If escape_char != SSH_ESCAPECHAR_NONE, it is the character
769 * character for terminating or suspending the session. 769 * used as an escape character for terminating or suspending the session.
770 */ 770 */
771 771
772int 772int
@@ -829,7 +829,7 @@ client_loop(int have_pty, int escape_char_arg, int ssh2_chan_id)
829 829
830 if (compat20) { 830 if (compat20) {
831 session_ident = ssh2_chan_id; 831 session_ident = ssh2_chan_id;
832 if (escape_char != -1) 832 if (escape_char != SSH_ESCAPECHAR_NONE)
833 channel_register_filter(session_ident, 833 channel_register_filter(session_ident,
834 simple_escape_filter); 834 simple_escape_filter);
835 if (session_ident != -1) 835 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 @@
12 */ 12 */
13 13
14#include "includes.h" 14#include "includes.h"
15RCSID("$OpenBSD: readconf.c,v 1.78 2001/05/18 14:13:28 markus Exp $"); 15RCSID("$OpenBSD: readconf.c,v 1.79 2001/05/24 18:57:53 stevesk Exp $");
16 16
17#include "ssh.h" 17#include "ssh.h"
18#include "xmalloc.h" 18#include "xmalloc.h"
@@ -641,7 +641,7 @@ parse_int:
641 else if (strlen(arg) == 1) 641 else if (strlen(arg) == 1)
642 value = (u_char) arg[0]; 642 value = (u_char) arg[0];
643 else if (strcmp(arg, "none") == 0) 643 else if (strcmp(arg, "none") == 0)
644 value = -2; 644 value = SSH_ESCAPECHAR_NONE;
645 else { 645 else {
646 fatal("%.200s line %d: Bad escape character.", 646 fatal("%.200s line %d: Bad escape character.",
647 filename, linenum); 647 filename, linenum);
diff --git a/ssh.c b/ssh.c
index c2932582f..e1024d63c 100644
--- a/ssh.c
+++ b/ssh.c
@@ -39,7 +39,7 @@
39 */ 39 */
40 40
41#include "includes.h" 41#include "includes.h"
42RCSID("$OpenBSD: ssh.c,v 1.118 2001/05/04 23:47:34 markus Exp $"); 42RCSID("$OpenBSD: ssh.c,v 1.119 2001/05/24 18:57:53 stevesk Exp $");
43 43
44#include <openssl/evp.h> 44#include <openssl/evp.h>
45#include <openssl/err.h> 45#include <openssl/err.h>
@@ -422,7 +422,7 @@ main(int ac, char **av)
422 else if (strlen(optarg) == 1) 422 else if (strlen(optarg) == 1)
423 options.escape_char = (u_char) optarg[0]; 423 options.escape_char = (u_char) optarg[0];
424 else if (strcmp(optarg, "none") == 0) 424 else if (strcmp(optarg, "none") == 0)
425 options.escape_char = -2; 425 options.escape_char = SSH_ESCAPECHAR_NONE;
426 else { 426 else {
427 fprintf(stderr, "Bad escape character '%s'.\n", optarg); 427 fprintf(stderr, "Bad escape character '%s'.\n", optarg);
428 exit(1); 428 exit(1);
@@ -961,7 +961,8 @@ ssh_session(void)
961 } 961 }
962 962
963 /* Enter the interactive session. */ 963 /* Enter the interactive session. */
964 return client_loop(have_tty, tty_flag ? options.escape_char : -1, 0); 964 return client_loop(have_tty, tty_flag ?
965 options.escape_char : SSH_ESCAPECHAR_NONE, 0);
965} 966}
966 967
967void 968void
@@ -1117,7 +1118,8 @@ ssh_session2(void)
1117 if (daemon(1, 1) < 0) 1118 if (daemon(1, 1) < 0)
1118 fatal("daemon() failed: %.200s", strerror(errno)); 1119 fatal("daemon() failed: %.200s", strerror(errno));
1119 1120
1120 return client_loop(tty_flag, tty_flag ? options.escape_char : -1, id); 1121 return client_loop(tty_flag, tty_flag ?
1122 options.escape_char : SSH_ESCAPECHAR_NONE, id);
1121} 1123}
1122 1124
1123void 1125void
diff --git a/ssh.h b/ssh.h
index 0ee62868f..383c7fe9b 100644
--- a/ssh.h
+++ b/ssh.h
@@ -10,7 +10,7 @@
10 * called by a name other than "ssh" or "Secure Shell". 10 * called by a name other than "ssh" or "Secure Shell".
11 */ 11 */
12 12
13/* RCSID("$OpenBSD: ssh.h,v 1.62 2001/01/23 10:45:10 markus Exp $"); */ 13/* RCSID("$OpenBSD: ssh.h,v 1.63 2001/05/24 18:57:53 stevesk Exp $"); */
14 14
15#ifndef SSH_H 15#ifndef SSH_H
16#define SSH_H 16#define SSH_H
@@ -96,4 +96,7 @@
96/* Name of Kerberos service for SSH to use. */ 96/* Name of Kerberos service for SSH to use. */
97#define KRB4_SERVICE_NAME "rcmd" 97#define KRB4_SERVICE_NAME "rcmd"
98 98
99/* Used to identify ``EscapeChar none'' */
100#define SSH_ESCAPECHAR_NONE -2
101
99#endif /* SSH_H */ 102#endif /* SSH_H */