[apparmor] [PATCH v1.3 05/11] parser: Allow change_profile rules to accept an exec mode modifier

John Johansen john.johansen at canonical.com
Tue May 31 20:32:56 UTC 2016


And a follow-up patch for my ack (it is not conditional on it)

---

commit aa345e8e05fbd979b2f74c0937eec3b7b7f816cf
Author: John Johansen <john.johansen at canonical.com>
Date:   Tue May 31 13:30:13 2016 -0700

    combine SUB_ID and SUB_ID_WS to reduce code duplication
    
    Signed-off-by: John Johansen <john.johansen at canonical.com>

diff --git a/parser/parser_lex.l b/parser/parser_lex.l
index a59daa6..6e5189f 100644
--- a/parser/parser_lex.l
+++ b/parser/parser_lex.l
@@ -322,15 +322,7 @@ LT_EQUAL	<=
 	}
 }
 
-<SUB_ID>{
-	({IDS}|{QUOTED_ID}) {
-		/* Go into separate state to match generic ID strings */
-		yylval.id =  processid(yytext, yyleng);
-		POP_AND_RETURN(TOK_ID);
-	}
-}
-
-<SUB_ID_WS>{
+<SUB_ID,SUB_ID_WS>{
 	({IDS}|{QUOTED_ID}) {
 		/* Go into separate state to match generic ID strings */
 		yylval.id =  processid(yytext, yyleng);




More information about the AppArmor mailing list