mirror of
https://gitlab.com/apparmor/apparmor.git
synced 2025-03-04 16:35:02 +01:00
merge from trunk
This commit is contained in:
commit
3c2684b674
4 changed files with 9 additions and 1 deletions
|
@ -52,5 +52,5 @@
|
|||
/usr/share/java/zemberek-tr-[0-9]*.jar r,
|
||||
|
||||
# per-user dictionaries
|
||||
owner @{HOME}/.config/enchant/ r,
|
||||
owner @{HOME}/.config/enchant/ rw,
|
||||
owner @{HOME}/.config/enchant/* rwk,
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
audit deny @{HOME}/bin/** wl,
|
||||
audit deny @{HOME}/.config/autostart/** wl,
|
||||
audit deny @{HOME}/.kde/Autostart/** wl,
|
||||
audit deny @{HOME}/.kde/env/** wl,
|
||||
audit deny @{HOME}/.pki/nssdb/*.so{,.[0-9]*} wl,
|
||||
|
||||
# don't allow reading/updating of run control files
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
|
||||
capability chown,
|
||||
capability dac_override,
|
||||
capability dac_read_search,
|
||||
capability fsetid,
|
||||
capability fowner,
|
||||
capability sys_tty_config,
|
||||
|
|
|
@ -770,12 +770,18 @@ sub create_new_profile($) {
|
|||
my $hashbang = head($fqdbin);
|
||||
if ($hashbang && $hashbang =~ /^#!\s*(\S+)/) {
|
||||
my $interpreter = get_full_path($1);
|
||||
$profile->{$fqdbin}{allow}{path}->{$fqdbin}{mode} |= str_to_mode("r");
|
||||
$profile->{$fqdbin}{allow}{path}->{$fqdbin}{mode} |= 0;
|
||||
$profile->{$fqdbin}{allow}{path}->{$interpreter}{mode} |= str_to_mode("ix");
|
||||
$profile->{$fqdbin}{allow}{path}->{$interpreter}{audit} |= 0;
|
||||
if ($interpreter =~ /perl/) {
|
||||
$profile->{$fqdbin}{include}->{"abstractions/perl"} = 1;
|
||||
} elsif ($interpreter =~ m/\/bin\/(bash|sh)/) {
|
||||
$profile->{$fqdbin}{include}->{"abstractions/bash"} = 1;
|
||||
} elsif ($interpreter =~ m/python/) {
|
||||
$profile->{$fqdbin}{include}->{"abstractions/python"} = 1;
|
||||
} elsif ($interpreter =~ m/ruby/) {
|
||||
$profile->{$fqdbin}{include}->{"abstractions/ruby"} = 1;
|
||||
}
|
||||
handle_binfmt($profile->{$fqdbin}, $interpreter);
|
||||
} else {
|
||||
|
|
Loading…
Add table
Reference in a new issue