Bug 876215

Summary: SELinux is preventing /usr/bin/updatedb from 'getattr' accesses on the directory /var/cache/jockey.
Product: [Fedora] Fedora Reporter: Robert Kief <robert.l.kief>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 17CC: dominick.grift, dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:a00c2080cd7e3cacb65d5fb9d1bbf74c50152995a07652cc9ad817181f943ea3
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-11-15 10:07:26 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:
Attachments:
Description Flags
File: type
none
File: hashmarkername none

Description Robert Kief 2012-11-13 15:17:21 UTC
Additional info:
libreport version: 2.0.18
kernel:         3.6.6-1.fc17.x86_64

description:
:SELinux is preventing /usr/bin/updatedb from 'getattr' accesses on the directory /var/cache/jockey.
:
:*****  Plugin catchall_labels (83.8 confidence) suggests  ********************
:
:If you want to allow updatedb to have getattr access on the jockey directory
:Then you need to change the label on /var/cache/jockey
:Do
:# semanage fcontext -a -t FILE_TYPE '/var/cache/jockey'
:where FILE_TYPE is one of the following: sysctl_crypto_t, locate_var_lib_t, var_run_t, file_type, abrt_var_run_t, inotifyfs_t, var_lib_t, var_run_t, samba_var_t, anon_inodefs_t, samba_etc_t, avahi_var_run_t, nscd_var_run_t, nslcd_var_run_t, smbd_var_run_t, sssd_var_lib_t, net_conf_t, setrans_var_run_t, device_t, etc_t, sysctl_t, abrt_t, bin_t, proc_t, cfengine_var_lib_t, sysfs_t, lib_t, mnt_t, root_t, tmp_t, usr_t, var_t, noxattrfs, cpu_online_t, filesystem_type, device_t, locale_t, locate_t, etc_t, bin_t, proc_t, winbind_var_run_t, usr_t, cfengine_var_lib_t, tmp_t, var_t, etc_t, cert_t, textrel_shlib_t, var_t, rpm_script_tmp_t, security_t, sssd_public_t, default_t, likewise_var_lib_t, rpm_log_t, var_log_t, var_run_t, abrt_var_run_t, krb5_conf_t, var_run_t, var_run_t, nscd_var_run_t, pcscd_var_run_t, krb5_host_rcache_t, var_t, var_t. 
:Then execute: 
:restorecon -v '/var/cache/jockey'
:
:
:*****  Plugin catchall (17.1 confidence) suggests  ***************************
:
:If you believe that updatedb should be allowed getattr access on the jockey 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 updatedb /var/log/audit/audit.log | audit2allow -M mypol
:# semodule -i mypol.pp
:
:Additional Information:
:Source Context                system_u:system_r:locate_t:s0-s0:c0.c1023
:Target Context                system_u:object_r:unlabeled_t:s0
:Target Objects                /var/cache/jockey [ dir ]
:Source                        updatedb
:Source Path                   /usr/bin/updatedb
:Port                          <Unknown>
:Host                          (removed)
:Source RPM Packages           mlocate-0.25-1.fc17.x86_64
:Target RPM Packages           jockey-0.9.6-2.fc16.noarch
:Policy RPM                    selinux-policy-3.10.0-156.fc17.noarch
:Selinux Enabled               True
:Policy Type                   targeted
:Enforcing Mode                Enforcing
:Host Name                     (removed)
:Platform                      Linux (removed) 3.6.6-1.fc17.x86_64 #1 SMP Mon Nov
:                              5 21:59:35 UTC 2012 x86_64 x86_64
:Alert Count                   1
:First Seen                    2012-11-13 03:43:09 CST
:Last Seen                     2012-11-13 03:43:09 CST
:Local ID                      874a0eb6-4de2-4ceb-bd9e-453f63dbf3d1
:
:Raw Audit Messages
:type=AVC msg=audit(1352799789.163:88507): avc:  denied  { getattr } for  pid=6259 comm="updatedb" path="/var/cache/jockey" dev="dm-1" ino=1068609 scontext=system_u:system_r:locate_t:s0-s0:c0.c1023 tcontext=system_u:object_r:unlabeled_t:s0 tclass=dir
:
:
:type=SYSCALL msg=audit(1352799789.163:88507): arch=x86_64 syscall=lstat success=no exit=EACCES a0=1efb959 a1=7fff9e0f4c70 a2=7fff9e0f4c70 a3=0 items=0 ppid=6253 pid=6259 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=64 comm=updatedb exe=/usr/bin/updatedb subj=system_u:system_r:locate_t:s0-s0:c0.c1023 key=(null)
:
:Hash: updatedb,locate_t,unlabeled_t,dir,getattr
:
:audit2allow
:
:#============= locate_t ==============
:allow locate_t unlabeled_t:dir getattr;
:
:audit2allow -R
:
:#============= locate_t ==============
:allow locate_t unlabeled_t:dir getattr;
:


Potential duplicate bug: 671520

Comment 1 Robert Kief 2012-11-13 15:18:51 UTC
Created attachment 644167 [details]
File: type

Comment 2 Robert Kief 2012-11-13 15:19:15 UTC
Created attachment 644168 [details]
File: hashmarkername

Comment 3 Miroslav Grepl 2012-11-15 10:07:26 UTC

*** This bug has been marked as a duplicate of bug 671520 ***

Comment 4 Miroslav Grepl 2012-11-15 10:08:29 UTC
Did you remove the jockey policy? What does

# semodule -l |grep jockey

Comment 5 Robert Kief 2012-11-15 15:39:29 UTC
No, I didn't remove anything.  I just reported the bug.  One of the last updates I did on my system had a "jockey" update in it.  This bug appeared after that update.

You wish me to execute "semodule -l |grep jockey" and report back the results?

Comment 6 Daniel Walsh 2012-11-15 15:55:49 UTC
Miroslav check jockey scripts to see if they are doing something with the policy.