Re: Bug: Environment vars are changed before use (locale LANG, LC_*)

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

 



On Mon, 3 Mar 2014, Carsten Wieschiolek wrote:

> Hi Damien!
> 
> Thanks for the friendly reply!
> 
> I did a few more tests to investigate the matter further based on
> your comments. The bottom line is, that the settings from the file
> "environment" in the .ssh directory are not considered at all. The
> values from the calling SHELL have precedence over the entries in the
> file, which makes the file quite useless. Am I overlooking something
> important?

The order is something like:

1. Environment variables passed by SendEnv/AcceptEnv
2. Environment variables specified by pam_env
3. ~/.ssh/enviornment
4. Environment variables set by the shell

(I might have #2 and #3 reversed here)

#1, #2 and #3 all prepare the environment that the shell is executed with,
so naturally anything the shell does will overrride them. 

As for how to fix it. One way is to rename the environment variables
and then have your shell initialisation put them back. E.g.

preferred_LANG=en_AU:en

in ~/.ssh/enviornment, and

test -z "$preferred_LANG" && LANG="$preferred_LANG"
export LANG

in your shell initialisation.

-d
_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@xxxxxxxxxxx
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev




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

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux