[apparmor] [patch] change aa-cleanprof to use reload_profile()

Steve Beattie steve at nxnw.org
Thu Jun 4 18:12:39 UTC 2015

On Mon, May 25, 2015 at 06:39:09PM +0200, Christian Boltz wrote:
> aa-cleanprof (actually clean_profile() in tools.py) used reload_base()
> from aa.py which sends the parser output to /dev/null. This had two
> effects:
> - aa-cleanprof ignored the --no-reload parameter
> - there was no error message because reload_base() /dev/null's the
>   parser output
> This patch changes clean_profile() to use reload_profile() from tools.py
> (which honors the --no-reload option).
> Also add a TODO note to aa.py reload_base(), the (AFAIK only) winner of
> the 'useless use of cat' award in the AppArmor code.
> We should really change it to use reload_profile(), even if that means
> moving the function from tools.py to aa.py or common.py. And it should
> not /dev/null the apparmor_parser output. ;-)
> [ 39-aa-cleanprof-use-reload_profile.diff ]

Acked-by: Steve Beattie <steve at nxnw.org>

Steve Beattie
<sbeattie at ubuntu.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/apparmor/attachments/20150604/29615656/attachment.pgp>

More information about the AppArmor mailing list