mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-09-02 15:25:27 +00:00
collapse_log: ignore events from null-* profiles
If final_name still includes null-*, that's most likely caused by nested execs which aren't supported by the tools yet. Ignoring them is better than creating a useless null-* hat. Note: The tools always had this restriction, so this is not a regression ;-) Also note that test-libapparmor-test_multi expects that null-* hats get created (which makes sense because the one-line log sniplets don't have any exec indication), therefore add an optional parameter to keep this behaviour for the tests.
This commit is contained in:
@@ -239,7 +239,7 @@ def logfile_to_profile(logfile):
|
||||
apparmor.aa.ask_exec(hashlog)
|
||||
apparmor.aa.ask_addhat(hashlog)
|
||||
|
||||
log_dict = apparmor.aa.collapse_log(hashlog)
|
||||
log_dict = apparmor.aa.collapse_log(hashlog, ignore_null_profiles=False)
|
||||
|
||||
if profile != hat:
|
||||
# log event for a child profile means log_dict only contains the child profile
|
||||
|
Reference in New Issue
Block a user