From 733d5faa78e5a47c949af3f7c75f454b9d8c141b Mon Sep 17 00:00:00 2001 From: Christian Boltz Date: Tue, 29 Mar 2016 12:58:15 +0200 Subject: [PATCH] Don't store exec modes in transtions[] exec choices are stored in transitions[], but that's never used (and I don't see a need for it), therefore stop storing it. Note: hat choices (CMD_ADDHAT, CMD_USEDEFAULT and CMD_DENY) get still stored in transitions[], and that information is used if the same hat name appears again. Acked-by: Steve Beattie --- utils/apparmor/aa.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/utils/apparmor/aa.py b/utils/apparmor/aa.py index 284d94054..73922037a 100644 --- a/utils/apparmor/aa.py +++ b/utils/apparmor/aa.py @@ -1202,7 +1202,6 @@ def handle_children(profile, hat, root): context_new = context_new + '^%s' % hat context_new = context_new + ' -> %s' % exec_target - # ans_new = transitions.get(context_new, '') # XXX ans meant here? combinedmode = set() combinedaudit = set() ## Check return Value Consistency @@ -1412,7 +1411,6 @@ def handle_children(profile, hat, root): exec_mode = exec_mode - (apparmor.aamode.AA_EXEC_UNSAFE | AA_OTHER(apparmor.aamode.AA_EXEC_UNSAFE)) else: ans = 'INVALID' - transitions[context_new] = ans regex_options = re.compile('CMD_(ix|px|cx|nx|pix|cix|nix)') if regex_options.search(ans):