[libvirt] [PATCH] virt-login-shell joins users into lxc container.

Daniel P. Berrange berrange at redhat.com
Thu Jul 25 17:06:55 UTC 2013


On Sat, Jul 20, 2013 at 07:46:33AM -0400, dwalsh at redhat.com wrote:
> From: Dan Walsh <dwalsh at redhat.com>
> 
> Openshift wants to have their gears stuck into a container when they login
> to the system.  virt-login-shell will join a running gear with the username of
> the person running it, or attempt to start the container if it is not running.
> (Currently containers do not exist if they are not running, so I can not test
> this feature. But the code is there).
> 
> This tool needs to be setuid since joining a container (nsjoin) requires privs.
> The root user is not allowed to execute this command. When this tool is
> run by a normal user it will only join the "users" container.
> 
> Only users who are listed as valid_users in /etc/libvirt/virt-login-shell.conf
> are allowed to join containers using this tool. By default no users are allowed.
> ---
>  .gitignore                  |   1 +
>  libvirt.spec.in             |   3 +
>  mingw-libvirt.spec.in       |   5 +
>  po/POTFILES.in              |   1 +
>  src/libvirt_private.syms    |   1 +
>  src/util/virutil.c          |   7 +
>  src/util/virutil.h          |   1 +
>  tools/Makefile.am           |  30 ++++-
>  tools/virt-login-shell.c    | 312 ++++++++++++++++++++++++++++++++++++++++++++
>  tools/virt-login-shell.conf |  24 ++++
>  tools/virt-login-shell.pod  |  62 +++++++++
>  11 files changed, 446 insertions(+), 1 deletion(-)
>  create mode 100644 tools/virt-login-shell.c
>  create mode 100755 tools/virt-login-shell.conf
>  create mode 100644 tools/virt-login-shell.pod

ACK to this patch.

Technically since we're post freeze we shouldn't commit this until
1.1.2, but since this is an entirely new program perhaps we could
make an exception here ? Thoughts ?

It doesn't hugely matter either way, it'd just make life a little
easier to have it in 1.1.1

Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|




More information about the libvir-list mailing list