[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 00:25:57 UTC 2009


Package: login
Version: 1:4.1.4.2-1
Severity: normal

Hello,

ATM, if one runs cat from a VT with a UTF-8 locale, type a non-ascii
character, backspace, enter, the first byte of the utf-8 encoding
non-ascii will remain in the stream.  This is because the iutf8 flag is
not set. getty clears it because it is not supposed to know anything
beyond ascii. login, however, is responsible for loading the initial
environment through the pam_env.so PAM module, and then knows which
locale is configured on the system. There should be a PAM module (could
be named pam_tty for instance) which basically does

struct termios tty;
tcgetattr(STDIN_FILENO, &tty);
if (utf8_locale)
	tty.c_iflag |= IUTF8;
else
	tty.c_iflag &= ~IUTF8;
tcsetattr(STDIN_FILENO, &tty);

in order to properly set the iutf8 flag according to whether the
configured locale is utf8 or not.

Samuel

-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.31 (SMP w/2 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages login depends on:
ii  libc6                         2.9-25     GNU C Library: Shared libraries
ii  libpam-modules                1.0.1-10   Pluggable Authentication Modules f
ii  libpam-runtime                1.0.1-10   Runtime support for the PAM librar
ii  libpam0g                      1.0.1-10   Pluggable Authentication Modules l

login recommends no packages.

login suggests no packages.

-- no debconf information

-- 
Samuel Thibault <samuel.thibault at fnac.net>
* c is away : cuisine; bouffe
<y> oh, moi je fais plut�t cuisine & bouffe en fait :)
<c> oui c'est vrai, certains font cuisine && bouffe (juste au cas o�... ;-))
<y> ( cuisine && bouffe ) || restau
<N> voire ((cuisine && bouffe) || restau) & ap�ritif
 -+- #ens-mim -+-





More information about the Pkg-shadow-devel mailing list