|
|
|
agetty: Incorrect handling of backspace characters 0x08, '#' | |
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] | |
Package: util-linux
Version: 2.21
Severity: normal
Hello.
Bug description:
1. Run agetty on a virtual console (tty1, ...).
2. Type in username: "root"
3. Input Alt+8 or #. The backspace character will proceed correctly, but it
will be printed as is instead of printing "\b \b".
Function get_logname (agetty.c) erases characters only if ECHO flag is off.
...
case BS:
case DEL:
case '#':
cp->erase = ascval; /* set erase character
*/
if (bp > logname) {
if ((tp->c_lflag & ECHO) == 0)
write_all(1,
erase[cp->parity], 3);
bp--;
}
...
But when running agetty on a virtual console function termio_init calls
reset_vc, that sets
tp->c_lflag |= (ISIG | ICANON | IEXTEN | ECHO|ECHOE|ECHOK|ECHOKE);
So, backspace characters will be echoed on the console: "\b" moves cursor
left and '#' will be printed as is.
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Site Home] [Netdev] [Ethernet Bridging] [Linux Wireless] [Kernel Newbies] [Memory] [Security] [Linux for Hams] [Netfilter] [Bugtraq] [Rubini] [Photo] [Yosemite] [Yosemite News] [MIPS Linux] [ARM Linux] [Linux RAID] [Linux Admin] [Samba] [Video 4 Linux] [Linux Resources]