Bug 2369644
| Summary: | Allow `systemctl kill` in logrotate postrotate scripts | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Marcos Mello <marcosfrm> |
| Component: | selinux-policy | Assignee: | Zdenek Pytela <zpytela> |
| Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | low | Docs Contact: | |
| Priority: | medium | ||
| Version: | 42 | CC: | dwalsh, lvrabec, mmalik, mschorm, omosnacek, pkoncity, vmojzis, zpytela |
| Target Milestone: | --- | Flags: | zpytela:
mirror+
|
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | selinux-policy-41.43-1.fc42 | Doc Type: | --- |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2025-06-07 06:46:34 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Marcos Mello
2025-06-01 18:29:53 UTC
Marcos, Can you check the coprbuild in the assigned pull request, or the following module if it is sufficient? # cat local_logrotate_stop.cil (allow logrotate_t systemd_unit_file_type (service (stop))) # semodule -i local_logrotate_stop.cil Thank you very much, with the copr repository version (41.42-1.20250604151109788839.pr2719.2.g5e916ff80.fc42), it worked. The output of `systemctl status php-fpm.service` confirms that the postrotate script action was executed (and without AVCs): ``` jun 04 14:03:52 fedora systemd[1]: php-fpm.service: Sent signal SIGUSR1 to main process 2753 (php-fpm) on client request. ``` I plan to file bugs for all packages where using `systemctl kill` makes sense in the logrotate configuration snippets. Should I suggest to the package maintainers that the changes be applied only to rawhide? (In reply to Marcos Mello from comment #2) > Thank you very much, with the copr repository version > (41.42-1.20250604151109788839.pr2719.2.g5e916ff80.fc42), it worked. The > output of `systemctl status php-fpm.service` confirms that the postrotate > script action was executed (and without AVCs): > > ``` > jun 04 14:03:52 fedora systemd[1]: php-fpm.service: Sent signal SIGUSR1 to > main process 2753 (php-fpm) on client request. > ``` > > I plan to file bugs for all packages where using `systemctl kill` makes > sense in the logrotate configuration snippets. Should I suggest to the > package maintainers that the changes be applied only to rawhide? The policy is currently shared between F43, F42, F41. Given the impact, I already allowed the permission for every service as seen in the discussion. Do you think this is not necessary? It's perfect as it is. My concern is whether, if package maintainers add `systemctl kill` to logrotate configuration snippets in updates for F42 or F41, there's a possibility that the SELinux policy hasn't been updated yet to include this change, which could impair the log rotation of the daemon in question. FEDORA-2025-f9f097f491 (selinux-policy-41.43-1.fc42) has been submitted as an update to Fedora 42. https://bodhi.fedoraproject.org/updates/FEDORA-2025-f9f097f491 FEDORA-2025-f9f097f491 has been pushed to the Fedora 42 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2025-f9f097f491` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2025-f9f097f491 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates. (In reply to Marcos Mello from comment #4) > It's perfect as it is. My concern is whether, if package maintainers add > `systemctl kill` to logrotate configuration snippets in updates for F42 or > F41, there's a possibility that the SELinux policy hasn't been updated yet > to include this change, which could impair the log rotation of the daemon in > question. Builds for all three supported releases are on the way. FEDORA-2025-f9f097f491 (selinux-policy-41.43-1.fc42) has been pushed to the Fedora 42 stable repository. If problem still persists, please make note of it in this bug report. |