Re: [PATCH] agetty: Prevent cursor escape

Karel Zak <[email protected]>
Newsgroups org.kernel.vger.util-linux
Message-ID <kbdtjvbk6d7tazpqblki75tjatmqvq54hzxyybrb4uh4kjwevl@rzsfd2cofobp>
On Sun, Jul 21, 2024 at 03:01:42PM GMT, Stanislav Brabec wrote:
>  term-utils/agetty.c | 9 ++++++++-
>  1 file changed, 8 insertions(+), 1 deletion(-)

Applied, thanks.

> +						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).

There is include/carefulputc.h:fputs_careful(), but it's currently
based on FILE streams rather than file descriptors.

 Karel

-- 
 Karel Zak  <[email protected]>
 http://karelzak.blogspot.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.