2
0
mirror of https://gitlab.com/apparmor/apparmor synced 2025-08-30 13:58:22 +00:00

Merge branch 'logparse-max-uint' into 'master'

utils: Properly identify empty ouid/fsuid fields in logs

See merge request apparmor/apparmor!75

Acked-by: John Johansen <john.johansen@canonical.com>
This commit is contained in:
John Johansen 2018-03-07 15:37:50 +00:00
commit 1f9085e5e7

View File

@ -12,6 +12,7 @@
# GNU General Public License for more details.
#
# ----------------------------------------------------------------------
import ctypes
import os
import re
import sys
@ -118,7 +119,7 @@ class ReadLog:
ev['protocol'] = event.net_protocol
ev['sock_type'] = event.net_sock_type
if event.ouid != 18446744073709551615: # 2^64 - 1
if event.ouid != ctypes.c_ulong(-1).value: # ULONG_MAX
ev['fsuid'] = event.fsuid
ev['ouid'] = event.ouid