diff --git a/utils/aa-cleanprof b/utils/aa-cleanprof index 84f9462b8..acc617380 100755 --- a/utils/aa-cleanprof +++ b/utils/aa-cleanprof @@ -33,4 +33,4 @@ args = parser.parse_args() clean = apparmor.tools.aa_tools('cleanprof', args) -clean.act() +clean.cleanprof_act() diff --git a/utils/apparmor/tools.py b/utils/apparmor/tools.py index 6f3ba3365..a05c54ac1 100644 --- a/utils/apparmor/tools.py +++ b/utils/apparmor/tools.py @@ -84,7 +84,7 @@ class aa_tools: yield (program, profile) - def act(self): + def cleanprof_act(self): # used by aa-cleanprof apparmor.read_profiles() @@ -100,20 +100,7 @@ class aa_tools: sys.exit(1) if program and apparmor.profile_exists(program): - if self.name == 'cleanprof': - self.clean_profile(program) - - else: - filename = apparmor.get_profile_filename(program) - - if not os.path.isfile(filename) or apparmor.is_skippable_file(filename): - aaui.UI_Info(_('Profile for %s not found, skipping') % program) - - else: - # One simply does not walk in here! - raise apparmor.AppArmorException('Unknown tool: %s' % self.name) - - self.reload_profile(profile) + self.clean_profile(program) else: if '/' not in program: