mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-09-01 06:45:38 +00:00
rename 'netdomain' log events to 'network' to match rule name
This commit is contained in:
@@ -1277,8 +1277,8 @@ def handle_children(profile, hat, root):
|
|||||||
if domainchange == 'change':
|
if domainchange == 'change':
|
||||||
return None
|
return None
|
||||||
|
|
||||||
elif typ == 'netdomain':
|
elif typ == 'network':
|
||||||
# If netdomain we (should) have pid, profile, hat, program, mode, network family, socket type and protocol
|
# 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]
|
pid, p, h, prog, aamode, family, sock_type, protocol = entry[:8]
|
||||||
|
|
||||||
if not regex_nullcomplain.search(p) and not regex_nullcomplain.search(h):
|
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:
|
if not hat or not profile:
|
||||||
continue
|
continue
|
||||||
if family and sock_type:
|
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
|
return None
|
||||||
|
|
||||||
@@ -1992,7 +1992,7 @@ def collapse_log():
|
|||||||
|
|
||||||
log_dict[aamode][profile][hat]['dbus'].add(dbus_event)
|
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 family in nd.keys():
|
||||||
for sock_type in nd[family].keys():
|
for sock_type in nd[family].keys():
|
||||||
net_event = NetworkRule(family, sock_type, log_event=True)
|
net_event = NetworkRule(family, sock_type, log_event=True)
|
||||||
|
@@ -295,7 +295,7 @@ class ReadLog:
|
|||||||
arrayref.append(ia)
|
arrayref.append(ia)
|
||||||
|
|
||||||
elif self.op_type(e) == 'net':
|
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']])
|
[profile, hat, prog, aamode, e['family'], e['sock_type'], e['protocol']])
|
||||||
elif e['operation'] == 'change_hat':
|
elif e['operation'] == 'change_hat':
|
||||||
return(e['pid'], e['parent'], 'unknown_hat',
|
return(e['pid'], e['parent'], 'unknown_hat',
|
||||||
|
Reference in New Issue
Block a user