Re: [apparmor] [patch] move strip_quotes from aa.py to regex.py

2015-03-03 Thread Steve Beattie
On Tue, Mar 03, 2015 at 12:58:49AM +0100, Christian Boltz wrote: > Hello, > > the upcoming function parse_profile_start() (which is a wrapper around > the updated RE_PROFILE_START, and will live in regex.py) needs > strip_profile(), but importing it from aa.py fails with an import loop. > Theref

[apparmor] [patch] regression tests: fix gcc-5 inline confusion

2015-03-03 Thread Steve Beattie
Parts of the regression tests that use the do_open() inline function from changehat.h fail to build under gcc-5 like so: cc -g -O0 -Wall -Wstrict-prototypeschangeprofile.c -lapparmor -o changeprofile /tmp/ccT6GE6k.o: In function `main': /home/ubuntu/bzr/apparmor/tests/regression/appar

Re: [apparmor] [patch] regression tests: fix gcc-5 inline confusion

2015-03-03 Thread Seth Arnold
On Tue, Mar 03, 2015 at 10:58:57AM -0800, Steve Beattie wrote: > Parts of the regression tests that use the do_open() inline function > from changehat.h fail to build under gcc-5 like so: > > cc -g -O0 -Wall -Wstrict-prototypeschangeprofile.c -lapparmor -o > changeprofile > /tmp/ccT6GE6

Re: [apparmor] [patch] regression tests: fix gcc-5 inline confusion

2015-03-03 Thread Steve Beattie
On Tue, Mar 03, 2015 at 10:58:57AM -0800, Steve Beattie wrote: > Parts of the regression tests that use the do_open() inline function > from changehat.h fail to build under gcc-5 like so: > > cc -g -O0 -Wall -Wstrict-prototypeschangeprofile.c -lapparmor -o > changeprofile > /tmp/ccT6GE6

[apparmor] [patch] test-logparser.py: add test for disconnected path

2015-03-03 Thread Christian Boltz
Hello, as a follow-up to the logparser.py change that converts disconnected path events to an error, this patch adds a testcase to test-logparser.py. In theory, trunk is enough for added tests, but also adding it to 2.9 can't hurt ,-) [ test-logparser-disconnected-path.diff ] === modified file

Re: [apparmor] [patch] test-logparser.py: add test for disconnected path

2015-03-03 Thread Steve Beattie
On Tue, Mar 03, 2015 at 08:04:02PM +0100, Christian Boltz wrote: > Hello, > > as a follow-up to the logparser.py change that converts disconnected > path events to an error, this patch adds a testcase to test-logparser.py. > > In theory, trunk is enough for added tests, but also adding it to 2.9

[apparmor] [patch] add better loop support to common_test.py

2015-03-03 Thread Christian Boltz
Hello, this patch adds better support for looping over a tests[] array to common_test.py: - class AATest - a base class we can use for all tests, and that will probably get more features in the future (for example tempdir handling) - setup_all_tests() - a function that iterates over all clas

[apparmor] [patch] split off serialize_parse_profile_start_line()

2015-03-03 Thread Christian Boltz
Hello, this patch splits off serialize_parse_profile_start_line() from serialize_profile_from_old_profile() in aa.py, as a preparation to add tests and then switch to the upcoming RE_PROFILE_START wrapper function. Besides moving the code, I replaced write_prof_data[profile][hat]['profile'] an

Re: [apparmor] [patch] add better loop support to common_test.py

2015-03-03 Thread Christian Boltz
Hello, Am Dienstag, 3. März 2015 schrieb Christian Boltz: > this patch adds better support for looping over a tests[] array to > common_test.py: > - class AATest - a base class we can use for all tests, and that will > probably get more features in the future (for example tempdir > handling)

[apparmor] [patch] convert test-regex_matches.py to new tests[] loop

2015-03-03 Thread Christian Boltz
Hello, this patch converts test-regex_matches.py to the new tests[] loop. Needless to say that this patch depends on [patch] add better loop support to common_test.py The test behaviour is the same with and without this patch - 166 tests run, all successful. BTW: I don't care too much for

[apparmor] [PATCH] parser: Fix error checking of file opening in features_dir_cb()

2015-03-03 Thread Tyler Hicks
The error path was being taken when openat() return 0 but openat() returns -1 on error. Signed-off-by: Tyler Hicks --- Another minor bug that I came across while working on the libapparmor API changes. Nominated for 2.9 and trunk. parser/parser_main.c | 4 +++- 1 file changed, 3 insertions(+),

Re: [apparmor] [PATCH] parser: Fix error checking of file opening in features_dir_cb()

2015-03-03 Thread Seth Arnold
On Tue, Mar 03, 2015 at 08:00:43PM -0600, Tyler Hicks wrote: > The error path was being taken when openat() return 0 but openat() > returns -1 on error. > > Signed-off-by: Tyler Hicks Acked-by: Seth Arnold Thanks > --- > > Another minor bug that I came across while working on the libapparmor

Re: [apparmor] [patch] fix aa-status to work with non-ascii mountpoints

2015-03-03 Thread Steve Beattie
On Sun, Mar 01, 2015 at 09:19:16PM +0100, Christian Boltz wrote: > this patch fixes aa-status find_apparmorfs() to work with non-ascii > mountpoints. > > (I even made a temporary non-ascii mountpoint to verify it ;-) > > Patch by Alain Benedetti > > References: https://bugs.launchpad.net/bugs/1

Re: [apparmor] [patch] regression tests: fix gcc-5 inline confusion

2015-03-03 Thread John Johansen
On 03/03/2015 11:01 AM, Steve Beattie wrote: > On Tue, Mar 03, 2015 at 10:58:57AM -0800, Steve Beattie wrote: >> Parts of the regression tests that use the do_open() inline function >> from changehat.h fail to build under gcc-5 like so: >> >> cc -g -O0 -Wall -Wstrict-prototypeschangeprofile.c