summaryrefslogtreecommitdiff
path: root/libexec/telnetd
diff options
context:
space:
mode:
Diffstat (limited to 'libexec/telnetd')
-rw-r--r--libexec/telnetd/Makefile2
-rw-r--r--libexec/telnetd/ext.h4
-rw-r--r--libexec/telnetd/sys_term.c12
-rw-r--r--libexec/telnetd/telnetd.c8
4 files changed, 16 insertions, 10 deletions
diff --git a/libexec/telnetd/Makefile b/libexec/telnetd/Makefile
index a09465173171..382885be9a1f 100644
--- a/libexec/telnetd/Makefile
+++ b/libexec/telnetd/Makefile
@@ -1,7 +1,7 @@
# @(#)Makefile 5.16 (Berkeley) 5/13/91
PROG= telnetd
-CFLAGS+=-DLINEMODE -DUSE_TERMIO -DDIAGNOSTICS
+CFLAGS+=-DUSE_TERMIO -DDIAGNOSTICS
CFLAGS+=-I${.CURDIR}/../../lib
SRCS= global.c slc.c state.c sys_term.c telnetd.c \
termstat.c utility.c
diff --git a/libexec/telnetd/ext.h b/libexec/telnetd/ext.h
index c6fd173feef4..c5f4d883f0da 100644
--- a/libexec/telnetd/ext.h
+++ b/libexec/telnetd/ext.h
@@ -218,7 +218,11 @@ extern int needtermstat;
#endif
#ifndef CRAY
+#ifndef __FreeBSD__
#define DEFAULT_IM "\r\n\r\n4.3 BSD UNIX (%h) (%t)\r\n\r\r\n\r"
#else
+#define DEFAULT_IM "\r\n\r\n%s (%%h) (%%t)\r\n\r\r\n\r"
+#endif
+#else
#define DEFAULT_IM "\r\n\r\nCray UNICOS (%h) (%t)\r\n\r\r\n\r"
#endif
diff --git a/libexec/telnetd/sys_term.c b/libexec/telnetd/sys_term.c
index e06d3b5bf065..cde67833dfb4 100644
--- a/libexec/telnetd/sys_term.c
+++ b/libexec/telnetd/sys_term.c
@@ -611,17 +611,11 @@ tty_israw()
tty_binaryin(on)
int on;
{
+/* Make 8-bit clean mode in any case */
#ifndef USE_TERMIO
- if (on)
- termbuf.lflags |= LPASS8;
- else
- termbuf.lflags &= ~LPASS8;
+ termbuf.lflags |= LPASS8;
#else
- if (on) {
- termbuf.c_iflag &= ~ISTRIP;
- } else {
- termbuf.c_iflag |= ISTRIP;
- }
+ termbuf.c_iflag &= ~ISTRIP;
#endif
}
diff --git a/libexec/telnetd/telnetd.c b/libexec/telnetd/telnetd.c
index 9708956745fd..2e504a401a41 100644
--- a/libexec/telnetd/telnetd.c
+++ b/libexec/telnetd/telnetd.c
@@ -901,7 +901,15 @@ telnet(f, p, host)
if (IM == 0)
IM = "";
} else {
+#ifdef __FreeBSD__
+ static char issue_message[256];
+ extern char *_osnamever();
+ snprintf(issue_message, sizeof issue_message,
+ DEFAULT_IM, _osnamever());
+ IM = issue_message;
+#else
IM = DEFAULT_IM;
+#endif
HE = 0;
}
edithost(HE, host_name);