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 <slawrence@tresys.com>
This commit is contained in:
Daniel J Walsh 2011-04-29 15:41:16 -04:00 committed by Steve Lawrence
parent d4c2303866
commit c61b6934dd
1 changed files with 2 additions and 0 deletions

View File

@ -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 */
;