Bug#221290: [OBORONA-SPAM] [?? Probable Spam] Bug#221290: [Pkg-shadow-devel] Bug#221290: Bug #221290 still here: screen garbled after entering high-ascii characters at login prompt

Alexander Gattin xrgtn at yandex.ru
Wed Sep 28 21:52:47 UTC 2005


Hi!

On Wed, Sep 28, 2005 at 10:46:23PM +0200, Helge Kreutzmann wrote:
> Hello Alexander,
> On Wed, Sep 28, 2005 at 10:48:46PM +0300, Alexander Gattin wrote:
> > After a small, fast and simple check I conclude that
> > the issue with setting cs7 on terminal after entering

Probably istrip (clear 8th bit of input characters)
is more relevant to the problem than cs7... I'm not a
TTY guru.

> Yes, on a quick look (I will do more tomorrow) I see how Umlaute
> change the stty settings. But there is a notable difference: If I
> enter
> ä <Enter> ä
> on un "normal" login, the second "ä" is changed to "d". On the
> prepared terminal, however, this is not the case.

Sorry, I can't test with umlautes, because I don't have
a German keymap and even having it I would not know how
to compose or enter an umlaute anyway...

> What I do see is, that:
> ä <Backspace> <Enter>
> b <Enter>
> still has cs7, while skipping the backspace, i.e.
> ä <Enter>
> b <Enter>
> I get cs8.

What I see with Ukrainian letters is that with
different letters I get different tty settings,
sometimes istrip, sometimes -istrip. Sometimes parenb,
sometimes without it and so on.

> So obviously the combination of "ä" and "backspace" is
> rememberd by getty, while single umlaute are "forgotten" on the next
> login prompt. On the "normal" login, the effect is, however, the same.

I have prepared a wrapper script, to work around the
problem with getty. Currently it just sets tty to some
'sane' state.

Citing /root/stty-cs8-login.sh:
> #!/bin/bash --norc
> stty cs8 -parenb -parodd -cstopb -inpck -istrip
> exec /bin/login $@

Please, try it to see whether it fixes your problem
or not. The script should be given to getty instead
of real login binary (in /etc/initab file):
> 9:23:respawn:/sbin/getty -l /root/stty-cs8-login.sh 38400 tty9

After editing /etc/initab run `telinit q` and you will
be able to login on 9th virtual console using
"sanitized" stty settings.

> > P.S. so if nobody objects, I'll reassign the bug to
> > util-linux soon.
> 
> I don't understand the intrinsics of the login-getty interaction, but
> this makes sense to me.

Intrinsics are very simple, indeed :) -- getty prints
/etc/issue and "login:" prompt after that.
When getty has got a username there, it just exec's
`/bin/login -- username` so that login binary gets
username as 2nd argument and doesn't ask for it
anymore, instead prompts for password and voila.

P.S.
Of course, login has its own "login:" prompt but it's
intentionally made identical to the one of getty.
-- 
WBR,
xrgtn




More information about the Pkg-shadow-devel mailing list