[apparmor] logprof / genprof - displaying profile diff

Steve Beattie steve at nxnw.org
Thu Jul 1 21:52:33 BST 2010


On Thu, Jul 01, 2010 at 01:10:58PM -0700, Kees Cook wrote:
> 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.

Agreed, please commit. I played around with that diff
command after making gratuitous changes to files under
parser/tst/simple_tests/profile/; it's a nice little improvement.

Thanks, Christian!

-- 
Steve Beattie
<sbeattie at ubuntu.com>
http://NxNW.org/~steve/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
Url : https://lists.ubuntu.com/archives/apparmor/attachments/20100701/f69fa578/attachment.pgp 


More information about the AppArmor mailing list