From c61b6934dd7b1c871001c049eddf4a4e57b604e8 Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Fri, 29 Apr 2011 15:41:16 -0400 Subject: [PATCH] checkpolicy: allow version of single digit currently policy will not build if I define a module as 1 policy_module(dan,1) Fails policy_module(dan,1.0) works The attached patch makes the first one work. Signed-off-by: Steve Lawrence --- checkpolicy/policy_parse.y | 2 ++ 1 file changed, 2 insertions(+) diff --git a/checkpolicy/policy_parse.y b/checkpolicy/policy_parse.y index a32e1703..8274d36c 100644 --- a/checkpolicy/policy_parse.y +++ b/checkpolicy/policy_parse.y @@ -773,6 +773,8 @@ module_def : MODULE identifier version_identifier ';' { if (define_policy(pass, 1) == -1) return -1; } ; version_identifier : VERSION_IDENTIFIER + { if (insert_id(yytext,0)) return -1; } + | number { if (insert_id(yytext,0)) return -1; } | ipv4_addr_def /* version can look like ipv4 address */ ;