Skip to content

Commit

Permalink
lib/main_security.pm: Enable AppArmor for tests if necessary
Browse files Browse the repository at this point in the history
If the product was installed with SELinux by default, switch to AppArmor.
  • Loading branch information
Vogtinator committed Jan 17, 2025
1 parent 23d8db9 commit 3446818
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/main_security.pm
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
package main_security;
use Mojo::Base 'Exporter';
use Exporter;
use testapi;
use utils;
use version_utils;
use main_common qw(loadtest boot_hdd_image);
use testapi qw(get_var check_var diag);
use Utils::Architectures;
use Utils::Backends;

Expand Down Expand Up @@ -137,6 +137,10 @@ sub load_security_tests_fips_setup {
sub load_security_tests_apparmor {
load_security_console_prepare();

# Switch from SELinux to AppArmor if necessary
set_var('SECURITY_MAC', 'apparmor');
loadtest 'console/enable_mac';

if (check_var('TEST', 'mau-apparmor') || is_jeos) {
loadtest "security/apparmor/aa_prepare";
}
Expand Down

0 comments on commit 3446818

Please sign in to comment.