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

Mike Frysinger vapier at gentoo.org
Thu Sep 17 23:30:02 UTC 2009

On Thursday 17 September 2009 14:17:33 Samuel Thibault wrote:
> 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.
> 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.

that's a good point.  however, there's more to having a proper unicode console 
than just setting the iutf8 bit on the tty.  this is why unicode_{start,stop} 
exist in the first place.

> > login/pam are there to do authentication only, not screw with the
> > terminal.
> Login already does screw with the terminal in setup_tty(),

presumably enough to prevent echoing of the password, but that's about it (for 
obvious security reasons).  the point of running agetty is to make sure the 
tty is in a sane state.

> 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, ...

any solution that requires pam is no solution at all.  the things you mention 
here really are part of login configuring things, not pam.

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

i guess unless the whole chain can be addressed, there isnt much point in 
changing just one.  i dont have a fedora box myself, but from talking to a 
friend, things "just work" in the default setup.  or at least it defaults 
everything to unicode.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.alioth.debian.org/pipermail/pkg-shadow-devel/attachments/20090917/efe4b0ed/attachment-0002.pgp>

More information about the Pkg-shadow-devel mailing list