]> git.ipfire.org Git - thirdparty/libvirt.git/commit
virt-login-shell: honour the -c option to launch commands
authorDaniel P. Berrange <berrange@redhat.com>
Tue, 12 Apr 2016 14:18:04 +0000 (15:18 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Fri, 10 Jun 2016 10:03:01 +0000 (11:03 +0100)
commitda7396605b41e646004aa5bac909c6e5defac7ee
tree138a19d59443844d0926555af61916014ceb4c4c
parent291e1a470c004484d94497ebe3dae5b42bbff1c1
virt-login-shell: honour the -c option to launch commands

The virt-login-shell program is supposed to look like a
regular shell to clients. Login services like sshd
expect the shell to accept a '-c cmdstring' argument to
specify a command to launch instead of presenting an
interactive prompt.

We can implement this by simply passing the '-c cmdstring'
data straight through to the real shell we use. This does
not open any security holes, since the command is not run
until we're inside the container namespaces. This allows
scp to work for users with virt-login-shell.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
tools/virt-login-shell.c
tools/virt-login-shell.pod