[apparmor] logprof / genprof - displaying profile diff
Kees Cook
kees.cook at canonical.com
Thu Jul 1 21:10:58 BST 2010
Hi,
On Fri, Jun 25, 2010 at 09:50:16PM -0700, John Johansen wrote:
> genprof is using diff and I have only run a quick test on the patch
> below, but it seems to work. I'll do some more testing before
> requesting a commit. If any one is interested in testing you can
> apply it with patch -p1 /usr/share/perl5/Immunix/SubDomain.pm
>
> --- utils/SubDomain.pm 2010-03-26 13:51:21 +0000
> +++ utils/SubDomain.pm 2010-06-26 04:24:48 +0000
> @@ -4389,7 +4389,7 @@
>
> my $difftmp = new File::Temp(UNLINK => 0);
> my @diff;
> - system("diff -u $oldtmp $newtmp > $difftmp");
> + system("diff -u -F '{[^}]*$' $oldtmp $newtmp > $difftmp");
> while (<$difftmp>) {
> push(@diff, $_) unless (($_ =~ /^(---|\+\+\+)/) ||
> ($_ =~ /^\@\@.*\@\@$/));
>
>
This seems like a nice idea. ACK from me.
--
Kees Cook
Ubuntu Security Team
More information about the AppArmor
mailing list