aboutsummaryrefslogtreecommitdiff
path: root/libexec/telnetd
diff options
context:
space:
mode:
authorEd Schouten <ed@FreeBSD.org>2008-11-13 19:05:27 +0000
committerEd Schouten <ed@FreeBSD.org>2008-11-13 19:05:27 +0000
commit225c0f4b447b595756b07562646b5d9767dcc1ae (patch)
tree9bb27ba397c1269eb811cb12755d0f59d1c0d053 /libexec/telnetd
parentf1c1cdbb9c90f21d757dd895583bc778970ee484 (diff)
downloadsrc-225c0f4b447b595756b07562646b5d9767dcc1ae.tar.gz
src-225c0f4b447b595756b07562646b5d9767dcc1ae.zip
Convert telnetd(8) to use posix_openpt(2).
Some time ago I got some reports MPSAFE TTY broke telnetd(8). Even though it turned out to be a different problem within the TTY code, I spotted a small issue with telnetd(8). Instead of allocating PTY's using openpty(3) or posix_openpt(2), it used its own PTY allocation routine. This means that telnetd(8) still uses /dev/ptyXX-style devices. I've also increased the size of line[]. Even though 16 should be enough, we already use 13 bytes ("/dev/pts/999", including '\0'). 32 bytes gives us a little more freedom. Also enable -DSTREAMSPTY. Otherwise telnetd(8) strips the PTY's pathname to the latest slash instead of just removing "/dev/" (e.g. /dev/pts/0 -> 0, instead of pts/0). Reviewed by: rink
Notes
Notes: svn path=/head/; revision=184935
Diffstat (limited to 'libexec/telnetd')
-rw-r--r--libexec/telnetd/Makefile3
1 files changed, 2 insertions, 1 deletions
diff --git a/libexec/telnetd/Makefile b/libexec/telnetd/Makefile
index 3ad8a4e4a94a..dcc339878e14 100644
--- a/libexec/telnetd/Makefile
+++ b/libexec/telnetd/Makefile
@@ -17,7 +17,8 @@ SRCS= global.c slc.c state.c sys_term.c telnetd.c \
WARNS?= 2
WFORMAT?= 0
-CFLAGS+= -DLINEMODE -DUSE_TERMIO -DDIAGNOSTICS -DOLD_ENVIRON -DENV_HACK
+CFLAGS+= -DLINEMODE -DUSE_TERMIO -DDIAGNOSTICS -DOLD_ENVIRON \
+ -DENV_HACK -DSTREAMSPTY
.if ${MK_INET6_SUPPORT} != "no"
CFLAGS+= -DINET6