[Lxc-users] lxc-start leaks environment variables

Serge Hallyn serge.hallyn at ubuntu.com
Fri Mar 8 15:12:33 UTC 2013


Quoting Ivan Vilata i Balaguer (ivan at selidor.net):
> 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.

A bug - if you look at src/lxc/start.c, it does a clearenv() right
before actually starting the container.  So clearing env is certainly
our intent.

-serge




More information about the lxc-users mailing list