mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-28 20:11:00 +01:00
Properly set the erase character for the login prompt.
Submitted by: John Capo <jc@irbs.com> & Peter Wemm
This commit is contained in:
parent
e7519fbb2b
commit
3398cc6d11
@ -1049,6 +1049,7 @@ extern void utmp_sig_notify P((int));
|
||||
getptyslave()
|
||||
{
|
||||
register int t = -1;
|
||||
char erase;
|
||||
|
||||
#if !defined(CRAY) || !defined(NEWINIT)
|
||||
# ifdef LINEMODE
|
||||
@ -1065,12 +1066,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
|
||||
@ -1157,6 +1159,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 */
|
||||
|
Loading…
Reference in New Issue
Block a user