mirror of
https://gitlab.com/apparmor/apparmor.git
synced 2025-03-04 08:24:42 +01:00
Ignore file events with a request mask of 'send' or 'receive'
Those events are actually network events, so ideally we should map them as such. Unfortunately this requires bigger changes, so here is a hotfix that ignores those events and thus avoids crashing aa-logprof. References: https://bugs.launchpad.net/apparmor/+bug/1577051 https://bugs.launchpad.net/apparmor/+bug/1582374 Acked-by: Seth Arnold <seth.arnold@canonical.com> for trunk, 2.10 and 2.9
This commit is contained in:
parent
80bfb955ac
commit
e4cbcb4c85
1 changed files with 7 additions and 0 deletions
|
@ -301,6 +301,13 @@ class ReadLog:
|
|||
self.debug_logger.debug('UNHANDLED (missing request_mask): %s' % e)
|
||||
return None
|
||||
|
||||
# sometimes network events come with an e['operation'] that matches the list of file operations
|
||||
# see https://bugs.launchpad.net/apparmor/+bug/1577051 and https://bugs.launchpad.net/apparmor/+bug/1582374
|
||||
# XXX these events are network events, so we should map them as such
|
||||
if e['request_mask'] in ('send', 'receive'):
|
||||
self.debug_logger.debug('UNHANDLED (request_mask is send or receive): %s' % e)
|
||||
return None
|
||||
|
||||
# Map c (create) and d (delete) to w (logging is more detailed than the profile language)
|
||||
rmask = e['request_mask']
|
||||
rmask = rmask.replace('c', 'w')
|
||||
|
|
Loading…
Add table
Reference in a new issue