]> git.ipfire.org Git - thirdparty/lxc.git/commit
"Default" configuration may destroy host system
authorAndrian Nord <nightnord@gmail.com>
Thu, 26 Nov 2009 15:46:25 +0000 (16:46 +0100)
committerDaniel Lezcano <dlezcano@fr.ibm.com>
Thu, 26 Nov 2009 15:46:25 +0000 (16:46 +0100)
commitf2ae79a04567fb8c1181f4d3331d2b7a48889cf3
tree94e08c04da6e7024f777f748de509e65e628350c
parentfae349da89b9ad063f0080970558b7f02ce233c2
"Default" configuration may destroy host system

If you're running (by mistake or typo) (via lxc-start) container that does not
exists it will run with lxc.rootfs=/, meaning that /sbin/init will
restart initialization procedure, efficiently messing host's system,
that may lead to unpredictable results or even destroy (make inaccessible) host
system (by reseting network configuration or something like that).

(Actually, it _did_ destroy system of everyone who tested this).

Actually, I finally lost any meaning of having such a feature for
full-system containers. You may not use hosts's FS - it's described at
above. You may not use some temporary directory - that's nonsense.

This patch forbinds starting container via lxc-start without rcfile and
custom start program, but probably it fixes only small part of problem.
I really don't see much sense in such a feature without ability of
overriding 'default' setting with command line switches. Anyway, default
behaviour should be as save as possible.

Signed-off-by: Andrian Nord <NightNord@gmail.com>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
src/lxc/lxc_start.c