checkpolicy: Treat invalid characters as an error
PATCH 1/1 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 expected character.
Signed-off-by Daniel Burgener <[email protected]>
--- checkpolicy/policy_scan.l | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
checkpolicy/policy_scan.l +1 -1
@@ -290,7 +290,7 @@ GLBLUB { return(GLBLUB); } "]" | "~" | "*" { return(yytext[0]); } -. { yywarn("unrecognized character");} +. { yyerror("unrecognized character");} %% int yyerror(const char *msg) {
Signature · 1 line
2.24.1
Quoted 4 lines · Daniel Burgener
Previously the behavior was to warn, discard the character and proceed. Now the build will halt upon encountering an expected character.
Signed-off-by Daniel Burgener <[email protected]>
Acked-by James Carter <[email protected]>
Quoted 20 lines
--- checkpolicy/policy_scan.l | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)checkpolicy/policy_scan.l +1
-2@@ -290,7 +290,7 @@ GLBLUB { return(GLBLUB); } "]" | "~" | "*" { return(yytext[0]); } -. { yywarn("unrecognized character");} +. { yyerror("unrecognized character");} %% int yyerror(const char *msg) { --2.24.1
James Carter
AppliedQuoted 11 lines · James Carter
Quoted 4 lines · Daniel Burgener
Previously the behavior was to warn, discard the character and proceed. Now the build will halt upon encountering an expected character.
Signed-off-by Daniel Burgener <[email protected]>Acked-by James Carter <[email protected]>
Thanks, applied.
Jim
Quoted 20 lines
Quoted 20 lines
--- checkpolicy/policy_scan.l | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)checkpolicy/policy_scan.l +1
-2@@ -290,7 +290,7 @@ GLBLUB { return(GLBLUB); } "]" | "~" | "*" { return(yytext[0]); } -. { yywarn("unrecognized character");} +. { yyerror("unrecognized character");} %% int yyerror(const char *msg) { --2.24.1