[apparmor] [patch] SubDomain.pm: add support for mkdir, truncate, rename operations (LP: #623467)
Jesse Michael
jesse at lonelyrhinoceros.com
Wed Aug 25 17:23:25 BST 2010
On Wed, Aug 25, 2010 at 09:18:38AM -0700, John Johansen wrote:
> On 08/25/2010 12:28 AM, Steve Beattie wrote:
> > Bug: https://bugs.launchpad.net/apparmor/+bug/623467
> >
> > This patch adds some additional testcases to the log parsing
> > testsuite, to cover rejections for operations that aren't covered by
> > other testcase (truncate, rename_src, rename_dest, mkdir) as well
> > as fixing SubDomain.pm to take those operations into account when
> > parsing log files.
> >
> > This is also nominated for 2.5.1.
> >
> The test cases look good but where is the update to subdomain.pm?
That was actually smaller than a test case patch--
--- a/utils/SubDomain.pm
+++ b/utils/SubDomain.pm
@@ -2798,7 +2798,11 @@ sub add_event_to_tree ($) {
$e->{name},
"",
);
- } elsif ($e->{operation} eq "open") {
+ } elsif ($e->{operation} eq "open" ||
+ $e->{operation} eq "truncate" ||
+ $e->{operation} eq "mkdir" ||
+ $e->{operation} eq "rename_src" ||
+ $e->{operation} eq "rename_dest") {
add_to_tree( $e->{pid},
$e->{parent},
"path",
More information about the AppArmor
mailing list