From 42b13ba15a1ef5764eea8b84196fa5a1aea2e094 Mon Sep 17 00:00:00 2001 From: Daniel Burgener Date: Tue, 10 Mar 2020 10:41:33 -0400 Subject: [PATCH] checkpolicy: Treat invalid characters as an error Previously the behavior was to warn, discard the character and proceed. Now the build will halt upon encountering an unexpected character. Signed-off-by: Daniel Burgener Acked-by: James Carter --- checkpolicy/policy_scan.l | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/checkpolicy/policy_scan.l b/checkpolicy/policy_scan.l index e2f676e4..8c100f3d 100644 --- a/checkpolicy/policy_scan.l +++ b/checkpolicy/policy_scan.l @@ -290,7 +290,7 @@ GLBLUB { return(GLBLUB); } "]" | "~" | "*" { return(yytext[0]); } -. { yywarn("unrecognized character");} +. { yyerror("unrecognized character");} %% int yyerror(const char *msg) {