diff --git a/utils/apparmor/rule/__init__.py b/utils/apparmor/rule/__init__.py index a6534e21d..060a6b780 100644 --- a/utils/apparmor/rule/__init__.py +++ b/utils/apparmor/rule/__init__.py @@ -46,6 +46,9 @@ class BaseRule(object): # defines if the (N)ew option is displayed can_edit = False + # defines if the '(O)wner permissions on/off' option is displayed + can_owner = False + def __init__(self, audit=False, deny=False, allow_keyword=False, comment='', log_event=None): '''initialize variables needed by all rule types''' diff --git a/utils/apparmor/rule/file.py b/utils/apparmor/rule/file.py index 3d98c456d..baf502a4e 100644 --- a/utils/apparmor/rule/file.py +++ b/utils/apparmor/rule/file.py @@ -104,6 +104,7 @@ class FileRule(BaseRule): if type(owner) is not bool: raise AppArmorBug('non-boolean value passed to owner flag') self.owner = owner + self.can_owner = owner # offer '(O)wner permissions on/off' buttons only if the rule has the owner flag if type(file_keyword) is not bool: raise AppArmorBug('non-boolean value passed to file keyword flag')