diff options
Diffstat (limited to 'usr.bin/telnet')
-rw-r--r-- | usr.bin/telnet/Makefile | 6 | ||||
-rw-r--r-- | usr.bin/telnet/commands.c | 2 | ||||
-rw-r--r-- | usr.bin/telnet/telnet.1 | 37 | ||||
-rw-r--r-- | usr.bin/telnet/telnet.c | 7 |
4 files changed, 43 insertions, 9 deletions
diff --git a/usr.bin/telnet/Makefile b/usr.bin/telnet/Makefile index 80f52d9c97c6..4eafca588985 100644 --- a/usr.bin/telnet/Makefile +++ b/usr.bin/telnet/Makefile @@ -5,6 +5,12 @@ PROG= telnet CFLAGS+=-DTERMCAP -DUSE_TERMIO +.ifdef KLUDGE +.undef KLUDGE +PROG= otelnet +NOMAN= +CFLAGS+=-DKLUDGELINEMODE +.endif CFLAGS+=-I${.CURDIR}/../../lib .if exists(/usr/lib/libcrypt.a) diff --git a/usr.bin/telnet/commands.c b/usr.bin/telnet/commands.c index c5e175bfec95..d14a448df2e9 100644 --- a/usr.bin/telnet/commands.c +++ b/usr.bin/telnet/commands.c @@ -2084,7 +2084,7 @@ status(argc, argv) printf("No connection.\n"); } # if !defined(TN3270) - printf("Escape character is '%s'.\n", control(escape)); + printf("Escape character is '%s'.\n", control(escape)); (void) fflush(stdout); # else /* !defined(TN3270) */ if ((!In3270) && ((argc < 2) || strcmp(argv[1], "notmuch"))) { diff --git a/usr.bin/telnet/telnet.1 b/usr.bin/telnet/telnet.1 index 84c55c529e66..2d4f1da898e3 100644 --- a/usr.bin/telnet/telnet.1 +++ b/usr.bin/telnet/telnet.1 @@ -41,12 +41,17 @@ protocol .Sh SYNOPSIS .Nm telnet +.Op Fl 8 +.Op Fl E +.Op Fl L +.Op Fl K .Op Fl d .Op Fl a .Op Fl n Ar tracefile .Op Fl e Ar escapechar .Oo .Op Fl l Ar user +.Op Fl r .Ar host .Op port .Oc @@ -71,6 +76,27 @@ command with those arguments. .Pp Options: .Bl -tag -width indent +.It Fl 8 +The +.Fl 8 +option allows the telnet session to be run in binary input/output +mode. +.It Fl E +The +.Fl E +option stops any character from being recognized as an escape character. +When used with the +.Fl 8 +option, this provides a completely transparent connection. +.It Fl K +The +.Fl K +option turns off all Kerberos authentication. +.It Fl L +The +.Fl L +option allows the telnet session to be run in binary output +mode. .It Fl d Sets the initial value of the .Ic debug @@ -110,14 +136,15 @@ This option may also be used with the command. .It Fl e Ar escape char Sets the initial -.Nm .Nm telnet escape character to .Ar escape char. -If -.Ar escape char -is ommitted, then -there will be no escape character. +.It Fl r +The +.Fl r +option allows the telnet session to simulate +.Xr rlogin 1 +session. .It Ar host Indicates the official name, an alias, or the Internet address of a remote host. diff --git a/usr.bin/telnet/telnet.c b/usr.bin/telnet/telnet.c index 386295261d4e..0ba7a29d3bcf 100644 --- a/usr.bin/telnet/telnet.c +++ b/usr.bin/telnet/telnet.c @@ -1936,7 +1936,7 @@ telsnd() command(0, "z\n", 2); continue; } - if (sc == escape) { + if (escape != _POSIX_VDISABLE && sc == escape) { command(0, (char *)tbp, tcc); bol = 1; count += tcc; @@ -1953,7 +1953,7 @@ telsnd() } if ((sc == '\n') || (sc == '\r')) bol = 1; - } else if (sc == escape) { + } else if (escape != _POSIX_VDISABLE && sc == escape) { /* * Double escape is a pass through of a single escape character. */ @@ -1973,7 +1973,8 @@ telsnd() } else bol = 0; #ifdef KLUDGELINEMODE - if (kludgelinemode && (globalmode&MODE_EDIT) && (sc == echoc)) { + if (kludgelinemode && (globalmode&MODE_EDIT) && + echoc != _POSIX_VDISABLE && (sc == echoc)) { if (tcc > 0 && *tbp == echoc) { tcc--; tbp++; count++; } else { |