mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-08-30 05:47:59 +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:
commit
1f9085e5e7
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user