Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
DescriptionOrion Poplawski
2021-02-11 00:09:16 UTC
Description of problem:
I placed a script in /usr/lib/systemd/system-sleep but it does not get executed:
type=AVC msg=audit(1612929018.423:559): avc: denied { execute } for pid=69804 comm="(direxec)" name="bitdefender-sleep" dev="dm-1" ino=138514047 scontext=system_u:system_r:systemd_sleep_t:s0 tcontext=system_u:object_r:bin_t:s0 tclass=file permissive=0
Feb 09 07:17:28 systemd[1]: Starting Suspend...
Feb 09 07:17:28 [133863]: Failed to execute /usr/lib/systemd/system-sleep/bitdefender-sleep: Permission denied
Feb 09 07:17:28 [133862]: /usr/lib/systemd/system-sleep/bitdefender-sleep failed with exit status 1.
Version-Release number of selected component (if applicable):
selinux-policy-3.14.3-54.el8_3.2.noarch
# ls -lZa /usr/lib/systemd/system-sleep
total 12
drwxr-xr-x. 2 root root system_u:object_r:bin_t:s0 31 Dec 17 16:30 ./
drwxr-xr-x. 16 root root system_u:object_r:lib_t:s0 4096 Jan 8 07:18 ../
-rwxr-xr-x. 1 root root system_u:object_r:bin_t:s0 150 Sep 5 10:49 bitdefender-sleep*
allow systemd_sleep_t systemd_sleep_exec_t:file { entrypoint execute getattr ioctl lock map open read };
Perhaps /usr/lib/systemd/system-sleep and it's contents should get labeled systemd_sleep_exec_t ?
FWIW - /usr/lib/systemd/system-shutdown is labeled lib_t instead of bin_t.
restorecon doesn't change any of these labels.
Changing to lib_t doesn't help. Changing to systemd_sleed_exec_t leads to a different denial:
avc: denied { getattr } for pid=144222 comm="(sd-executor)" path="/usr/lib/systemd/system-sleep" dev="dm-1" ino=134845448 scontext=system_u:system_r:systemd_sleep_t:s0 tcontext=system_u:object_r:systemd_sleep_exec_t:s0 tclass=dir permissive=0
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory (selinux-policy bug fix and enhancement update), and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHBA-2021:4420
Description of problem: I placed a script in /usr/lib/systemd/system-sleep but it does not get executed: type=AVC msg=audit(1612929018.423:559): avc: denied { execute } for pid=69804 comm="(direxec)" name="bitdefender-sleep" dev="dm-1" ino=138514047 scontext=system_u:system_r:systemd_sleep_t:s0 tcontext=system_u:object_r:bin_t:s0 tclass=file permissive=0 Feb 09 07:17:28 systemd[1]: Starting Suspend... Feb 09 07:17:28 [133863]: Failed to execute /usr/lib/systemd/system-sleep/bitdefender-sleep: Permission denied Feb 09 07:17:28 [133862]: /usr/lib/systemd/system-sleep/bitdefender-sleep failed with exit status 1. Version-Release number of selected component (if applicable): selinux-policy-3.14.3-54.el8_3.2.noarch # ls -lZa /usr/lib/systemd/system-sleep total 12 drwxr-xr-x. 2 root root system_u:object_r:bin_t:s0 31 Dec 17 16:30 ./ drwxr-xr-x. 16 root root system_u:object_r:lib_t:s0 4096 Jan 8 07:18 ../ -rwxr-xr-x. 1 root root system_u:object_r:bin_t:s0 150 Sep 5 10:49 bitdefender-sleep* allow systemd_sleep_t systemd_sleep_exec_t:file { entrypoint execute getattr ioctl lock map open read }; Perhaps /usr/lib/systemd/system-sleep and it's contents should get labeled systemd_sleep_exec_t ? FWIW - /usr/lib/systemd/system-shutdown is labeled lib_t instead of bin_t. restorecon doesn't change any of these labels.