Description of problem: The apcupsd calls scripts onbattery a offbattery, the scripts calls program smtp-cli to send an e-mail about power fail. But selinux prevents run the smtp-cli from these scripts Version-Release number of selected component (if applicable): Fedora 22, apcupsd 3.14.13 (02 February 2015) redhat How reproducible: always Steps to Reproduce: 1.plug-out the power cord, wait 15 sec, plug in again nothing will be sent 2. stop the selinux, or switch it to permissive mode 3. repeat point 1. The onbattery and offbattery scripts will send e-mails by smtp-cli Actual results: [root@alcyone rna]# cat /var/log/audit/audit.log | grep apcups type=SERVICE_START msg=audit(1445280990.750:121): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=kernel msg='unit=apcupsd comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success' type=SERVICE_STOP msg=audit(1445281442.215:197): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=kernel msg='unit=apcupsd comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success' type=SERVICE_START msg=audit(1445282911.132:129): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=kernel msg='unit=apcupsd comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success' type=SERVICE_STOP msg=audit(1445283763.104:274): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=kernel msg='unit=apcupsd comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success' type=SERVICE_START msg=audit(1445297256.369:125): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=apcupsd comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success' type=AVC msg=audit(1445364639.374:7087): avc: denied { read } for pid=19758 comm="smtp-cli" name="urandom" dev="devtmpfs" ino=2057 scontext=system_u:system_r:apcupsd_t:s0 tcontext=system_u:object_r:urandom_device_t:s0 tclass=chr_file permissive=1 type=AVC msg=audit(1445364639.374:7088): avc: denied { open } for pid=19758 comm="smtp-cli" path="/dev/urandom" dev="devtmpfs" ino=2057 scontext=system_u:system_r:apcupsd_t:s0 tcontext=system_u:object_r:urandom_device_t:s0 tclass=chr_file permissive=1 type=AVC msg=audit(1445364639.826:7089): avc: denied { getattr } for pid=19758 comm="smtp-cli" path="/dev/urandom" dev="devtmpfs" ino=2057 scontext=system_u:system_r:apcupsd_t:s0 tcontext=system_u:object_r:urandom_device_t:s0 tclass=chr_file permissive=1 type=AVC msg=audit(1445364640.201:7090): avc: denied { name_connect } for pid=19758 comm="smtp-cli" dest=25 scontext=system_u:system_r:apcupsd_t:s0 tcontext=system_u:object_r:smtp_port_t:s0 tclass=tcp_socket permissive=1 [root@alcyone rna]# Expected results: Additional info:
commit 4a428cfb9b202d305835636229cca2dd5d93c3ad Author: Lukas Vrabec <lvrabec> Date: Mon Nov 23 13:04:41 2015 +0100 Allow apcupsd sending mails about battery state. BZ(1274018)
selinux-policy-3.13.1-128.22.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2015-8083abc683
selinux-policy-3.13.1-128.22.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with $ su -c 'dnf --enablerepo=updates-testing update selinux-policy' You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-8083abc683
selinux-policy-3.13.1-128.25.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2016-825869e1a4
selinux-policy-3.13.1-128.25.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-825869e1a4
selinux-policy-3.13.1-128.27.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2016-ce419c9cab
selinux-policy-3.13.1-128.27.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-ce419c9cab
selinux-policy-3.13.1-128.28.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2016-ce419c9cab
selinux-policy-3.13.1-128.28.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-ce419c9cab
selinux-policy-3.13.1-128.28.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.