Hide Forgot
With selinux-policy-targeted-3.10.0-56.fc16 and systemd-37-3.fc16 on a live usb I get [ 12.648435] systemd-tmpfiles[906]: Successfully loaded SELinux database in 8ms 920us, size on heap is 479K. [ 12.705021] type=1400 audit(1321997744.213:4): avc: denied { relabelfrom } for pid=906 comm="systemd-tmpfile" name="wtmp" dev=dm-0 ino=20228 scontext=system_u:system_r:systemd_t [ 12.705145] systemd-tmpfiles[906]: Unable to fix label of /var/log/wtmp: Permission denied [ 12.705964] type=1400 audit(1321997744.214:5): avc: denied { relabelfrom } for pid=906 comm="systemd-tmpfile" name="btmp" dev=dm-0 ino=20230 scontext=system_u:system_r:systemd_t [ 12.706054] systemd-tmpfiles[906]: Unable to fix label of /var/log/btmp: Permission denied As expected the files are -rw-------. root utmp system_u:object_r:faillog_t:s0 /var/log/btmp -rw-rw-r--. root utmp system_u:object_r:wtmp_t:s0 /var/log/wtmp
You are truncating the AVC. Could you attach the output of ausearch -m avc
This is all I get in dmesg. This is on a live image without syslog and without audit, so retrieving more information is not completely trivial. Is it necessary, or can you share some thoughts about what the problem could be and what I could investigate without creating a new and bigger image?
I can reproduce on a running system by removing /var/log/?tmp and creating them again running the commands from initscripts %post. That creates the files as -rw-------. root utmp unconfined_u:object_r:faillog_t:s0 btmp -rw-rw-r--. root utmp unconfined_u:object_r:wtmp_t:s0 wtmp On next boot I get the AVCs mentioned above when systemd try to relabel to -rw-------. root utmp system_u:object_r:faillog_t:s0 btmp -rw-rw-r--. root utmp system_u:object_r:wtmp_t:s0 wtmp It seems like the policy doesn't care as much about the SElinux user as systemd does? This happens so early that audit ausearch doesn't catch it. If that is surprising then there must be some other bug lurking here.
Well, you got it. The problem will be with the user identity. We will need to add domain_obj_id_change_exemption(systemd_tmpfiles_t) for constraint issue. We allow relabel of these files.
Fixed in selinux-policy-3.10.0-65.fc16
selinux-policy-3.10.0-69.fc16 has been submitted as an update for Fedora 16. https://admin.fedoraproject.org/updates/selinux-policy-3.10.0-69.fc16
Package selinux-policy-3.10.0-69.fc16: * should fix your issue, * was pushed to the Fedora 16 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing selinux-policy-3.10.0-69.fc16' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2011-17464/selinux-policy-3.10.0-69.fc16 then log in and leave karma (feedback).
selinux-policy-3.10.0-69.fc16 has been pushed to the Fedora 16 stable repository. If problems still persist, please make note of it in this bug report.
I see indications of a similar problem with selinux-policy-targeted-3.10.0-75.fc16 and systemd-37-15.fc16 : [ 9.502946] systemd-tmpfiles[944]: Successfully loaded SELinux database in 23ms 798us, size on heap is 365K. [ 9.607769] type=1400 audit(1331916365.122:3): avc: denied { relabelfrom } for pid=944 comm="systemd-tmpfile" name="wtmp" dev=dm-0 ino=4349 scontext=system_u:system_r:systemd_tmpfiles_t:s0 tcontext=unconfined_u:object_r:wtmp_t:s0 tclass=file [ 9.609063] type=1400 audit(1331916365.124:4): avc: denied { relabelfrom } for pid=944 comm="systemd-tmpfile" name="btmp" dev=dm-0 ino=4351 scontext=system_u:system_r:systemd_tmpfiles_t:s0 tcontext=unconfined_u:object_r:faillog_t:s0 tclass=file I will file a new bug if I can collect some further hints of what is going on.
No - that _must_ be caused by running some old version. Can't reproduce.