mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-08-31 14:25:52 +00:00
Subject: call autodep when creating a child profile
This patch calls autodep on the 'exec'ed binary when the user selects to place that execution in a child profile. Previously, logprof would create an entirely empty child profile in complain mode (this fix still leaves the child profile in complain mode).
This commit is contained in:
@@ -2391,8 +2391,18 @@ sub handlechildren($$$) {
|
||||
# put in enforce mode with genprof
|
||||
$sd{$profile}{$hat}{flags} = $sd{$profile}{$profile}{flags} if $profile ne $hat;
|
||||
|
||||
# autodep our new child
|
||||
my $stub_profile = create_new_profile($hat);
|
||||
|
||||
$sd{$profile}{$hat}{flags} = 'complain';
|
||||
$sd{$profile}{$hat}{allow}{path} = { };
|
||||
if (defined $stub_profile->{$hat}{$hat}{allow}{path}) {
|
||||
$sd{$profile}{$hat}{allow}{path} = $stub_profile->{$hat}{$hat}{allow}{path};
|
||||
}
|
||||
$sd{$profile}{$hat}{include} = { };
|
||||
if (defined $stub_profile->{$hat}{$hat}{include}) {
|
||||
$sd{$profile}{$hat}{include} = $stub_profile->{$hat}{$hat}{include};
|
||||
}
|
||||
$sd{$profile}{$hat}{allow}{netdomain} = { };
|
||||
my $file = $sd{$profile}{$profile}{filename};
|
||||
$filelist{$file}{profiles}{$profile}{$hat} = 1;
|
||||
|
Reference in New Issue
Block a user