-
Notifications
You must be signed in to change notification settings - Fork 709
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12482 from alanmcanonical/apparmor_load_all
Load all the profile if not loaded for Ubuntu
- Loading branch information
Showing
10 changed files
with
42 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
.../apparmor/all_apparmor_profiles_enforced/tests/correct_apparmor_profiles_enforced.pass.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,13 @@ | ||
#!/bin/bash | ||
# packages = apparmor-utils | ||
|
||
#Replace apparmor definitions | ||
apparmor_parser -q -r /etc/apparmor.d/ | ||
#Set all profiles in enforce mode | ||
aa-enforce /etc/apparmor.d/* | ||
|
||
# rsyslogd apparmor profile is disabled in focal and jammy. | ||
# Reloading the profile results in an unconfined process | ||
# which fails the SCE, so we need to restart the process manually. | ||
systemctl restart rsyslog | ||
|
4 changes: 0 additions & 4 deletions
4
.../system/apparmor/all_apparmor_profiles_enforced/tests/incorrect_apparmor_profiles.fail.sh
This file was deleted.
Oops, something went wrong.
10 changes: 9 additions & 1 deletion
10
...pparmor/all_apparmor_profiles_enforced/tests/incorrect_apparmor_profiles_enforced.fail.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,12 @@ | ||
#!/bin/bash | ||
# packages = apparmor-utils | ||
|
||
#Replace apparmor definitions and force profiles into compliant mode | ||
apparmor_parser -C -q -r /etc/apparmor.d/ | ||
apparmor_parser -q -r /etc/apparmor.d/ | ||
#Set all profiles in complain mode | ||
aa-complain /etc/apparmor.d/* | ||
|
||
# rsyslogd apparmor profile is disabled in focal and jammy. | ||
# Reloading the profile results in an unconfined process | ||
# which fails the SCE, so we need to restart the process manually. | ||
systemctl restart rsyslog |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 0 additions & 5 deletions
5
..._apparmor_profiles_in_enforce_complain_mode/tests/incorrect_all_apparmor_profiles.fail.sh
This file was deleted.
Oops, something went wrong.