systemd-tmpfiles and SELinux contexts

cgzones cgzones at googlemail.com
Tue Dec 6 16:17:40 GMT 2016


Hi list,
i am a SELinux user and systemd-tmpfiles gives me some troubles.
Systemd is installed in version 232-7 on debian unstable.
There are several basic files/directories at boot created by
systemd-tmpfiles, like /run/user/, /run/utmp or /run/sshd/.
By default, all these files/directories inherit the SELinux file
context from the parent directory, which leads to incorrect labeled
files/directories.
I know about the z/Z options, but it's tedious to write z/Z-rules for
every entry or create SELinux file context transitions for all.
Is there a simple switch, so that systemd-tmpfiles automatically sets
the correct SELinux context on new created files/directories?
(like dpkg does for installed files, or systemd-logind for /run/user/%{USERID}/)

Kindly Regards,
        Christian Göttsche



More information about the Pkg-systemd-maintainers mailing list