From 6b4cede82c30ad234a18579fda958d41aa14d315 Mon Sep 17 00:00:00 2001 From: Christian Boltz Date: Sun, 9 Nov 2014 01:33:40 +0100 Subject: [PATCH] let RE_EOL strip() whitespace from Acked-by: Kshitij Gupta --- utils/apparmor/aa.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/apparmor/aa.py b/utils/apparmor/aa.py index 6f32b5028..66a9a649a 100644 --- a/utils/apparmor/aa.py +++ b/utils/apparmor/aa.py @@ -2613,7 +2613,7 @@ def attach_profile_data(profiles, profile_data): ## Profile parsing Regex RE_AUDIT_DENY = '^\s*(?Paudit\s+)?(?Pallow\s+|deny\s+)?' # line start, optionally: leading whitespace, and /deny RE_OWNER = '(?Powner\s+)?' # optionally: -RE_EOL = '\s*(?P#.*)?$' # optional whitespace, optional , end of the line +RE_EOL = '\s*(?P#.*?)?\s*$' # optional whitespace, optional , optional whitespace, end of the line RE_COMMA_EOL = '\s*,' + RE_EOL # optional whitespace, comma + RE_EOL RE_PROFILE_START = re.compile('^\s*("?(/.+?)"??|(profile\s+"?(.+?)"??))\s+((flags=)?\((.+)\)\s+)?\{' + RE_EOL)