mirror of
https://gitlab.com/apparmor/apparmor.git
synced 2025-03-05 00:41:03 +01:00
![]() logparser.py puts each log event on a big "stack" in self.pid. Later, handle_children() in aa.py then converts that (named 'log' in aa.py) to the prelog hasher. This commit changes logparser.py to create the prelog structure itsself (named hashlog), which - removes one level of indirection - probably saves some memory because the hashlog automatically de-duplicates events This commit does this for capability, network and signal events, and adds the infrastructure needed for all event/rule types. In aa.py, the new function handle_hashlog() copies the hashlog content to prelog. OTOH, the now superfluous code handling capability, network and signal events gets removed from handle_children(). Long-term, hashlog will replace log in aa.py. When this is done, handle_hashlog() will be replaced by a simple prelog = hashlog. logparser.py gets a new function init_hashlog() to initialize hashlog for each profile. It also gets changed to store capability, network and signal events into hashlog instead of storing them in self.pid. hashlog uses the full profile name as key, which is the first baby step to support nested child profiles. (for now, handle_hashlog() still splits the profile name into profile and hat.) Known issue: The new implementation doesn't handle exec yet, which means that events get lost at the exec boundary (= in cases aa-logprof asks which execute mode to use). This will be fixed in a later commit. |
||
---|---|---|
.. | ||
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-aamode.py | ||
test-aare.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-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 |