[MDEV-10404] Improved systemd service hardening causes SELinux problems Created: 2016-07-20 Updated: 2023-07-18 Resolved: 2016-08-23 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Scripts & Clients |
| Affects Version/s: | 10.1.16 |
| Fix Version/s: | 10.1.17 |
| Type: | Bug | Priority: | Major |
| Reporter: | Harald van Dijk | Assignee: | Sergey Vojtovich |
| Resolution: | Fixed | Votes: | 1 |
| Labels: | None | ||
| Environment: |
CentOS 7.2 |
||
| Issue Links: |
|
||||||||||||||||||||||||||||
| Sprint: | 10.1.17-1 | ||||||||||||||||||||||||||||
| Description |
|
In
When I comment out the NoNewPrivileges=true, and restart, I see:
|
| Comments |
| Comment by Daniel Black [ 2016-07-31 ] | |
|
https://bugzilla.redhat.com/show_bug.cgi?id=1293493 seems to be a related systemd bug. I can't find a systemd discussion about it in their mailing list or in the freedesktop bugzilla. | |
| Comment by Daniel Black [ 2016-08-01 ] | |
|
https://www.freedesktop.org/software/systemd/man/systemd.exec.html#SELinuxContext= Suggest testing:
note: may have troubles - https://bugzilla.redhat.com/show_bug.cgi?id=1293493#c11 | |
| Comment by Daniel Black [ 2016-08-01 ] | |
|
As per the systemd bug report (link above) this apparently isn't their bug to fix. | |
| Comment by Sergey Vojtovich [ 2016-08-17 ] | |
|
serg, I disabled NoNewPrivileges. If you have an idea how to fix SELinux please do fix it, or just close this bug for now. | |
| Comment by Daniel Black [ 2016-08-18 ] | |
|
I agree with svoj keep the NoNewPrivileges disabled until selinux contains the required transition rule or something radically simple happens in the combined selinux/systemd space. | |
| Comment by Daniel Black [ 2018-04-01 ] | |
|
From systemd bug report: 4.14 kernel fixs to add NNP to have selinux transition rule as per detailed commit: https://github.com/torvalds/linux/commit/af63f4193f9fbbbac50fc766417d74735afd87ef Fedora fc26,27 are 4.15+ (https://apps.fedoraproject.org/packages/kernel) RHEL/Centos6 isn't systemd. I don't think the other distos mariadb builds packages for enable selinux. If all distro kernel capable we could give mariadb the transition to its domain via a macro like on line 599 and enable NNP again: |