diff --git a/README b/README index 7b9220893..998c62c31 100644 --- a/README +++ b/README @@ -198,3 +198,21 @@ Building and Installing AppArmor Kernel Patches TODO + +----------------- +Required versions +----------------- + +The AppArmor userspace utilities are written with some assumptions about +installed and available versions of other tools. This is a (possibly +incomplete) list of known version dependencies: + +AppArmor.pm (used by aa-audit, aa-autodep, aa-complain, aa-disable, +aa-enforce, aa-genprof, aa-logprof, aa-unconfined) requires minimum +Perl 5.10.1. + +Python scripts require minimum Python 2.7. Some utilities may require +Python 3.3. Python 3.0, 3.1, 3.2 are largely untested. + +Most shell scripts are written for POSIX-compatible sh. aa-decode expects +bash, probably version 3.2 and higher. diff --git a/utils/Immunix/AppArmor.pm b/utils/Immunix/AppArmor.pm index d5abd6296..52d02ed74 100755 --- a/utils/Immunix/AppArmor.pm +++ b/utils/Immunix/AppArmor.pm @@ -3879,8 +3879,8 @@ sub ask_the_questions() { $newpath =~ s/\/[^\/]+$/\/\*/; } } - if ($newpath ne $selected) { - push @options, $newpath; + if (not $newpath ~~ $options) { + push @options, $newpath; $defaultoption = $#options + 1; } } @@ -3896,9 +3896,9 @@ sub ask_the_questions() { } else { $newpath =~ s/\/[^\/]+(\.[^\/]+)$/\/\*$1/; } - if ($newpath ne $selected) { - push @options, $newpath; - $defaultoption = $#options + 1; + if (not $newpath ~~ @options) { + push @options, $newpath; + $defaultoption = $#options + 1; } } } elsif ($ans =~ /\d/) {