[Pkg-shadow-devel] Bug#547079: login: Should set the iutf8 tty c_iflag if the locale is utf8

Samuel Thibault sthibault at debian.org
Thu Sep 17 18:17:33 UTC 2009


(Cc-ing util-linux maintainer)

Mike Frysinger, le Thu 17 Sep 2009 13:38:08 -0400, a écrit :
> > > and why the keyboard/console font init scripts exist -- to set the
> > > defaults. and why the kernel now defaults all consoles to iutf8 on by
> > > default.
> > 
> > Except that getty drops the flag.
> 
> so here's a crazy idea: fix getty instead of throwing hacks around packages 
> that have no business mucking with these things.

No need to be sarcastic, that never helps discussion.

My concern is that getty used to not keep any flag at all.  Keeping
_some_ flags contrary to none is not just a "fix", it's a change of
behavior.  Think for instance about a situation where a user clears the
tty's iutf8.  The next user to log in will have a bogus terminal since
getty would leave it cleared and nothing else will set it.  This is
the same for all the flags, getty could just keep the kernel's current
state, but it doesn't.

> login/pam are there to do authentication only, not screw with the
> terminal.

Login already does screw with the terminal in setup_tty(), and with
pam they already screw with a lot of various things about the session:
sid, limits, initial environment variables (like MAIL_DIR), home
automount, ...

> > > perhaps you meant to file a bug about agetty not preserving the IUTF8
> > > flag.
> > 
> > As I said in my bug report, getty has always been clearing all tty flags
> > to restart the termios settings from scratch.  We can try, but I fear
> > they won't accept it.
> 
> why ? getty is wrong and should be fixed. i doubt the util-linux guys
> would reject a patch that preserved the UTF8 bit.

See my concern above.  Letting a user break another user's environment
is wrong too.

> i dont know why you think it's ok to throw fragile hacks into
> unrelated packages instead of fixing the real source of the problem.

The real source of the problem is probably that getty doesn't know
whether the terminal should be set up for utf8 or not.  That could be an
option given from /etc/inittab, but that would not be synchronized with
console-setup's CHARMAP parameter and whether the default locale is utf8
or not.

What do getty people think?

Samuel



More information about the Pkg-shadow-devel mailing list