scripts: check if we run on an AppArmor enabled system before loading profile
This commit is contained in:
parent
71d801148b
commit
65af894a95
1 changed files with 4 additions and 2 deletions
|
|
@ -38,8 +38,10 @@ 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
|
||||
if [ -d /sys/kernel/security/apparmor ] ; then
|
||||
# Load the profile for our Android container
|
||||
$SNAP/sbin/apparmor_parser -r $SNAP/apparmor/anbox-container.aa
|
||||
fi
|
||||
|
||||
exec $AA_EXEC $SNAP/bin/anbox-wrapper.sh container-manager \
|
||||
--data-path=$DATA_PATH \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue