[apparmor] [patch] require logfile only for aa-logprof and aa-genprof
Christian Boltz
apparmor at cboltz.de
Fri Feb 20 20:59:36 UTC 2015
Hello,
Am Freitag, 20. Februar 2015 schrieb Seth Arnold:
> On Fri, Feb 20, 2015 at 08:23:02PM +0100, Christian Boltz wrote:
> > this patch makes sure most tools (for example aa-complain) don't
> > error out if no logfile can be found. (For obvious reasons,
> > aa-logprof and aa-genprof will still require a logfile ;-)
...
> > I'm not sure if we should apply this patch to 2.9 or if trunk is
> > enough - opinions?
>
> It'd be nice to apply to 2.9 if it doesn't look like it breaks
> anything. I looked around for possible name collisions with 'logfile'
> and possible not-converted uses of 'filename' and .. it's tough to
> tell.
Right, grepping for "filename" gives quite some results - which was one
of the reasons why I switched to "logfile".
"logfile" gives less grep results - besides the newly added results, it
only appears in common.py where it's used for the debug log. (I wonder
why it's self.logfile there - it seems it's only used inside __init__()
so we could probably change it to be local to the function.)
Oh, aa-notify also contains $logfile - but that's perl code and doesn't
count ;-)
> So perhaps just apply to trunk for now and we can cherry-pick the
> commit back to 2.9 if it seems like it doesn't break anything.
I tested the patch by running aa-genprof and aa-logprof with and without
-f, and also with non-existing logfiles in logprof.conf, and I also
tested aa-complain etc. with the modified logprof.conf, so I don't
expect any breakage.
Nevertheless, I commited to trunk only for now. We can still add it to
the 2.9 branch later ;-)
Regards,
Christian Boltz
--
>Ein wenig künstlerische Freiheit darf doch wohl noch sein, oder?
Nur, falls Du die Artistic Licence unterschrieben hast.
[Bernd Brodesser und Martin Leidig in suse-talk]
More information about the AppArmor
mailing list