Skip to content

Commit

Permalink
Only enforce valid profile
Browse files Browse the repository at this point in the history
  • Loading branch information
alanmcanonical committed Jan 31, 2025
1 parent 737463d commit 148388f
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@

# Ensure all AppArmor Profiles are enforcing
apparmor_parser -q -r /etc/apparmor.d/
{{% if 'ubuntu' in product %}}
# Current version of apparmor-utils has issue https://gitlab.com/apparmor/apparmor/-/issues/411 and we're waiting for https://gitlab.com/apparmor/apparmor/-/merge_requests/1218 to be landed on noble
find /etc/apparmor.d -maxdepth 1 ! -type d -exec aa-enforce "{}" \;
{{% else %}}
aa-enforce /etc/apparmor.d/*
{{% endif %}}

{{% if 'ubuntu' in product %}}
UNCONFINED=$(aa-status | grep "processes are unconfined" | awk '{print $1;}')
Expand Down

0 comments on commit 148388f

Please sign in to comment.