[apparmor] [patch] aa.py: split off parse_profile_start() from parse_profile_data() and add tests

Steve Beattie steve at nxnw.org
Mon Mar 2 20:44:55 UTC 2015


On Mon, Mar 02, 2015 at 12:00:07PM -0800, Steve Beattie wrote:
> On Mon, Mar 02, 2015 at 08:44:44PM +0100, Christian Boltz wrote:
> > Am Montag, 2. März 2015 schrieb Steve Beattie:
> > > On Sun, Mar 01, 2015 at 07:12:05PM +0100, Christian Boltz wrote:
> > > > [ split-off-parse_profile_start-and-add-tests.diff ]
> > > 
> > > [SNIP]
> > > 
> > > > === modified file 'utils/apparmor/aa.py'
> > > > --- utils/apparmor/aa.py        2015-02-20 20:36:55 +0000
> > > > +++ utils/apparmor/aa.py        2015-03-01 17:42:11 +0000
> > ...
> > > > +            (profile, hat, flags, in_contained_hat,
> > > > pps_set_profile, pps_set_hat_external) = parse_profile_start(line,
> > > > file, lineno, profile, hat, profile_data)
> > > You pass 6 arguments to parse_profile_start() here, but the
> > > declaration for it only takes 5 arguments. I'm guessing that's not
> > > intended?
> > 
> > Indeed, that's a leftover from the first version of the patch, where I
> > tried to pass profile_data forth and back, which didn't work too well.
> > 
> > Instead, I now have the two pps_set_* variables as part of the return 
> > value which set the needed flags in profile_data.
> > 
> > Here's the updated patch, which also removes the two unused return 
> > values in the tests:
> > 
> > 
> > [ split-off-parse_profile_start-and-add-tests.diff ]
> 
> Acked-by: Steve Beattie <steve at nxnw.org>. Thanks.

Acked-by: Steve Beattie <steve at nxnw.org> for 2.9 as well.

-- 
Steve Beattie
<sbeattie at ubuntu.com>
http://NxNW.org/~steve/
-------------- 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/20150302/4f53d71f/attachment.pgp>


More information about the AppArmor mailing list