Re: [PATCH 15/17] virt-login-shell: fully reset container environment

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

 




On 04/14/2016 11:22 AM, Daniel P. Berrange wrote:
> The virt-login-shell environment will be initialized with
> an arbitrary number of environment variables determined
> by the SSH daemon and PAM configuration. Most of these are
> not relevant inside the container, and at best they are
> noise and at worst they'll break apps. For example if
> XDG_RUNTIME_DIR is leaked to the container, it'll break
> any apps using it, since  the directory it points to is
> only visible to the host OS filesystem, not the container
> FS.
> 
> Use clearenv() to blank out everything and then set known
> good values for PATH, SHELL, USER, LOGNAME and TERM. Everything
> else is left up to the login shell to initialize.
> 
> Signed-off-by: Daniel P. Berrange <berrange@xxxxxxxxxx>
> ---
>  tools/virt-login-shell.c | 16 ++++++++++++++--
>  1 file changed, 14 insertions(+), 2 deletions(-)
> 

ACK

John

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]