2
0
mirror of https://gitlab.com/apparmor/apparmor synced 2025-09-02 15:25:27 +00:00

make 'prelog' non-global

It's only used by two functions:
- handle_hashlog() - writes to prelog, and now returns it
- collapse_log() - reads prelog, and now gets it as parameter
This commit is contained in:
Christian Boltz
2019-05-09 00:42:54 +02:00
parent c77426ed62
commit c5f0097f65
2 changed files with 9 additions and 7 deletions

View File

@@ -239,9 +239,9 @@ def logfile_to_profile(logfile):
apparmor.aa.ask_exec(hashlog)
apparmor.aa.ask_addhat(hashlog)
apparmor.aa.handle_hashlog(hashlog)
prelog = apparmor.aa.handle_hashlog(hashlog)
log_dict = apparmor.aa.collapse_log()
log_dict = apparmor.aa.collapse_log(prelog)
if profile != hat:
# log event for a child profile means log_dict only contains the child profile