~vorlon/cloud-init:lp.1134036

Last commit made on 2018-06-15
Get this branch:
git clone -b lp.1134036 https://git.launchpad.net/~vorlon/cloud-init
Only Steve Langasek can upload to this branch. If you are Steve Langasek please log in for upload directions.

Branch merges

Branch information

Name:
lp.1134036
Repository:
lp:~vorlon/cloud-init

Recent commits

70743ab... by Steve Langasek on 2018-06-15

Fix up invalid locales in the login environment; don't print warning messages.

Invalid locales in the environment at login (e.g. as provided by ssh
SendEnv from a client system which has a different set of available locales
than the server) currently result in a large warning message (once, per
login user, per instance) and a broken environment.

On Ubuntu systems, and probably others, this broken environment results in
wrong runtime behavior vs if no locale had been passed at all by the client;
in particular, Ubuntu systems will give UTF-8 as a character set by default
(either the en_US.UTF-8 or C.UTF-8 locale, depending on the version of
Ubuntu), and if an invalid locale is specified, the login instead will use
ASCII as the only supported character set.

This change reworks cloud-init's profile handling to:
 - fix up any invalid locale settings detected in the environment, so that
   the login session does not unnecessarily lose non-ascii character support
   due to a requested missing locale
 - remove the warning message, which is of disputed value.

This approximates the OpenSSH upstream guidance regarding a correct design
for this in OpenSSH itself, as described at
<https://bugzilla.mindrot.org/show_bug.cgi?id=1346#c38>, but will work on
all systems which do not have an ssh client+server that implement that does
not implement this proposed design (i.e.: all clients and servers currently
in existence).

LP: #1134036

Some recent commit information could not be fetched.