This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 835022 - SELinux is preventing /usr/bin/systemd-tmpfiles from 'getattr' accesses on the file /var/tmp/kdecache-root/icon-cache.kcache.
SELinux is preventing /usr/bin/systemd-tmpfiles from 'getattr' accesses on th...
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
17
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Miroslav Grepl
Fedora Extras Quality Assurance
abrt_hash:e3b151db74ecb153c45238e3b9f...
:
: 837072 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-25 05:46 EDT by ZetaFunction
Modified: 2012-07-03 03:33 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-06-25 06:20:45 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description ZetaFunction 2012-06-25 05:46:26 EDT
libreport version: 2.0.10
executable:     /usr/bin/python2.7
hashmarkername: setroubleshoot
kernel:         3.4.3-1.fc17.x86_64
time:           Mon 25 Jun 2012 01:45:52 PM MSK

description:
:SELinux is preventing /usr/bin/systemd-tmpfiles from 'getattr' accesses on the file /var/tmp/kdecache-root/icon-cache.kcache.
:
:*****  Plugin catchall_labels (83.8 confidence) suggests  ********************
:
:If you want to allow systemd-tmpfiles to have getattr access on the icon-cache.kcache file
:Then you need to change the label on /var/tmp/kdecache-root/icon-cache.kcache
:Do
:# semanage fcontext -a -t FILE_TYPE '/var/tmp/kdecache-root/icon-cache.kcache'
:where FILE_TYPE is one of the following: rpm_var_cache_t, systemd_tmpfiles_t, faillog_t, httpd_cache_t, rpm_script_tmp_t, proc_net_t, ld_so_cache_t, etc_runtime_t, user_home_type, abrt_var_cache_t, sosreport_tmp_t, rpm_var_lib_t, machineid_t, file_type, rpm_tmp_t, httpd_sys_rw_content_t, file_context_t, abrt_var_run_t, etc_t, cert_t, admin_home_t, sysctl_crypto_t, selinux_config_t, sssd_public_t, locale_t, var_auth_t, etc_t, file_t, proc_t, man_t, sysfs_t, passwd_file_t, tmp_t, config_home_t, krb5_conf_t, wtmp_t, cpu_online_t, systemd_tmpfiles_exec_t, abrt_t, ld_so_t, lib_t, lockfile, pidfile, tmpfile, cpu_online_t, abrt_helper_exec_t, samba_var_t, samba_etc_t, sandbox_file_t, net_conf_t, security_t, textrel_shlib_t, krb5_host_rcache_t. 
:Then execute: 
:restorecon -v '/var/tmp/kdecache-root/icon-cache.kcache'
:
:
:*****  Plugin catchall (17.1 confidence) suggests  ***************************
:
:If you believe that systemd-tmpfiles should be allowed getattr access on the icon-cache.kcache file 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:unlabeled_t:s0
:Target Objects                /var/tmp/kdecache-root/icon-cache.kcache [ file ]
:Source                        systemd-tmpfile
:Source Path                   /usr/bin/systemd-tmpfiles
:Port                          <Unknown>
:Host                          (removed)
:Source RPM Packages           systemd-44-14.fc17.x86_64
:Target RPM Packages           
:Policy RPM                    selinux-policy-3.10.0-133.fc17.noarch
:Selinux Enabled               True
:Policy Type                   targeted
:Enforcing Mode                Enforcing
:Host Name                     (removed)
:Platform                      Linux (removed) 3.4.3-1.fc17.x86_64 #1 SMP Mon Jun 18
:                              19:53:17 UTC 2012 x86_64 x86_64
:Alert Count                   1
:First Seen                    Mon 25 Jun 2012 01:36:51 PM MSK
:Last Seen                     Mon 25 Jun 2012 01:36:51 PM MSK
:Local ID                      a51f4b98-7182-4c30-92e8-aa43ba75c1e2
:
:Raw Audit Messages
:type=AVC msg=audit(1340617011.32:65): avc:  denied  { getattr } for  pid=4339 comm="systemd-tmpfile" path="/var/tmp/kdecache-root/icon-cache.kcache" dev="sda7" ino=263345 scontext=system_u:system_r:systemd_tmpfiles_t:s0 tcontext=system_u:object_r:unlabeled_t:s0 tclass=file
:
:
:type=SYSCALL msg=audit(1340617011.32:65): arch=x86_64 syscall=newfstatat success=no exit=EACCES a0=5 a1=df3bd3 a2=7fffa3a329a0 a3=100 items=0 ppid=1 pid=4339 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=/usr/bin/systemd-tmpfiles subj=system_u:system_r:systemd_tmpfiles_t:s0 key=(null)
:
:Hash: systemd-tmpfile,systemd_tmpfiles_t,unlabeled_t,file,getattr
:
:audit2allowunable to open /sys/fs/selinux/policy:  Permission denied
:
:
:audit2allow -Runable to open /sys/fs/selinux/policy:  Permission denied
:
:
Comment 1 Miroslav Grepl 2012-06-25 06:20:45 EDT
Have you tried to add labeling for

/var/tmp/kdecache-root/icon-cache.kcache

?

chcon -t user_tmp_t /var/tmp/kdecache-root/icon-cache.kcache

should fix it.
Comment 2 ZetaFunction 2012-06-28 06:55:06 EDT
Yes, labeling helped, but this new version of selinux always generates such warnings about /tmp/ (especially about kde-folders in it). The previous one didn't.
Comment 3 Miroslav Grepl 2012-07-02 03:38:38 EDT
Could you remove this dir and see if it repeats?
Comment 4 ZetaFunction 2012-07-02 07:11:07 EDT
I put the update, a warning message seems to have disappeared.
Comment 5 Miroslav Grepl 2012-07-03 03:33:41 EDT
*** Bug 837072 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.