3.5. Procedure – Using syslog-ng PE on SELinux The syslog-ng Premium Edition 7 Administrator Guide
Version syslog-ng PE 5 F2 and later properly supports SELinux on Red Hat Enterprise Linux 6.5 and newer platforms. Version 5 F5 and later also supports SELinux on Red Hat Enterprise Linux 5, as well as on 6.0-6.4. The CentOS and Oracle Linux platforms corresponding to the supported RHEL versions are supported as well. To use syslog-ng PE on a SELinux-enabled host, complete the following steps.
The following steps install SELinux policy module that enables syslog-ng PE to properly run with its default configuration and default installation path (
The following packages must be available on the host:
policycoreutils-python. If they are not already installed, issue the following command: yum install policycoreutils policycoreutils-devel policycoreutils-python
On RHEL 6.5, update the following packages at least to the indicated versions. These packages are available in the Red Hat repositories and are installed by default on RHEL 6.6. You can update them with the yum update selinux-policy command.
selinux-policy-3.7.19-231.el6.noarch > 3.7.19-260.el6.noarch
selinux-policy-targeted-3.7.19-231.el6.noarch > 3.7.19-260.el6.noarch
The syslog-ng PE application must be installed on the host. For details, see Chapter 3, Installing syslog-ng.
The syslog-ng PE application is installed and properly running under SELinux. If syslog-ng PE does not start, or displays permission errors, execute the syslog_ng.sh.
Download the syslog-ng PE SELinux policy module from https://my.balabit.com/downloads/syslog-ng/syslog-ng-pe-5F2_and_higher-SELinux
Uncompress the file and run the ./syslog_ng.sh script to compile and load the SELinux rules for syslog-ng PE.
Restart syslog-ng PE using the following command.
The SELinux policy works only if syslog-ng PE is started by the init daemon.
On RHEL6: service syslog-ng restart
On RHEL7: systemctl restart syslog-ng
If you do not use the service or the systemctl to start syslog-ng PE execute the
syslog_ng.shscript again after starting syslog-ng PE. This is required to correct the settings of the files related to syslog-ng PE (most notably
/dev/logand the files under
/opt/syslog-ng). The settings can become incorrect if the privileges of the process that started syslog-ng PE are different from the privileges of the service or the systemctl process.
Optional Step: The syslog-ng PE application can create coredumps, but this is disabled by default. You can enable coredumps with the setsebool -P daemons_dump_core 1 command.
Note that his command enables every daemons on your system to create core dumps, not just syslog-ng PE. There is no way to enable per-application core dumps in SELinux.