PATCH: Fix module specification with single number
Hi, here is a patch for https://bugzilla.redhat.com/show_bug.cgi?id=588260.
policy_parse.y +2 -0
@@ -755,6 +755,8 @@ module_def : MODULE identifier version_identifier ';' ; 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 */ ; avrules_block : avrule_decls avrule_user_defs
# echo > empty.if # echo > empty .fc # echo "policy_module(ursus_mock_utils,1)" > empty.te # make NAME=targeted -f /usr/share/selinux/devel/Makefile
Now compiles fine. The issue was that a single number without dots was being matched by the NUMBER rule in policy_scan.l instead of VERSION_IDENTIFIER.
-Thomas
--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.