Hello, when hitting an unknown line while parsing a profile, it's a good idea to include that line in the error message ;-)
I propose this patch for trunk and 2.10
(2.9 would print a literal \n because it doesn't have apparmor.fail, so
if we want that patch in 2.9, I'll have to s/\n //')
[ 49-parse-unknown-line-better-error-msg.diff ]
--- utils/apparmor/aa.py 2015-12-26 17:35:16.273569178 +0100
+++ utils/apparmor/aa.py 2015-12-26 21:19:36.910261844 +0100
@@ -3056,7 +3056,7 @@
else:
lastline = line
else:
- raise AppArmorException(_('Syntax Error: Unknown line found in
file: %(file)s line: %(line)s') % { 'file': file, 'line': lineno + 1 })
+ raise AppArmorException(_('Syntax Error: Unknown line found in
file %(file)s line %(lineno)s:\n %(line)s') % { 'file': file, 'lineno':
lineno + 1, 'line': line })
# Below is not required I'd say
if not do_include:
Regards,
Christian Boltz
--
Lesson learned: Web service APIs can drive you crazy especially
if you mix it with asynchronous network connections
[David Williams in opensuse-project]
signature.asc
Description: This is a digitally signed message part.
-- AppArmor mailing list [email protected] Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/apparmor
