From d0d1fb6198f47fb1cbbd4d7fab0beecf971598b1 Mon Sep 17 00:00:00 2001 From: Paul Traina Date: Tue, 5 Sep 1995 19:30:05 +0000 Subject: [PATCH] Set erase character for login: prompt. Submitted by: Peter Wemm & John Capo --- eBones/libexec/telnetd/sys_term.c | 6 +++++- secure/libexec/telnetd/sys_term.c | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/eBones/libexec/telnetd/sys_term.c b/eBones/libexec/telnetd/sys_term.c index de577eda083b..5616c386cd8a 100644 --- a/eBones/libexec/telnetd/sys_term.c +++ b/eBones/libexec/telnetd/sys_term.c @@ -1076,6 +1076,7 @@ extern void utmp_sig_notify P((int)); getptyslave() { register int t = -1; + char erase; #if !defined(CRAY) || !defined(NEWINIT) # ifdef LINEMODE @@ -1092,12 +1093,13 @@ getptyslave() * if linemode was turned on * terminal window size * terminal speed + * erase character * so that we can re-set them if we need to. */ # ifdef LINEMODE waslm = tty_linemode(); # endif - + erase = termbuf.c_cc[VERASE]; /* * Make sure that we don't have a controlling tty, and @@ -1184,6 +1186,8 @@ getptyslave() tty_rspeed((def_rspeed > 0) ? def_rspeed : 9600); tty_tspeed((def_tspeed > 0) ? def_tspeed : 9600); # ifdef LINEMODE + if (erase) + termbuf.c_cc[VERASE] = erase; if (waslm) tty_setlinemode(1); # endif /* LINEMODE */ diff --git a/secure/libexec/telnetd/sys_term.c b/secure/libexec/telnetd/sys_term.c index de577eda083b..5616c386cd8a 100644 --- a/secure/libexec/telnetd/sys_term.c +++ b/secure/libexec/telnetd/sys_term.c @@ -1076,6 +1076,7 @@ extern void utmp_sig_notify P((int)); getptyslave() { register int t = -1; + char erase; #if !defined(CRAY) || !defined(NEWINIT) # ifdef LINEMODE @@ -1092,12 +1093,13 @@ getptyslave() * if linemode was turned on * terminal window size * terminal speed + * erase character * so that we can re-set them if we need to. */ # ifdef LINEMODE waslm = tty_linemode(); # endif - + erase = termbuf.c_cc[VERASE]; /* * Make sure that we don't have a controlling tty, and @@ -1184,6 +1186,8 @@ getptyslave() tty_rspeed((def_rspeed > 0) ? def_rspeed : 9600); tty_tspeed((def_tspeed > 0) ? def_tspeed : 9600); # ifdef LINEMODE + if (erase) + termbuf.c_cc[VERASE] = erase; if (waslm) tty_setlinemode(1); # endif /* LINEMODE */