mirror of
https://gitlab.com/apparmor/apparmor.git
synced 2025-03-04 08:24:42 +01:00
![]() Add set_variables() to severity.py to set the variables for severity rating. It typically gets the data from the get_all_merged_variables() result. This replaces the slightly broken load_variables() that parsed profile files for variables. (For example, parsing "@{foo} = /bar" resulted in a variable name "@{foo} " with trailing space.) Also adjust aa.py and the severity tests to use set_variables() (with get_all_merged_variables()) instead of load_variables(). This also re-adds the checks that were removed in the "Store variables in active_profiles (ProfileList)" commit earlier, while still fixing lp:1331856. With this change, unload_variables() becomes useless (the variables get overwritten in set_variables() anyway), drop it and its calls. Note that load_variables() silently ignored non-existing files while the get_all_merged_variables() call only works for existing files that are known to active_profiles. Since the input of ask_the_questions() and ask_exec() comes from log_dict (= audit.log or a profile to merge), add a check if that profile actually exists in the set of active profiles. Also adjust the severity tests to use set_variables(). Finally, drop the tests that check for handling non-existing include files, redefining and adding to non-existing variables - all these things get now handled in include_list_recursive() and get_all_merged_variables() and their tests. Fixes: https://bugs.launchpad.net/apparmor/+bug/1331856 |
||
---|---|---|
.. | ||
cleanprof_test.in | ||
cleanprof_test.out | ||
common_test.py | ||
easyprof.conf | ||
fake_ldd | ||
logprof.conf | ||
Makefile | ||
minitools_test.py | ||
runtests-py2.sh | ||
runtests-py3.sh | ||
severity.db | ||
severity_broken.db | ||
test-aa-cli-bootstrap.py | ||
test-aa-decode.py | ||
test-aa-easyprof.py | ||
test-aa-notify.py | ||
test-aa.py | ||
test-aare.py | ||
test-abi.py | ||
test-baserule.py | ||
test-capability.py | ||
test-change_profile.py | ||
test-common.py | ||
test-config.py | ||
test-dbus.py | ||
test-example.py | ||
test-file.py | ||
test-include.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-profile-list.py | ||
test-profile-storage.py | ||
test-ptrace.py | ||
test-regex_matches.py | ||
test-rlimit.py | ||
test-severity.py | ||
test-signal.py | ||
test-translations.py | ||
test-unix_parse.py | ||
test-variable.py |