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

ask_addhat: print warning only if we have change_hat events

Printing the warning whenever a child profile exists is pointless. It
only makes sense if there are change_hat events inside the child profile.
This commit is contained in:
Christian Boltz
2019-05-03 22:50:33 +02:00
parent 1b7cdec70d
commit 13f67d45d0

View File

@@ -907,7 +907,7 @@ def ask_addhat(hashlog):
for aamode in hashlog:
for profile in hashlog[aamode]:
if '//' in profile:
if '//' in profile and hashlog[aamode][profile]['change_hat'].keys():
aaui.UI_Important('Ignoring change_hat event for %s, nested profiles are not supported yet.' % profile)
continue