Enabling SELinux
Enable SELinux so that it can work together with the Apache HTTPS server.
- Obtain the tools used in this topic by running this
command:
# yum install policycoreutils-python selinux-policy-devel - Set the following SELinux booleans to value
1:# setsebool -P httpd_unified 1 # setsebool -P daemons_enable_cluster_mode 1 # setsebool -P httpd_run_stickshift 1
- Set type
pkcsslotd_lock_tin the security context of/var/lock/opencryptokiand all folders and sub-directories:# chcon -R -t pkcsslotd_lock_t /var/lock/opencryptoki/ - Write an SELinux policy module with the name
httpd-plus.te. The source code for policy modulehttpd-plus.teis provided in Appendix. SELinux policy module. To build and install policy modulehttpd-plus.te, enter:# make -f /usr/share/selinux/devel/Makefile # semodule -i httpd-plus.pp
- Restart the slot daemon and Apache HTTPS
server:
# systemctl restart pkcsslotd.service # systemctl restart httpd.service