mirror of
https://gitlab.com/apparmor/apparmor.git
synced 2025-03-04 16:35:02 +01:00
cleanup aa-disable handling in tools.py
Remove the check if the disable directory exists. If it's really missing, it will be auto-created by create_symlink(), so we automagically fix things instead of annoying the user with an error message ;-) Acked-by: Steve Beattie <steve@nxnw.org> for both trunk and 2.9.
This commit is contained in:
parent
67dae2f1cf
commit
34f2c1c6ea
1 changed files with 0 additions and 7 deletions
|
@ -32,9 +32,6 @@ class aa_tools:
|
|||
|
||||
if tool_name in ['audit']:
|
||||
self.remove = args.remove
|
||||
elif tool_name == 'disable':
|
||||
self.disabledir = apparmor.profile_dir + '/disable'
|
||||
self.check_disable_dir()
|
||||
elif tool_name == 'autodep':
|
||||
self.force = args.force
|
||||
self.aa_mountpoint = apparmor.check_for_apparmor()
|
||||
|
@ -50,10 +47,6 @@ class aa_tools:
|
|||
if not user_perm(apparmor.profile_dir):
|
||||
raise apparmor.AppArmorException("Cannot write to profile directory: %s" % (apparmor.profile_dir))
|
||||
|
||||
def check_disable_dir(self):
|
||||
if not os.path.isdir(self.disabledir):
|
||||
raise apparmor.AppArmorException("Can't find AppArmor disable directory %s" % self.disabledir)
|
||||
|
||||
def get_next_to_profile(self):
|
||||
'''Iterator function to walk the list of arguments passed'''
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue