diff --git a/utils/SubDomain.pm b/utils/SubDomain.pm index fffae25ca..2d52b46ee 100755 --- a/utils/SubDomain.pm +++ b/utils/SubDomain.pm @@ -377,16 +377,31 @@ sub convert_regexp ($) { my $regexp = shift; # escape regexp-special characters we don't support - $regexp =~ s/(?{denied_mask}, $e->{name} ); - } elsif ($e->{operation} =~ "file_") { + } elsif ($e->{operation} =~ m/file_/) { add_to_tree( $e->{pid}, "path", $profile, @@ -1822,7 +1836,7 @@ sub add_audit_event_to_tree ( $$ ) { $sdmode, $e->{name} ); - } elsif ($e->{operation} eq "xattr" || + } elsif ($e->{operation} =~ m/xattr/ || $e->{operation} eq "setattr") { add_to_tree( $e->{pid}, "path", @@ -1833,16 +1847,7 @@ sub add_audit_event_to_tree ( $$ ) { $e->{denied_mask}, $e->{name} ); - add_to_tree( $e->{pid}, - "path", - $profile, - $hat, - $prog, - $sdmode, - $e->{denied_mask}, - $e->{name} - ); - } elsif ($e->{operation} =~ "inode_") { + } elsif ($e->{operation} =~ m/inode_/) { if ( $e->{operation} eq "inode_permission" && $e->{denied_mask} eq "x" && $sdmode eq "PERMITTING" ) { @@ -1907,7 +1912,7 @@ sub add_audit_event_to_tree ( $$ ) { } $pid{$child} = $arrayref; push @{$arrayref}, [ "fork", $child, $profile, $hat ]; - } elsif ($e->{operation} =~ "socket_") { + } elsif ($e->{operation} =~ m/socket_/) { add_to_tree( $e->{pid}, "netdomain", $profile, @@ -2451,7 +2456,6 @@ sub ask_the_questions { $combinedmode .= $cm; push @matches, @m; } - unless ($combinedmode && contains($combinedmode, $mode)) { my $defaultoption = 1; @@ -4435,9 +4439,11 @@ sub rematchfrag { for my $entry (keys %{ $frag->{path} }) { my $regexp = convert_regexp($entry); + $DEBUGGING && debug("rematchfrag - entry [$entry] regex[$regexp]"); # check the log entry against our converted regexp... if ($path =~ /^$regexp$/) { + $DEBUGGING && debug("rematchfrag2 MATCH path [$path] regex[$regexp]"); # regexp matches, add it's mode to the list to check against $combinedmode .= $frag->{path}{$entry};