Public bug reported:
If lxc-execute is passed a non-existent container name, then the command
given is run in the current namespace.
I believe it should failed with a "container not found" error, as
otherwise it can lead to unexpected consequences in the host
environment.
example:
# lxc-ls
files foreman ns01 proxy
## Example typo on the -n option
# lxc-execute -n ns1 -- touch /tmp/ns01
# ls -l /tmp/ns01
-rw-r--r-- 1 root root 0 Apr 6 16:07 /tmp/ns01
## Command ran outside of container!
# cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.10
DISTRIB_CODENAME=yakkety
DISTRIB_DESCRIPTION="Ubuntu 16.10"
** Affects: lxc (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1680330
Title:
lxc-execute can run commands in current namespace
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/lxc/+bug/1680330/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs