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:
@@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user