apparmor/utils/test
Christian Boltz 7e84f4efe9 If a filename mentioned in audit.log contains an @, aa-logprof crashes with
...
  File "/home/cb/apparmor/HEAD-CLEAN/utils/apparmor/severity.py", line 147, in handle_variable_rank
      variable = regex_variable.search(resource).groups()[0]
	  AttributeError: 'NoneType' object has no attribute 'groups'

handle_variable_rank() checked with   if '@' in resource:
and if it finds it, expects it can match a variable, which means   @{.....}
If a filename contains a   @   this fails.

The patch fixes the if condition so that it does a regex match.

It also adds two testcases for filenames containing @ to make sure they
don't cause a crash and result in the exptected severity rank.


Acked-by: Steve Beattie <steve@nxnw.org>
2014-10-14 12:50:20 +02:00
..
aa_test.py utils: make all tests consistent in verbosity 2014-07-25 17:49:06 -07:00
cleanprof_test.in Merge in Kshitij Gupta <kgupta8592@gmail.com>'s rewrite of the 2014-02-12 15:54:00 -08:00
cleanprof_test.out Merge in Kshitij Gupta <kgupta8592@gmail.com>'s rewrite of the 2014-02-12 15:54:00 -08:00
common_test.py utils tests: restructure Unix Parse tests 2014-09-03 18:24:57 -07:00
config_test.py Set PYTHONPATH=.. in runtests-py3.sh to make sure the tests use the in- 2014-07-22 21:25:25 +02:00
easyprof.conf This patchset is broken into 4 parts: 2012-05-07 22:37:48 -07:00
logprof.conf Update perl abstraction, logprof.conf, severity.db and tests for Debian/Ubuntu 2014-08-20 19:14:24 -05:00
Makefile utils: add very limited dbus rule support 2014-03-07 09:58:54 -08:00
minitools_test.py test if aa-enforce removes force-complain symlinks 2014-09-26 22:03:14 +02:00
regex_tests.ini Ensure the that the {**,} and {,**} regexs are being properly parsed by 2014-08-14 10:51:42 -07:00
runtests-py2.sh utils/tests: fix bashisms in runtests-py2.sh 2014-09-03 13:00:33 -07:00
runtests-py3.sh fix utils/test/runtests-py*.sh exitcode 2014-10-03 11:48:21 +02:00
severity.db Update perl abstraction, logprof.conf, severity.db and tests for Debian/Ubuntu 2014-08-20 19:14:24 -05:00
severity_broken.db Update perl abstraction, logprof.conf, severity.db and tests for Debian/Ubuntu 2014-08-20 19:14:24 -05:00
severity_test.py If a filename mentioned in audit.log contains an @, aa-logprof crashes with 2014-10-14 12:50:20 +02:00
test-aa-decode.py utils: make all tests consistent in verbosity 2014-07-25 17:49:06 -07:00
test-aa-easyprof.py utils/easyprof: fix regression test when apparmor-easyprof is not installed 2014-03-19 22:02:53 -07:00
test-dbus_parse.py Subject: utils tests: restructure DBUS parse tests 2014-09-03 18:26:19 -07:00
test-mount_parse.py utils tests: restructure mount parse tests 2014-09-03 18:28:18 -07:00
test-pivot_root_parse.py utils tests: restructure pivotroot parse tests 2014-09-03 18:31:09 -07:00
test-ptrace_parse.py utils tests: restructure ptrace parse tests 2014-09-03 18:32:59 -07:00
test-regex_matches.py convert RE_PROFILE_CAP in aa.py and the code using it to named match groups 2014-10-01 21:45:22 +02:00
test-signal_parse.py utils tests: restructure signal parse tests 2014-09-03 18:36:11 -07:00
test-unix_parse.py utils tests: restructure Unix Parse tests 2014-09-03 18:24:57 -07:00