checkpolicy - no module version
PATCH 1/1 checkpolicy - no module version
This patch corrects an old behavior where module versions could be NULL, this is no longer allowed per the grammar and therefore an error condition.
module_compiler.c +2 -4
@@ -70,10 +70,8 @@ int define_policy(int pass, int module_h } policydbp->name = id;if ((policydbp->version =queue_remove (id_queue)) ==NULL ) { -if ((policydbp->version =strdup ("" )) ==NULL ) { -yyerror ("Out of memory!" ); -return -1 ; - } +yyerror ("Expected a module version but none was found." ); +return -1 ; } }/* the first declaration within the global avrule