-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BUG: syntax error at token 'userdom_read_inherited_user_tmp_files' on Debian 10 #57
Comments
Hi @zhaofangfangdeepin, I don't currently have a Debian 10 system to debug/test this - are you able to investigate this further and perhaps supply a patch? |
From the error messages it looks like @zhaofangfangdeepin builds the test policy against refpolicy (or something very similar). I managed to reproduce almost the same errors on Fedora as follows: # WARNING: These commands modify the system configuration!
dnf install -y selinux-policy-devel
git clone https://github.com/SELinuxProject/refpolicy
git clone https://github.com/SELinuxProject/selinux-testsuite
(cd refpolicy && make conf && make install install-headers)
ln -s include/Makefile /usr/share/selinux/refpolicy/Makefile
sed -i s/targeted/refpolicy/ /etc/selinux/config
(cd selinux-testsuite/policy/ && make POLDEV=/usr/share/selinux/refpolicy) Output of the last command:
|
I had a hunch that might be the case; Debian tracks reference policy much closer than Fedora. I'm fairly busy at the moment getting ready for LSS-NA, anyone want to take a look? |
Two options:
|
Replace deprecated macros with new ones. Fedora's policy has both; refpolicy just the new ones. Partially addresses issue SELinuxProject#57. Signed-off-by: Ondrej Mosnacek <omosnace@redhat.com>
Replace deprecated macros with new ones. Fedora's policy has both; refpolicy just the new ones. Partially addresses issue #57. Signed-off-by: Ondrej Mosnacek <omosnace@redhat.com>
Replace deprecated macros with new ones. Fedora's policy has both; refpolicy just the new ones. Partially addresses issue SELinuxProject#57. Signed-off-by: Ondrej Mosnacek <omosnace@redhat.com>
Replace deprecated macros with new ones. Fedora's policy has both; refpolicy just the new ones. Partially addresses issue SELinuxProject#57. Signed-off-by: Ondrej Mosnacek <omosnace@redhat.com>
Replace deprecated macros with new ones. Fedora's policy has both; refpolicy just the new ones. Partially addresses issue SELinuxProject#57. Signed-off-by: Ondrej Mosnacek <omosnace@redhat.com>
Replace deprecated macros with new ones. Fedora's policy has both; refpolicy just the new ones. Partially addresses issue SELinuxProject#57. Signed-off-by: Ondrej Mosnacek <omosnace@redhat.com>
The overlay test policy had two calls to the userdom_read_inherited_user_tmp_files() policy interface. This is a Fedora-specific interface that is not present in refpolicy and therefore prevents building the test policy on other distributions. Further, there is no clear reason why the calls to this interface are needed for the overlay tests; the tests are not inheriting open /tmp files. Remove the calls. Fixes: SELinuxProject#57 Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
The overlay test policy had two calls to the userdom_read_inherited_user_tmp_files() policy interface. This is a Fedora-specific interface that is not present in refpolicy and therefore prevents building the test policy on other distributions. Further, there is no clear reason why the calls to this interface are needed for the overlay tests; the tests are not inheriting open /tmp files. Remove the calls. Fixes: SELinuxProject#57 Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov> Tested-by: Ondrej Mosnacek <omosnace@redhat.com>
Replace deprecated macros with new ones. Fedora's policy has both; refpolicy just the new ones. Partially addresses issue SELinuxProject#57. Signed-off-by: Ondrej Mosnacek <omosnace@redhat.com>
when i make it in debian10 . i get error like this:
`# make test
make -C policy load
make[1]: Entering directory '/home/deepin/selinux-testsuite/policy'
Test for "expand-check = 0" in /etc/selinux/semanage.conf
General policy build
make[2]: Entering directory '/home/deepin/selinux-testsuite/policy/test_policy'
Compiling default test_policy module
m4:test_policy.te:224: Warning: domain_trans() has been deprecated, please use domain_transition_pattern() instead.
m4:test_policy.te:632: Warning: domain_auto_trans() has been deprecated, please use domain_auto_transition_pattern() instead.
m4:test_policy.te:638: Warning: domain_auto_trans() has been deprecated, please use domain_auto_transition_pattern() instead.
m4:test_policy.te:711: Warning: domain_trans() has been deprecated, please use domain_transition_pattern() instead.
m4:test_policy.te:724: Warning: domain_trans() has been deprecated, please use domain_transition_pattern() instead.
m4:test_policy.te:1219: Warning: domain_trans() has been deprecated, please use domain_transition_pattern() instead.
m4:test_policy.te:1418: Warning: domain_trans() has been deprecated, please use domain_transition_pattern() instead.
m4:test_policy.te:1492: Warning: domain_trans() has been deprecated, please use domain_transition_pattern() instead.
m4:test_policy.te:1493: Warning: domain_trans() has been deprecated, please use domain_transition_pattern() instead.
m4:test_policy.te:1594: Warning: domain_trans() has been deprecated, please use domain_transition_pattern() instead.
m4:test_policy.te:1919: Warning: domain_trans() has been deprecated, please use domain_transition_pattern() instead.
m4:test_policy.te:2760: Warning: domain_trans() has been deprecated, please use domain_transition_pattern() instead.
m4:test_policy.te:2761: Warning: domain_trans() has been deprecated, please use domain_transition_pattern() instead.
/usr/bin/checkmodule: loading policy configuration from tmp/test_policy.tmp
test_policy.te:2417:ERROR 'syntax error' at token 'userdom_read_inherited_user_tmp_files' on line 101090:
userdom_read_inherited_user_tmp_files(test_overlay_mounter_t)
/usr/bin/checkmodule: error(s) encountered while parsing configuration
make[2]: *** [/usr/share/selinux/devel/include/Makefile:166: tmp/test_policy.mod] Error 1
make[2]: Leaving directory '/home/deepin/selinux-testsuite/policy/test_policy'
make[1]: *** [Makefile:110: build_general] Error 2
make[1]: Leaving directory '/home/deepin/selinux-testsuite/policy'
make: *** [Makefile:7: test] Error 2
`
The text was updated successfully, but these errors were encountered: