Skip to content

Commit

Permalink
daemon.start: disable Apparmor unpriv unconfined mediation
Browse files Browse the repository at this point in the history
Signed-off-by: Simon Deziel <[email protected]>
  • Loading branch information
simondeziel authored and tomponline committed Oct 9, 2023
1 parent 90a82a8 commit d7c436d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions snapcraft/commands/daemon.start
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,13 @@ if [ "$(stat -c '%u' /proc)" = 0 ]; then
echo 0 > /proc/sys/kernel/apparmor_restrict_unprivileged_userns || true
fi
fi

if [ -e /proc/sys/kernel/apparmor_restrict_unprivileged_unconfined ]; then
if [ "$(cat /proc/sys/kernel/apparmor_restrict_unprivileged_unconfined)" = "1" ]; then
echo "==> Disabling Apparmor unprivileged unconfined mediation"
echo 0 > /proc/sys/kernel/apparmor_restrict_unprivileged_unconfined || true
fi
fi
fi

# Setup CRIU
Expand Down

0 comments on commit d7c436d

Please sign in to comment.