Hello,

as shown in profile/flags/flags_ok_whitespace.sd, the parser is quite
tolerant to additional or missing whitespace around flags=, while the
tools are more strict.

This patch updates the RE_PROFILE_START regex to follow this tolerance.


[ 66-make-flags-whitespace-tolerant.diff ]

=== modified file utils/apparmor/regex.py
--- utils/apparmor/regex.py     2015-06-18 23:50:22.428586163 +0200
+++ utils/apparmor/regex.py     2015-07-05 16:13:33.975309394 +0200
@@ -68,7 +68,7 @@
         '|' + # or
         '(' + 'profile' + '\s+' + RE_PROFILE_NAME % 'namedprofile' + '(\s+' + 
RE_PROFILE_PATH % 'attachment' + ')?' + ')' + # 'profile', profile name, 
optionally attachment
     ')' +
-    '\s+((flags=)?\((?P<flags>.+)\)\s+)?\{' +
+    '\s+((flags\s*=\s*)?\((?P<flags>.+)\)\s*)?\{' +
     RE_EOL)
 
 


Regards,

Christian Boltz
-- 
> Alle bookmark.html findest Du übrigens mit
> find /home/reinhold -name nookmark.html -print
Nein, damit findet er nur die Nookmarks. SCNR. :-)
Klingt irgendwie cool. [> Volker Kroll und Ratti in suse-linux]


-- 
AppArmor mailing list
[email protected]
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/apparmor

Reply via email to