[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#392856: default locale overrides client setting



This bug report is rather old. The behaviour seems to be different these
days, but is still wrong.

Using lenny openssh server, /etc/default/locale read via pam_env
overrides whatever environment settings the ssh client sends.

For example when the following is in /etc/default/locale on the server:
LANG="en_US.UTF-8"

and the client sends:
debug1: Sending environment.
debug1: Sending env LC_COLLATE = C
debug2: channel 0: request env confirm 0
debug1: Sending env LANG = pl_PL.UTF-8
debug2: channel 0: request env confirm 0
debug2: channel 0: request shell confirm 1

then locale in the shell is:

$ locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE=C
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

(Note how LANG is set from /etc/default/locale, while LC_COLLATE is set
from the environment sent by the client, and LANG sent by the client is
ignored.)

-- 
Marcin Owsiany <porridge@debian.org>             http://marcin.owsiany.pl/
GnuPG: 1024D/60F41216  FE67 DA2D 0ACA FC5E 3F75  D6F6 3A0D 8AA0 60F4 1216



Reply to: