Bug 1009748

Summary: SELinux is preventing /usr/bin/systemd-tmpfiles from 'rmdir' accesses on the directory root.
Product: [Fedora] Fedora Reporter: dborkov <dborkov>
Component: selinux-policyAssignee: Lukas Vrabec <lvrabec>
Status: CLOSED INSUFFICIENT_DATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 19CC: dborkov, dominick.grift, dwalsh, lvrabec, mgrepl
Target Milestone: ---Flags: lvrabec: needinfo? (dborkov)
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:c07ed7ba3df0aeb9f9cd78971910dd0d91f771b4886a7f9017063f12221b3653
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-03-13 15:53:58 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description dborkov 2013-09-19 04:02:28 UTC
Description of problem:
SELinux is preventing /usr/bin/systemd-tmpfiles from 'rmdir' accesses on the directory root.

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

If you believe that systemd-tmpfiles should be allowed rmdir access on the root 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                unconfined_u:object_r:home_root_t:s0
Target Objects                root [ dir ]
Source                        systemd-tmpfile
Source Path                   /usr/bin/systemd-tmpfiles
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           systemd-204-11.fc19.x86_64
Target RPM Packages           filesystem-3.2-13.fc19.x86_64
Policy RPM                    selinux-policy-3.12.1-73.fc19.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.10.10-200.fc19.x86_64 #1 SMP Thu
                              Aug 29 19:05:45 UTC 2013 x86_64 x86_64
Alert Count                   11
First Seen                    2013-09-10 16:14:29 PDT
Last Seen                     2013-09-18 20:54:38 PDT
Local ID                      a65f6a6d-e2d6-490b-96d5-3f8df6ee8e73

Raw Audit Messages
type=AVC msg=audit(1379562878.203:2288): avc:  denied  { rmdir } for  pid=24589 comm="systemd-tmpfile" name="root" dev="sdb7" ino=129818 scontext=system_u:system_r:systemd_tmpfiles_t:s0 tcontext=unconfined_u:object_r:home_root_t:s0 tclass=dir


type=SYSCALL msg=audit(1379562878.203:2288): arch=x86_64 syscall=unlinkat success=no exit=EACCES a0=4 a1=7f0830369a13 a2=200 a3=7f082dcff7d8 items=0 ppid=1 pid=24589 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,home_root_t,dir,rmdir

Additional info:
reporter:       libreport-2.1.5
hashmarkername: setroubleshoot
kernel:         3.10.10-200.fc19.x86_64
type:           libreport

Comment 1 Lukas Vrabec 2013-09-20 09:35:50 UTC
Hi, 

Where is "root" dir located in your case? 
What does "$ ls -dZ /root" show you?