From a1b08c2f651ef6a958d0408c88043ea2481fb605 Mon Sep 17 00:00:00 2001 From: Christian Boltz Date: Wed, 12 Sep 2018 12:27:19 +0200 Subject: [PATCH] Revert backporting cboltz-fix-complain-named-profiles Revert commit 995c0e96f8e0a56c7e0df45c79006dd381e21225 in the 2.12 branch set_profile_flags(): allow named profiles without attachment See merge request apparmor/apparmor!142 This commit/fix is only needed in 2.13+ because of changes introduced in 2.13 (matching profile names with globs in aa-complain), and actually breaks 2.12. --- utils/apparmor/aa.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/utils/apparmor/aa.py b/utils/apparmor/aa.py index 0eb0cdc27..262733fab 100644 --- a/utils/apparmor/aa.py +++ b/utils/apparmor/aa.py @@ -643,11 +643,6 @@ def change_profile_flags(prof_filename, program, flag, set_flag): newflags = ', '.join(add_or_remove_flag(old_flags, flag, set_flag)) if profile == program or program is None: - profile_glob = AARE(matches['attachment'], True) - else: - profile_glob = AARE(matches['profile'], False) # named profiles can come without an attachment path specified ("profile foo {...}") - - if (program is not None and profile_glob.match(program)) or program is None or program == matches['profile']: found = True header_data = { 'attachment': matches['attachment'] or '',