* syntax errors from sepolgen-ifgen
@ 2023-08-02 11:35 Russell Coker
0 siblings, 0 replies; only message in thread
From: Russell Coker @ 2023-08-02 11:35 UTC (permalink / raw)
To: selinux-refpolicy
/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/
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-08-02 11:42 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-02 11:35 syntax errors from sepolgen-ifgen Russell Coker
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).