[apparmor] PATCH [1/6] - Stop flex from dumping to stdout when audit_id doesn't parse as expected

John Johansen john.johansen at canonical.com
Thu Sep 9 16:30:52 BST 2010


The scanner will dump unmatched text from <audit_id> is encountered.


Index: libapparmor/src/scanner.l
===================================================================
--- libapparmor.orig/src/scanner.l	2010-09-09 08:13:42.334193402 -0700
+++ libapparmor/src/scanner.l	2010-09-09 08:13:46.584193399 -0700
@@ -194,6 +194,7 @@
 	{period}		{ return(TOK_PERIOD); }
 	{open_paren}		{ return(TOK_OPEN_PAREN); }
 	{close_paren}		{ yy_pop_state(yyscanner); return(TOK_CLOSE_PAREN); }
+	.			{ BEGIN(unknown_message); yyless(0); /* dump the rest */ }
 }
 
 <sub_id>{



More information about the AppArmor mailing list