[apparmor] [patch 09/11] utils: split out aa-genprof command
Christian Boltz
apparmor at cboltz.de
Thu Mar 6 12:29:41 UTC 2014
Hello,
Am Mittwoch, 5. März 2014 schrieb Steve Beattie:
> This patch splits out the genprof tool functionality into a separate
> command function, merging with the use_autodep function that already
> existed.
>
> Signed-off-by: Steve Beattie <steve at nxnw.org>
...
> Index: b/utils/apparmor/tools.py
> ===================================================================
> --- a/utils/apparmor/tools.py
> +++ b/utils/apparmor/tools.py
...
> @@ -209,6 +206,23 @@ class aa_tools:
> if cmd_info[0] != 0:
> raise apparmor.AppArmorException(cmd_info[1])
>
> + def cmd_autodep(self):
> + for (program, profile) in self.get_next_to_profile():
> + if not program:
> + aaui.UI_Info('Profile %s already exists - skipping.'
> % profile)
> + continue
NAK - this breaks the --force option (assuming the error message is
correct - I didn't test it)
Also, as Seth already noticed, _() is missing.
> +
> + apparmor.read_profiles()
> +
> + apparmor.check_qualifiers(program)
> +
> + if os.path.exists(apparmor.get_profile_filename(program))
> and not self.force:
> + aaui.UI_Info('Profile for %s already exists -
> skipping.' % program)
_() missing again.
> + else:
> + apparmor.autodep(program)
> + if self.aa_mountpoint:
> + apparmor.reload(program)
> +
> def clean_profile(self, program):
> filename = apparmor.get_profile_filename(program)
> import apparmor.cleanprofile as cleanprofile
Regards,
Christian Boltz
--
weitere Indizien deuten ja auf KMail2:
- [...]
- KMail2 ist immer kaputt, warum nicht auch hier? ;)
[Roman Fietze in opensuse-de]
More information about the AppArmor
mailing list