[apparmor] [patch] convert serialize_parse_profile_start() to use parse_profile_start_line()

2015-03-05 Thread Christian Boltz
Hello, this patch converts serialize_parse_profile_start() to use parse_profile_start_line(), and adjusts a test to expect an AppArmorBug instead of an AttributeError exception. The patch also adds two tests (they succeed with the old and the new code). Note that these tests document

Re: [apparmor] [patch] profiles: add mir abstraction

2015-03-05 Thread Cameron Norman
On Thu, Mar 5, 2015 at 1:08 AM, Steve Beattie st...@nxnw.org wrote: As mir has come into use in Ubuntu touch and is available for testing on Ubuntu desktop, confined apps need access to a few mir specific things. This patch adds a mir abstraction. [snip] + # mir libraries sometimes do not

[apparmor] [patch] add tests for set_profile_flags() (and some fun)

2015-03-05 Thread Christian Boltz
Hello, this patch adds various tests for set_profile_flags, and documents various interesting[tm] things I discovered while writing the tests (see the inline comments for details). The most interesting[tm] thing I found is: regex_hat_flag = re.compile('^([a-z]*)\s+([A-Z]*)\s*(#.*)?$') I

Re: [apparmor] [patch] simplify setup_all_tests() call in utils test

2015-03-05 Thread Christian Boltz
Hello, Am Mittwoch, 4. März 2015 schrieb Seth Arnold: On Thu, Mar 05, 2015 at 01:22:47AM +0100, Christian Boltz wrote: BTW: If I had noticed earlier that __name__ is always '__main__', I'd have implemented the simplified way from the beginning. But is it always __main__? The whole point

Re: [apparmor] [patch] profiles: add mir abstraction

2015-03-05 Thread Tyler Hicks
On 2015-03-05 01:08:39, Steve Beattie wrote: As mir has come into use in Ubuntu touch and is available for testing on Ubuntu desktop, confined apps need access to a few mir specific things. This patch adds a mir abstraction. Nominated for both trunk and 2.9. Signed-off-by: Steve Beattie

[apparmor] [patch] add tests for serialize_parse_profile_start()

2015-03-05 Thread Christian Boltz
Hallo, this patch adds tests for serialize_parse_profile_start() to test-aa.py to document the function's behaviour. This patch obviously depends on the split off serialize_parse_profile_start_line() patch ;-) I propose this patch for trunk and 2.9 [