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

rename 'netdomain' log events to 'network' to match rule name

This commit is contained in:
Christian Boltz
2019-04-28 16:24:18 +02:00
parent b86fed1a57
commit f5add27aaa
2 changed files with 5 additions and 5 deletions

View File

@@ -1277,8 +1277,8 @@ def handle_children(profile, hat, root):
if domainchange == 'change':
return None
elif typ == 'netdomain':
# If netdomain we (should) have pid, profile, hat, program, mode, network family, socket type and protocol
elif typ == 'network':
# If network we (should) have pid, profile, hat, program, mode, network family, socket type and protocol
pid, p, h, prog, aamode, family, sock_type, protocol = entry[:8]
if not regex_nullcomplain.search(p) and not regex_nullcomplain.search(h):
@@ -1287,7 +1287,7 @@ def handle_children(profile, hat, root):
if not hat or not profile:
continue
if family and sock_type:
prelog[aamode][profile][hat]['netdomain'][family][sock_type] = True
prelog[aamode][profile][hat]['network'][family][sock_type] = True
return None
@@ -1992,7 +1992,7 @@ def collapse_log():
log_dict[aamode][profile][hat]['dbus'].add(dbus_event)
nd = prelog[aamode][profile][hat]['netdomain']
nd = prelog[aamode][profile][hat]['network']
for family in nd.keys():
for sock_type in nd[family].keys():
net_event = NetworkRule(family, sock_type, log_event=True)

View File

@@ -295,7 +295,7 @@ class ReadLog:
arrayref.append(ia)
elif self.op_type(e) == 'net':
return(e['pid'], e['parent'], 'netdomain',
return(e['pid'], e['parent'], 'network',
[profile, hat, prog, aamode, e['family'], e['sock_type'], e['protocol']])
elif e['operation'] == 'change_hat':
return(e['pid'], e['parent'], 'unknown_hat',