apparmor: don't allow mounting cgroupfs by default

Leave the line to do it (commented out) as some users may not be
using cgmanager, and may in fact still need those mounts.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
apparmor: auto-generate the blacklist rules

This uses the generate-apparmor-rules.py script I sent out some time
ago to auto-generate apparmor rules based on a higher level set of
block/allow rules.

Add apparmor policy testcase to make sure that some of the paths we
expect to be denied (and allowed) write access to are in fact in
effect in the final policy.

With this policy, libvirt in a container is able to start its
default network, which previously it could not.

v2: address feedback from stgraber
	  put lxc-generate-aa-rules.py into EXTRA_DIST
	  add lxc-test-apparmor, container-base and container-rules to .gitignore
	  take lxc-test-apparmor out of EXTRA_DIST
	  make lxc-generate-aa-rules.py pep8-compliant
	  don't automatically generate apparmor rules
	  This is only bc we can't be guaranteed that python3 will be
	  available.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
fix lxc-console not working by default

fix lxc-console not working by default

Signed-off-by: Guillaume ZITTA <lxc@zitta.fr>
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
tests: Try to make shutdowntest a bit more robust

This should help it run better on slow test environment like the LXC CI
armhf builder.
 - Wait longer for the container to start
 - Wait longer for the container to shutdown
 - On failure to shutdown, kill the container
 - Always destroy the container if it's around

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>