On 03/08/2013 04:34 AM, Ivan Vilata i Balaguer wrote:
> Hi all,
> 
> I'm running lxc 0.9.0~alpha3-1 on a Debian sid box and I created a
> container using lxc-debconf which doesn't set any default locale.  When
> starting the container using lxc-start, I expected it to have no LANG
> variable defined, but I noticed that it had inherited that from my root
> session in the host.  Of course this causes several warnings in
> different programs, but I'm more concerned about the leaking of
> environment variables itself.  Is this a known or expected behaviour, or
> rather a bug?  Maybe other variables are leaking too.
> 
> Thanks,

That seems pretty unlikely considering we explicitly clearenv() before
starting the container now.

What you're describing can be true for LXC before the 0.9 series, but
with 0.9, the container starts with an empty environment, so any
environment variable that's set is as a result of the boot process.

Speaking of the locale environment variables specifically, it might be
worth noting that ssh sets those when you connect to a system over ssh.

To make sure, you may want to look at:
cat /proc/1/environ | tr '\0' '\n'

Which will show you the environment of PID 1 in the container.

Typically, it's made of a single variable:
root@raring-dev:~# cat /proc/1/environ | tr '\0' '\n'
container=lxc


-- 
Stéphane Graber
Ubuntu developer
http://www.ubuntu.com

Attachment: signature.asc
Description: OpenPGP digital signature

------------------------------------------------------------------------------
Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester  
Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the  
endpoint security space. For insight on selecting the right partner to 
tackle endpoint security challenges, access the full report. 
http://p.sf.net/sfu/symantec-dev2dev
_______________________________________________
Lxc-users mailing list
Lxc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-users

Reply via email to