Re: [PATCH] agetty: Prevent cursor escape

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dne 23. 07. 24 v 14:56 Karel Zak napsal(a):
On Sun, Jul 21, 2024 at 03:01:42PM GMT, Stanislav Brabec wrote:

+						write_all(1, "^[", 2);
Not sure if we need anything more robust here. If you have access to
the terminal, you can write whatever you want and it will be interpreted
as a username (meaning non-terminal code will interpret it).
Anything better would be complicated. We are reading stdin byte after byte. So we need to do something with the yet unfinished sequence. And we cannot read more, as the select() guarantees just a single character. Ando this is just equal to ICANON | ECHOCTL terminal mode. Additionally, it returns behavior that was here before 8b58ffdd, but now processing network events better.

By the way, login is affected by the same problem. But in that case, it is the fault of pam. I proposed the same solution here. But in that case, it can be handled on the terminal level:
https://github.com/linux-pam/linux-pam/pull/816

--
Best Regards / S pozdravem,

Stanislav Brabec
software developer
---------------------------------------------------------------------
SUSE LINUX, s. r. o.                         e-mail: sbrabec@xxxxxxxx
Křižíkova 148/34 (Corso IIa)                    tel: +420 284 084 060
186 00 Praha 8-Karlín                          fax:  +420 284 084 001
Czech Republic                                    http://www.suse.cz/
PGP: 830B 40D5 9E05 35D8 5E27 6FA3 717C 209F A04F CD76





[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux