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

Nicolas François nicolas.francois at centraliens.net
Tue Mar 23 14:09:51 UTC 2010


tags #539354 help
thanks

Hello,

As I have no clue about TTY setup, let see if I can get some other
opinions on debian-devel.

The question raised on http://bugs.debian.org/547079 is who shall be
responsible for setting up the user's tty (e.g. regarding UTF-8 handling).

Some defaults are in the kernel.
getty makes some changes, login also, and the end user may also do so in a
user profile script.

The kernel, getty, or login do not really know if the user wants a UTF-8
locale, so my preference would be to move the setup of the iutf8 tty
c_iflag to the user's configuration.  For example the user could use
unicode_start / unicode_stop.

(This also has the advantage for me not to require any change in login)


The bug discusses also these alternatives:
 2 iutf8 tty c_iflag forced by getty (maybe based on an option in inittab)
   (currently getty always drop this flag)
 3 iutf8 tty c_iflag forced by login
   (I did not really understand how login shall guess when this shall be
   done, maybe an option in /etc/login.defs)
 4 iutf8 tty c_iflag forced by a PAM module

Do you have any opinion on how this should be done?

Thanks in advance,
-- 
Nekral

On Thu, Sep 17, 2009 at 08:35:16PM -0400, Mike Frysinger wrote:
> On Thursday 17 September 2009 19:59:14 Samuel Thibault wrote:
> > Mike Frysinger, le Thu 17 Sep 2009 19:30:02 -0400, a écrit :
> > > > > 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).
> > 
> > Have you looked at the code before saying that?
> > 
> > 		/*
> > 		 * Add your favorite terminal modes here ...
> > 		 */
> > 		termio.c_lflag |= ISIG | ICANON | ECHO | ECHOE;
> > 		termio.c_iflag |= ICRNL;
> > 
> > etc...
> 
> looks like a lot of stuff login shouldnt be doing, but historically has been 
> so no one complained because "it worked".  extending poor behavior because 
> it's already there isnt really a good line of reasoning.
> 
> > > 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.
> > 
> > Did he check whether stty -a properly shows iutf8?  Things work very
> > fine even without it, one of the very few effects of iutf8 left cleared
> > is the bug I mentioned in my report: canonical mode's treatment of
> > backspace.  People rarely notice it.
> 
> i didnt ask him "hey does your keyboard work", i asked him what his settings 
> were after he logged in.  so of course i validated the stty output.
> 
> i'm not suggesting everything is great and nothing needs to be changed.  i'm 
> saying that login/pam is not really part of the solution.
> -mike







More information about the Pkg-shadow-devel mailing list