Template definitions might have a whitespace after
the comma, e.g. su_restricted_domain_template
in /policy/modules/admin/su.if
template(`su_restricted_domain_template', `
...
')
gentemplates.sh silently fails to parse it. This works
unless 'set -e' is set, in which case the script fails
non-silently.
This commit adds support of whitespace after comma, which
is a valid syntax.
Signed-off-by: Oleksii Miroshko <oleksii.miroshko@bmw.de>
Some of the templates in the reference policy generate new booleans and
tunables, based on the $1, $2, ... parameters passed on. To allow
segenxml, which generates the necessary documentation on booleans, to
keep track of template-generated booleans as well, we need to allow it
to substitute template calls with the actual template content.
The gentemplates.sh script is a helper script that will extract template
code and store it as files (one file per template). These files are then
later on used by the segenxml tool.
Signed-off-by: Sven Vermeulen <sven.vermeulen@siphos.be>