Re: [apparmor] [patch 01/13] parser - build against in-tree libapparmor

2013-10-10 Thread Steve Beattie
On Thu, Oct 10, 2013 at 03:33:19PM -0700, John Johansen wrote: > On 10/10/2013 01:46 PM, Steve Beattie wrote: > > With trunk commit 2205 "use libapparmor's find mountpoint fn", > > the parser now builds against and uses libapparmor at runtime. However, > > it currently builds against the system ins

Re: [apparmor] [patch 05/13] parser - rewrite caching tests in python unittest

2013-10-10 Thread Steve Beattie
On Fri, Oct 11, 2013 at 01:36:59AM +0200, Christian Boltz wrote: > [sorry for the slightly broken quoting - KMail needs some improvement > when quoting overlong lines ;-) ] No worries. I'm glad to see that the GSoC experience has caused you to be less hesitant about reviewing python code. :) > A

Re: [apparmor] [patch 13/13] parser - update README information

2013-10-10 Thread Christian Boltz
Hello, Am Donnerstag, 10. Oktober 2013 schrieb Steve Beattie: > The README in the parser directory was woefully out of date; this > patch updates the information to contain the current mail list, wiki, > and bug tracking locations. That was an easy one to proofread ;-) Acked-by: Christian Boltz

Re: [apparmor] [patch 05/13] parser - rewrite caching tests in python unittest

2013-10-10 Thread Christian Boltz
Hello, [sorry for the slightly broken quoting - KMail needs some improvement when quoting overlong lines ;-) ] Am Donnerstag, 10. Oktober 2013 schrieb Steve Beattie: > --- /dev/null > +++ b/parser/tst/caching.py > +from optparse import OptionParser# deprecated, should move to > argparse eve

Re: [apparmor] [patch 08/13] parser - push normalize_tree() ops into expr-tree classes

2013-10-10 Thread Steve Beattie
On Thu, Oct 10, 2013 at 03:34:53PM -0700, John Johansen wrote: > On 10/10/2013 01:46 PM, Steve Beattie wrote: > > This is patch tries to reduce the number of dynamic_cast<>s needed > > during normalization by pushing the operations of normalize_tree() > > into the expr-tree classes themselves rathe

Re: [apparmor] [patch 08/13] parser - push normalize_tree() ops into expr-tree classes

2013-10-10 Thread John Johansen
On 10/10/2013 01:46 PM, Steve Beattie wrote: > This is patch tries to reduce the number of dynamic_cast<>s needed > during normalization by pushing the operations of normalize_tree() > into the expr-tree classes themselves rather than perform it as > an external function. This eliminates the need f

Re: [apparmor] [patch 01/13] parser - build against in-tree libapparmor

2013-10-10 Thread John Johansen
On 10/10/2013 01:46 PM, Steve Beattie wrote: > With trunk commit 2205 "use libapparmor's find mountpoint fn", > the parser now builds against and uses libapparmor at runtime. However, > it currently builds against the system installed libapparmor library and > header files, which fails if either ar

[apparmor] [patch 02/13] parser - add build option for coverage

2013-10-10 Thread Steve Beattie
This patch adds a parser make variable and a make target for building the compiler with coverage compilation flags. With this, coverage information can be generated by running tests/test suites against the built parser and run through tools like gcovr. Signed-off-by: Steve Beattie --- parser/Mak

[apparmor] [patch 06/13] parser - use new caching test script

2013-10-10 Thread Steve Beattie
This patch: - incorporates the new python caching test into the make check/make caching target, and removes the older shell based test script - adjusts the python scripts to give verbose output when the VERBOSE flag is set - reorders the tests so that the tests that take a shorter amount o

[apparmor] [patch 09/13] parser - fix more memory leaks

2013-10-10 Thread Steve Beattie
This patch fixes a few more parser memory leaks as identified by the simple valgrind test script. These mostly occur during cleanup of structs and classes and as such, don't represent very serious leaks for common usages of the parser. Signed-off-by: Steve Beattie --- parser/parser_lex.l |8

[apparmor] [patch 08/13] parser - push normalize_tree() ops into expr-tree classes

2013-10-10 Thread Steve Beattie
This is patch tries to reduce the number of dynamic_cast<>s needed during normalization by pushing the operations of normalize_tree() into the expr-tree classes themselves rather than perform it as an external function. This eliminates the need for dynamic_cast<> checks on the current object under

[apparmor] [patch 13/13] parser - update README information

2013-10-10 Thread Steve Beattie
The README in the parser directory was woefully out of date; this patch updates the information to contain the current mail list, wiki, and bug tracking locations. Signed-off-by: Steve Beattie --- parser/README | 18 +++--- 1 file changed, 11 insertions(+), 7 deletions(-) Index: b

[apparmor] [patch 01/13] parser - build against in-tree libapparmor

2013-10-10 Thread Steve Beattie
With trunk commit 2205 "use libapparmor's find mountpoint fn", the parser now builds against and uses libapparmor at runtime. However, it currently builds against the system installed libapparmor library and header files, which fails if either aren't installed, and is thus painful for bootstrapping

[apparmor] [patch 04/13] parser - add simple valgrind wrapper tests

2013-10-10 Thread Steve Beattie
This patch adds a test wrapper that runs valgrind on the parser over the simple_tests tree (or other directory tree if passed on the command line). An alternate parser location can also be passed on the command line. Like the libapparmor python bindings test, this test uses a bit of magic to gener

[apparmor] [patch 10/13] parser - terminate search early if wildcards are discovered

2013-10-10 Thread Steve Beattie
This patch is a very minor optimization to the search to determine whether a given rule is an exact match or not. If a wildcard rule (i.e. an inexact match) is discovered, exact_match is set to 0, so we don't need to continue the tree traversal. Signed-off-by: Steve Beattie --- parser/libapparm

[apparmor] [patch 12/13] parser - dbus code depends on yacc definitions

2013-10-10 Thread Steve Beattie
Fix Makefile to rebuild dbus object when yacc definitions change. Signed-off-by: Steve Beattie --- parser/Makefile |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Index: b/parser/Makefile === --- a/parser/Makefile +++ b/pa

[apparmor] [patch 11/13] parser - fix void* warnings

2013-10-10 Thread Steve Beattie
With the conversion to c++, the use of void* pointers for the parser interface buffers generates several warnings. This patch converts the types from void* to u8* for the buffer pointers, to clean up those warnings. Signed-off-by: Steve Beattie --- parser/parser_interface.c | 13 -

[apparmor] [patch 00/13] misc parser fixups and test improvements

2013-10-10 Thread Steve Beattie
This patch series fixes a few issues with the parser as well as replacing and adding additional tests. -- Steve Beattie http://NxNW.org/~steve/ -- AppArmor mailing list AppArmor@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/apparmor

[apparmor] [patch 05/13] parser - rewrite caching tests in python unittest

2013-10-10 Thread Steve Beattie
This patch rewrites the caching test in python, using python's unittest framework. It has been used with python 2.7 and python 3.3; python2.6 may have issues. It covers the tests in the existing caching.sh test script (with the exception of the test that checks for when the parser in $PATH is newer

[apparmor] [patch 07/13] parser - fix --skip-bad-cache regression

2013-10-10 Thread Steve Beattie
Rev 2203 (rev 2097 on the 2.8 branch) created a regression such that cache files will be written out even if the '--skip-bad-cache' option is given and the cached features file differs from the features of the currently running kernel. The patch below fixes the regression. (I acked this patch on l

[apparmor] [patch 03/13] parser - add simple file deny rule tests

2013-10-10 Thread Steve Beattie
Our simple language tests did not include any file deny rule tests. This patch adds a few simple ones. Signed-off-by: Steve Beattie --- parser/tst/simple_tests/file/ok_deny_1.sd |9 + parser/tst/simple_tests/file/ok_deny_2.sd |9 + parser/tst/simple_tests/file/ok_deny_3.s