Bug 782537

Summary: SELinux is preventing /bin/systemd-tmpfiles from 'read' accesses on the directory yum-root-UhxXB1.
Product: [Fedora] Fedora Reporter: Slawomir Czarko <slawomir.czarko>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 15CC: dominick.grift, dwalsh, jentrena, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:90ba58dc8b96bbd18be7f10c94d2cc4b926ce5034a77f8d32910edcfc5f65e8e
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-08-07 17:21:13 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 Slawomir Czarko 2012-01-17 16:02:47 UTC
SELinux is preventing /bin/systemd-tmpfiles from 'read' accesses on the directory yum-root-UhxXB1.

*****  Plugin catchall_labels (83.8 confidence) suggests  ********************

If you want to allow systemd-tmpfiles to have read access on the yum-root-UhxXB1 directory
Then you need to change the label on yum-root-UhxXB1
Do
# semanage fcontext -a -t FILE_TYPE 'yum-root-UhxXB1'
where FILE_TYPE is one of the following: rpm_var_lib_t, net_conf_t, home_root_t, var_run_t, cert_t, man_t, user_home_dir_t, tmp_t, filesystem_type, device_t, locale_t, var_auth_t, etc_t, file_t, tmpfs_t, lockfile, pidfile, tmpfile, sysctl_crypto_t, lost_found_t, abrt_t, lib_t, root_t, usr_t, systemd_tmpfiles_t, httpd_cache_t, sandbox_file_t, device_t, etc_t, user_home_type, rpm_var_cache_t, faillog_t, textrel_shlib_t, proc_net_t, net_conf_t, nscd_var_run_t, cert_t, var_lib_t. 
Then execute: 
restorecon -v 'yum-root-UhxXB1'


*****  Plugin catchall (17.1 confidence) suggests  ***************************

If you believe that systemd-tmpfiles should be allowed read access on the yum-root-UhxXB1 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:mnt_t:s0
Target Objects                yum-root-UhxXB1 [ dir ]
Source                        systemd-tmpfile
Source Path                   /bin/systemd-tmpfiles
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           systemd-units-26-13.fc15
Target RPM Packages           
Policy RPM                    selinux-policy-3.9.16-48.fc15
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 2.6.41.9-1.fc15.i686.PAE #1
                              SMP Fri Jan 13 16:35:57 UTC 2012 i686 i686
Alert Count                   1
First Seen                    Tue 17 Jan 2012 05:01:04 PM CET
Last Seen                     Tue 17 Jan 2012 05:01:04 PM CET
Local ID                      0dd86b41-984f-4369-8adf-c4b9f5f73186

Raw Audit Messages
type=AVC msg=audit(1326816064.72:258): avc:  denied  { read } for  pid=7279 comm="systemd-tmpfile" name="yum-root-UhxXB1" dev=sda7 ino=164590 scontext=system_u:system_r:systemd_tmpfiles_t:s0 tcontext=unconfined_u:object_r:mnt_t:s0 tclass=dir


type=SYSCALL msg=audit(1326816064.72:258): arch=i386 syscall=openat success=yes exit=EIO a0=4 a1=95c4853 a2=b8800 a3=0 items=0 ppid=1 pid=7279 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,mnt_t,dir,read

audit2allow

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

audit2allow -R

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

Comment 1 Slawomir Czarko 2012-01-17 16:08:18 UTC
yum-root-UhxXB1 is a directory under /var/tmp. It was created automatically by some process.

Comment 2 Daniel Walsh 2012-01-17 16:29:49 UTC
It looks like it was created in /mnt or /media and mv'd to /tmp?

Comment 3 Slawomir Czarko 2012-01-17 16:37:37 UTC
I don't know how this got created. I deleted 20-30 directories named "yum-root-*" and "yum-<username>-*" from /var/tmp/ a few days ago and today I can see another two there.

Comment 4 Daniel Walsh 2012-01-17 16:50:04 UTC
And how are they labeled?  Are you using livecd?

Comment 5 Slawomir Czarko 2012-01-17 17:09:51 UTC
label is unconfined_u:object_r:mnt_t:s0

No, I'm not using livecd. Fedora 15 is installed on the hard disk.

Comment 6 Fedora End Of Life 2012-08-07 17:21:17 UTC
This message is a notice that Fedora 15 is now at end of life. Fedora
has stopped maintaining and issuing updates for Fedora 15. It is
Fedora's policy to close all bug reports from releases that are no
longer maintained. At this time, all open bugs with a Fedora 'version'
of '15' have been closed as WONTFIX.

(Please note: Our normal process is to give advanced warning of this
occurring, but we forgot to do that. A thousand apologies.)

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, feel free to reopen
this bug and simply change the 'version' to a later Fedora version.

Bug Reporter: Thank you for reporting this issue and we are sorry that
we were unable to fix it before Fedora 15 reached end of life. If you
would still like to see this bug fixed and are able to reproduce it
against a later version of Fedora, you are encouraged to click on
"Clone This Bug" (top right of this page) and open it against that
version of Fedora.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

The process we are following is described here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping