Implement confinement of the Android container via AppArmor

The used profile is derived from what LXD uses to confine its
containers. See https://github.com/lxc/lxd/blob/master/lxd/apparmor.go
This commit is contained in:
Simon Fels 2018-05-18 19:34:18 +02:00
commit b36c0b7491
3 changed files with 254 additions and 15 deletions

View file

@ -38,6 +38,9 @@ start() {
# liblxc.so.1 is in $SNAP/lib
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$SNAP/lib
# Load the profile for our Android container
$SNAP/sbin/apparmor_parser -r $SNAP/apparmor/anbox-container.aa
exec $AA_EXEC $SNAP/bin/anbox-wrapper.sh container-manager \
--data-path=$DATA_PATH \
--android-image=$ANDROID_IMG \