apparmor/libraries/libapparmor
Christian Boltz 5c26296b9f logparser.py: improve file vs. network event recognition
Sometimes network events come with an operation keyword looking like
file_perm which makes them look like file events. Instead of ignoring
these events (which was a hotfix to avoid crashes), improve the type
detection.

In detail, this means:
- replace OPERATION_TYPES (which was basically a list of network event
  keywords) with OP_TYPE_FILE_OR_NET (which is a list of keywords for
  file and network events)
- change op_type() parameters to expect the whole event, not only the
  operation keyword, and rebuild the type detection based on the event
  details
- as a side effect, this simplifies the detection for file event
  operations in parse_event_for_tree()
- remove workaround code from parse_event_for_tree()

Also add 4 new testcases with log messages that were ignored before.


References:

a) various bugreports about crashes caused by unexpected operation keywords:
   https://bugs.launchpad.net/apparmor/+bug/1466812
   https://bugs.launchpad.net/apparmor/+bug/1509030
   https://bugs.launchpad.net/apparmor/+bug/1540562
   https://bugs.launchpad.net/apparmor/+bug/1577051
   https://bugs.launchpad.net/apparmor/+bug/1582374

b) the summary bug for this patch
   https://bugs.launchpad.net/apparmor/+bug/1613061



Acked-by: Steve Beattie <steve@nxnw.org> for trunk and 2.10.
2016-12-06 22:24:56 +01:00
..
doc man page touchups 2016-03-19 01:48:11 -07:00
include libapparmor: Implement aa_stack_profile and aa_stack_onexec 2016-03-18 17:28:50 -05:00
m4 libapparmor: Check for podchecker during configure stage 2014-11-17 21:19:55 -06:00
src libapparmor: Be consistent with the type used for buffer sizes 2016-09-30 15:03:07 -05:00
swig libapparmor python bindings: use __init__.py to import from LibAppArmor.py 2016-11-14 14:06:41 -08:00
testsuite logparser.py: improve file vs. network event recognition 2016-12-06 22:24:56 +01:00
AUTHORS libraries/libapparmor/: more license cleanups, adjust my email address 2011-02-23 14:02:45 -08:00
autogen.sh libapparmor: Force libtoolize to replace existing files 2016-09-14 12:48:58 -05:00
ChangeLog move libapparmor into the libraries directory 2008-05-19 22:48:31 +00:00
configure.ac libapparmor: Fix FTBFS when secure_getenv() is not available 2015-03-26 16:25:16 -05:00
COPYING.LGPL move libapparmor into the libraries directory 2008-05-19 22:48:31 +00:00
INSTALL move libapparmor into the libraries directory 2008-05-19 22:48:31 +00:00
Makefile.am libapparmor: more Makefile cleanups 2015-01-26 15:39:10 -08:00
NEWS move libapparmor into the libraries directory 2008-05-19 22:48:31 +00:00
README update the bugtracker link in the libapparmor README 2014-02-24 22:44:32 +01:00

What little documentation exists is in src/aalogparse.h.

Please file bugs using https://bugs.launchpad.net/apparmor/+filebug