Bug 691175

Summary: SELinux is preventing /bin/systemd-tmpfiles from 'read' accesses on the directory .sandbox-hicham-kauJtf.
Product: [Fedora] Fedora Reporter: Hicham HAOUARI <hicham.haouari>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 15CC: dwalsh, mgrepl, nalimilan
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:f2afcd39834a2decade0943bed715be25ca06c8da5661a370d458c3a71d554f3
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-10-07 13:54:48 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 Hicham HAOUARI 2011-03-27 11:21:05 UTC
SELinux is preventing /bin/systemd-tmpfiles from 'read' accesses on the directory .sandbox-hicham-kauJtf.

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

If you believe that systemd-tmpfiles should be allowed read access on the .sandbox-hicham-kauJtf 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:sandbox_file_t:s0:c325,c954
Target Objects                .sandbox-hicham-kauJtf [ dir ]
Source                        systemd-tmpfile
Source Path                   /bin/systemd-tmpfiles
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           systemd-units-20-1.fc15
Target RPM Packages           
Policy RPM                    selinux-policy-3.9.16-6.fc15
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux hicham-laptop 2.6.38.1-6.fc15.i686 #1 SMP
                              Wed Mar 23 23:16:24 UTC 2011 i686 i686
Alert Count                   1
First Seen                    Sun 27 Mar 2011 02:33:33 AM WET
Last Seen                     Sun 27 Mar 2011 02:33:33 AM WET
Local ID                      c1e14d76-a0b7-4e7f-a1d8-4ed757c34ec3

Raw Audit Messages
type=AVC msg=audit(1301193213.629:218): avc:  denied  { read } for  pid=1494 comm="systemd-tmpfile" name=".sandbox-hicham-kauJtf" dev=sda5 ino=418252 scontext=system_u:system_r:systemd_tmpfiles_t:s0 tcontext=unconfined_u:object_r:sandbox_file_t:s0:c325,c954 tclass=dir


type=SYSCALL msg=audit(1301193213.629:218): arch=i386 syscall=openat success=yes exit=ENXIO a0=4 a1=910b6bb a2=b0800 a3=0 items=0 ppid=1 pid=1494 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=systemd-tmpfile exe=/bin/systemd-tmpfiles subj=system_u:system_r:systemd_tmpfiles_t:s0 key=(null)

Hash: systemd-tmpfile,systemd_tmpfiles_t,sandbox_file_t,dir,read

audit2allow

#============= systemd_tmpfiles_t ==============
allow systemd_tmpfiles_t sandbox_file_t:dir read;

audit2allow -R

#============= systemd_tmpfiles_t ==============
allow systemd_tmpfiles_t sandbox_file_t:dir read;

Comment 1 Miroslav Grepl 2011-03-28 12:09:26 UTC
From other your bugs:

allow systemd_tmpfiles_t sandbox_file_t:dir { write remove_name };
allow systemd_tmpfiles_t sandbox_file_t:file unlink;
allow systemd_tmpfiles_t sandbox_file_t:sock_file { getattr unlink };
allow systemd_tmpfiles_t sandbox_file_t:dir { rmdir setattr };


Dan,
I am not sure how we should handle this.

Comment 2 Miroslav Grepl 2011-03-28 12:09:38 UTC
*** Bug 691176 has been marked as a duplicate of this bug. ***

Comment 3 Miroslav Grepl 2011-03-28 12:09:45 UTC
*** Bug 691178 has been marked as a duplicate of this bug. ***

Comment 4 Miroslav Grepl 2011-03-28 12:09:49 UTC
*** Bug 691180 has been marked as a duplicate of this bug. ***

Comment 5 Miroslav Grepl 2011-03-28 12:09:53 UTC
*** Bug 691181 has been marked as a duplicate of this bug. ***

Comment 6 Miroslav Grepl 2011-03-28 12:10:00 UTC
*** Bug 691182 has been marked as a duplicate of this bug. ***

Comment 7 Daniel Walsh 2011-03-29 15:55:30 UTC
We really should merge this policy with tmpreaper.

optional_policy(`
	sandbox_list(tmpreaper_t)
	sandbox_delete_dirs(tmpreaper_t)
	sandbox_delete_files(tmpreaper_t)
	sandbox_delete_sock_files(tmpreaper_t)
	sandbox_setattr_dirs(tmpreaper_t)
')


I added the same for systemd_tmpfiles_t.