2
0
mirror of https://gitlab.com/apparmor/apparmor synced 2025-08-31 22:35:35 +00:00

Subject: autodep - add bash abstraction when using dash script

On Ubuntu and Debian, by default /bin/sh is a symlink to /bin/dash. When
autodep'ing a shell script, the bash abstraction was not being included.
This commit is contained in:
Steve Beattie
2012-03-27 17:17:25 -07:00
parent daa5b9f496
commit 521b237e8b

View File

@@ -776,7 +776,7 @@ sub create_new_profile($) {
$profile->{$fqdbin}{allow}{path}->{$interpreter}{audit} |= 0; $profile->{$fqdbin}{allow}{path}->{$interpreter}{audit} |= 0;
if ($interpreter =~ /perl/) { if ($interpreter =~ /perl/) {
$profile->{$fqdbin}{include}->{"abstractions/perl"} = 1; $profile->{$fqdbin}{include}->{"abstractions/perl"} = 1;
} elsif ($interpreter =~ m/\/bin\/(bash|sh)/) { } elsif ($interpreter =~ m/\/bin\/(bash|dash|sh)/) {
$profile->{$fqdbin}{include}->{"abstractions/bash"} = 1; $profile->{$fqdbin}{include}->{"abstractions/bash"} = 1;
} elsif ($interpreter =~ m/python/) { } elsif ($interpreter =~ m/python/) {
$profile->{$fqdbin}{include}->{"abstractions/python"} = 1; $profile->{$fqdbin}{include}->{"abstractions/python"} = 1;