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.
nginx EPEL 7 logrotate snippet calls systemctl kill to signal the web server main process to reopen its logs. We see this now:
type=USER_AVC msg=audit(1435918621.481:550): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='avc: denied { stop } for auid=0 uid=0 gid=0 path="/usr/lib/systemd/system/nginx.service" cmdline="/usr/bin/systemctl kill --signal=SIGUSR1 --kill-who=main nginx.service" scontext=system_u:system_r:logrotate_t:s0-s0:c0.c1023 tcontext=system_u:object_r:httpd_unit_file_t:s0 tclass=service exe="/usr/lib/systemd/systemd" sauid=0 hostname=? addr=? terminal=?'
Relevant commit:
http://pkgs.fedoraproject.org/cgit/nginx.git/commit/?h=epel7&id=1f6028c976c75dbf3df69cc1a8b74eb0fbe0fcf4
But it is working so far despite the AVC. Anyway, selinux-policy should allow systemctl kill there.
Fedora's selinux-policy will need update too.
Sorry, it does not work really. And probably any logrotate snippet using systemctl kill will suffer too.
Squid quick test (official package does not use systemctl kill):
type=USER_AVC msg=audit(1435574341.883:572): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='avc: denied { stop } for auid=0 uid=0 gid=0 path="/usr/lib/systemd/system/squid.service" cmdline="/usr/bin/systemctl --kill-who=main --signal=SIGUSR1 kill squid.service" scontext=system_u:system_r:logrotate_t:s0-s0:c0.c1023 tcontext=system_u:object_r:systemd_unit_file_t:s0 tclass=service exe="/usr/lib/systemd/systemd" sauid=0 hostname=? addr=? terminal=?'
Yes, the maintainer has reverted it.
Between
kill -HUP $(cat /run/foobar.pid)
and
systemctl kill --kill-who=main --signal=SIGHUP foobar.service
systemd has the advantage as it already knows main service pid -- IOW it will work with daemons which do not use pid files at all. No cat or pgrep shell scripting needed.
nginx EPEL 7 logrotate snippet calls systemctl kill to signal the web server main process to reopen its logs. We see this now: type=USER_AVC msg=audit(1435918621.481:550): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='avc: denied { stop } for auid=0 uid=0 gid=0 path="/usr/lib/systemd/system/nginx.service" cmdline="/usr/bin/systemctl kill --signal=SIGUSR1 --kill-who=main nginx.service" scontext=system_u:system_r:logrotate_t:s0-s0:c0.c1023 tcontext=system_u:object_r:httpd_unit_file_t:s0 tclass=service exe="/usr/lib/systemd/systemd" sauid=0 hostname=? addr=? terminal=?' Relevant commit: http://pkgs.fedoraproject.org/cgit/nginx.git/commit/?h=epel7&id=1f6028c976c75dbf3df69cc1a8b74eb0fbe0fcf4 But it is working so far despite the AVC. Anyway, selinux-policy should allow systemctl kill there. Fedora's selinux-policy will need update too.