From: Russell Coker <russell@coker.com.au>
To: selinux-refpolicy@vger.kernel.org
Subject: syntax errors from sepolgen-ifgen
Date: Wed, 02 Aug 2023 21:35:54 +1000 [thread overview]
Message-ID: <2331533.72vocr9iq0@xev> (raw)
/usr/share/selinux/devel/include/system/init.if: Syntax error on line 2064
true [type=TRUE]
/usr/share/selinux/devel/include/system/init.if: Syntax error on line 2075 '
[type=SQUOTE]
/usr/share/selinux/devel/include/system/init.if: Syntax error on line 2079 '
[type=SQUOTE]
/usr/share/selinux/devel/include/system/init.if: Syntax error on line 2090 '
[type=SQUOTE]
/usr/share/selinux/devel/include/system/init.if: Syntax error on line 2094 '
[type=SQUOTE]
/usr/share/selinux/devel/include/kernel/kernel.if: Syntax error on line 1737 -
[type=MINUS]
/usr/share/selinux/devel/include/kernel/kernel.if: Syntax error on line 1755 -
[type=MINUS]
I see the above errors when I run sepolgen-ifgen.
interface(`init_startstop_service',`
ifelse(`init_systemd',`true',`
# This ifelse condition is temporary, until
# all callers are updated to provide unit files.
ifelse(`$5',`',`',`
gen_require(`
class service { start status stop };
')
allow $1 $5:service { start status stop };
')
',`distro_gentoo',`true',`
# for OpenRC
seutil_labeled_init_script_run_runinit($1, $2, $4)
',`direct_sysadm_daemon',`true',`
gen_require(`
role system_r;
')
The first 3 are from the above, the init_systemd, distro_gentoo, and
direct_sysadm_daemon macros.
https://www.gnu.org/software/m4/manual/html_node/Ifelse.html
According to the above web page we shouldn't have quotes around those macros
to allow expansion. But removing them gives the following errors:
/usr/share/selinux/devel/include/system/init.if: Syntax error on line 2064
init_systemd [type=IDENTIFIER]
/usr/share/selinux/devel/include/system/init.if: Syntax error on line 2075 '
[type=SQUOTE]
/usr/share/selinux/devel/include/system/init.if: Syntax error on line 2079 '
[type=SQUOTE]
The errors about type=MINUS are from the the -proc_type in the following:
interface(`kernel_write_non_proc_init_mountpoint_files',`
gen_require(`
attribute proc_type;
')
init_write_mountpoint_files($1, -proc_type)
')
Any suggestions on how to address this? My m4 skills aren't up to this task.
--
My Main Blog http://etbe.coker.com.au/
My Documents Blog http://doc.coker.com.au/
reply other threads:[~2023-08-02 11:42 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2331533.72vocr9iq0@xev \
--to=russell@coker.com.au \
--cc=selinux-refpolicy@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).