Bug 1046614

Summary: SELinux is preventing /usr/bin/systemd-tmpfiles from 'rmdir' accesses on the directory backup.
Product: [Fedora] Fedora Reporter: Karel Volný <kvolny>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 20CC: dominick.grift, dwalsh, lvrabec, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:c7f82f2ab5ff51dafa5b8e234715d7b69b20e857372e63bb9f3e0988a23fd6c4
Fixed In Version: selinux-policy-3.12.1-116.fc20 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-01-16 07:11:15 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Karel Volný 2013-12-26 10:34:10 UTC
Description of problem:
I've just found it in logs, seems some background activity ... I fail to determine the full path to the directory "backup" but I guess if it is something created by systemd then systemd should be allowed to remove it ...
SELinux is preventing /usr/bin/systemd-tmpfiles from 'rmdir' accesses on the directory backup.

*****  Plugin catchall (100. confidence) suggests   **************************

If you believe that systemd-tmpfiles should be allowed rmdir access on the backup directory by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# grep systemd-tmpfile /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:systemd_tmpfiles_t:s0
Target Context                system_u:object_r:root_t:s0
Target Objects                backup [ dir ]
Source                        systemd-tmpfile
Source Path                   /usr/bin/systemd-tmpfiles
Port                          <Neznámé>
Host                          (removed)
Source RPM Packages           systemd-204-18.fc19.x86_64
                              systemd-208-9.fc20.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-74.15.fc19.noarch selinux-
                              policy-3.12.1-106.fc20.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.11.10-200.fc19.x86_64 #1 SMP Mon
                              Dec 2 20:28:03 UTC 2013 x86_64 x86_64
Alert Count                   2
First Seen                    2013-12-24 23:49:30 CET
Last Seen                     2013-12-25 23:49:30 CET
Local ID                      36bc6190-3af3-4e1f-bd68-45cd523f630c

Raw Audit Messages
type=AVC msg=audit(1388011770.206:2095): avc:  denied  { rmdir } for  pid=15286 comm="systemd-tmpfile" name="backup" dev="dm-0" ino=1607422 scontext=system_u:system_r:systemd_tmpfiles_t:s0 tcontext=system_u:object_r:root_t:s0 tclass=dir


type=SYSCALL msg=audit(1388011770.206:2095): arch=x86_64 syscall=unlinkat success=no exit=EACCES a0=5 a1=7f471ff32083 a2=200 a3=7f471decd7b8 items=0 ppid=1 pid=15286 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 ses=4294967295 tty=(none) comm=systemd-tmpfile exe=/usr/bin/systemd-tmpfiles subj=system_u:system_r:systemd_tmpfiles_t:s0 key=(null)

Hash: systemd-tmpfile,systemd_tmpfiles_t,root_t,dir,rmdir

Additional info:
reporter:       libreport-2.1.10
hashmarkername: setroubleshoot
kernel:         3.11.10-200.fc19.x86_64
type:           libreport

Comment 1 Daniel Walsh 2014-01-03 20:13:07 UTC
8321d5e473831b6f3eb3b5ac766923e414f16830 fixes this in git.

Comment 2 Lukas Vrabec 2014-01-04 00:02:46 UTC
back ported.

Comment 3 Fedora Update System 2014-01-13 22:56:46 UTC
selinux-policy-3.12.1-116.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/selinux-policy-3.12.1-116.fc20

Comment 4 Fedora Update System 2014-01-15 05:58:21 UTC
Package selinux-policy-3.12.1-116.fc20:
* should fix your issue,
* was pushed to the Fedora 20 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.12.1-116.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-0806/selinux-policy-3.12.1-116.fc20
then log in and leave karma (feedback).

Comment 5 Fedora Update System 2014-01-16 07:11:15 UTC
selinux-policy-3.12.1-116.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.