mirror of
https://gitlab.com/apparmor/apparmor.git
synced 2025-03-04 08:24:42 +01:00
![]() Parsing variables was broken in several ways: - empty quotes (representing an intentionally empty value) were lost, causing parser failures - items consisting of only one letter were lost due to a bug in RE_VARS - RE_VARS didn't start with ^, which means leading garbage (= syntax errors) was ignored - trailing garbage was also ignored This patch fixes those issues in separate_vars() and changes var_transform() to write out empty quotes (instead of nothing) for empty values. Also add some tests for separate_vars() with empty quotes and adjust several tests with invalid syntax to expect an AppArmorException. var_transform() gets some tests added. Finally, remove 3 testcases from the "fails to raise an exception" list in test-parser-simple-tests.py. Acked-by: John Johansen <john.johansen@canonical.com> for trunk and 2.9 (which also implies 2.10) Note: 2.9 doesn't have test-parser-simple-tests.py, therefore it won't get that part of the patch. |
||
---|---|---|
.. | ||
aa_test.py | ||
cleanprof_test.in | ||
cleanprof_test.out | ||
common_test.py | ||
config_test.py | ||
easyprof.conf | ||
logprof.conf | ||
Makefile | ||
minitools_test.py | ||
runtests-py2.sh | ||
runtests-py3.sh | ||
severity.db | ||
severity_broken.db | ||
test-aa-decode.py | ||
test-aa-easyprof.py | ||
test-aa.py | ||
test-aamode.py | ||
test-aare.py | ||
test-baserule.py | ||
test-capability.py | ||
test-change_profile.py | ||
test-dbus_parse.py | ||
test-example.py | ||
test-libapparmor-test_multi.py | ||
test-logparser.py | ||
test-mount_parse.py | ||
test-network.py | ||
test-parser-simple-tests.py | ||
test-pivot_root_parse.py | ||
test-ptrace_parse.py | ||
test-regex_matches.py | ||
test-rlimit.py | ||
test-severity.py | ||
test-signal_parse.py | ||
test-unix_parse.py |