[apparmor] [patch] fix logprof handling of var declarations

Seth Arnold seth.arnold at gmail.com
Sat Feb 5 02:24:06 UTC 2011


On Fri, Feb 4, 2011 at 5:14 PM, Steve Beattie <steve at nxnw.org> wrote:
> This patch fixes a logprof bug (that I sadly never filed) such that
> when variable declarations are written out in profiles, a trailing
> comma is not appended to them, which is invalid syntax and causes
> the parser to fail when loading the policy.
>
> The patch is against the 2.5.x branch and is nominated for the 2.5.2
> release and trunk.

I'd like to suggest changing the description before committing: I read
it the other way around first, and thought your patch was backwards. :)

My suggestion: Variable definitions should not have trailing commas.

As an aside, all hail fakeroot:

$ apparmor_parser -D variables ./sbin.dhclient3
apparmor_parser: Sorry. You need root privileges to run this program.
$ fakeroot apparmor_parser -D variables ./sbin.dhclient3
,, at FOO = "bar" "baz"
@HOME = "@{HOMEDIRS}/*/" "/root/"
@HOMEDIRS = "/home/"
@PROC = "/proc/"
$

fakeroot is an excellent program. :)

Thanks Steve!



More information about the AppArmor mailing list