Bug 805359

Summary: SELinux is preventing /usr/bin/python from 'getattr' accesses on the file /var/cache/jockey/check.
Product: [Fedora] Fedora Reporter: Berry2532
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 16CC: dominick.grift, dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:9e149cbddd6ce8eb8c710cf066b01f67253ffcfa008278d59f1fc2967f9af774
Fixed In Version: selinux-policy-3.10.0-84.fc16 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-04-22 03:37:22 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 Berry2532 2012-03-21 02:20:44 UTC
libreport version: 2.0.6
executable:     /usr/bin/python (deleted)
hashmarkername: setroubleshoot
kernel:         3.1.0-7.fc16.x86_64
reason:         SELinux is preventing /usr/bin/python from 'getattr' accesses on the file /var/cache/jockey/check.
time:           Tue Mar 20 22:19:56 2012

description:
:SELinux is preventing /usr/bin/python from 'getattr' accesses on the file /var/cache/jockey/check.
:
:*****  Plugin catchall_labels (83.8 confidence) suggests  ********************
:
:If you want to allow python to have getattr access on the check file
:Then you need to change the label on /var/cache/jockey/check
:Do
:# semanage fcontext -a -t FILE_TYPE '/var/cache/jockey/check'
:where FILE_TYPE is one of the following: bin_t, cert_t, init_t, net_conf_t, abrt_var_cache_t, rpm_tmp_t, locale_t, usr_t, setroubleshootd_exec_t, etc_t, sambagui_exec_t, proc_t, sysfs_t, kdumpgui_exec_t, firewallgui_exec_t, NetworkManager_exec_t, devicekit_disk_exec_t, dbusd_exec_t, system_dbusd_tmp_t, gnomesystemmm_exec_t, logfile, user_tmp_t, abrt_var_run_t, logfile, cupsd_config_exec_t, accountsd_exec_t, system_dbusd_t, devicekit_power_exec_t, shell_exec_t, dhcpc_exec_t, abrt_exec_t, rpm_exec_t, sysctl_crypto_t, security_t, pulseaudio_exec_t, cert_t, dbusd_etc_t, user_home_t, systemd_systemctl_exec_t, etc_t, system_bus_type, init_script_file_type, cpufreqselector_exec_t, pppd_exec_t, icc_data_home_t, sssd_public_t, NetworkManager_initrc_exec_t, NetworkManager_unit_file_t, domain, puppet_tmp_t, semanage_exec_t, avahi_exec_t, abrt_t, lib_t, debuginfo_exec_t, gconfd_exec_t, colord_exec_t, ld_so_t, xdm_var_lib_t, abrt_helper_exec_t, krb5_conf_t, modemmanager_exec_t, fprintd_exec_t, udev_var_run_t, setroubleshoot_fixit_exec_t, anon_inodefs_t, sysctl_kernel_t, sectoolm_exec_t, rtkit_daemon_exec_t, firewalld_exec_t, named_exec_t, consolekit_exec_t, textrel_shlib_t, gconfdefaultsm_exec_t, admin_home_t, devicekit_exec_t, policykit_exec_t, system_dbusd_var_lib_t, system_dbusd_var_run_t, rpm_script_tmp_t, pam_var_console_t, policykit_auth_exec_t, user_cron_spool_t, kerneloops_exec_t, selinux_config_t, NetworkManager_t, samba_var_t, gnomeclock_exec_t, default_context_t, ld_so_cache_t, sosreport_tmp_t, krb5_host_rcache_t. 
:Then execute: 
:restorecon -v '/var/cache/jockey/check'
:
:
:*****  Plugin catchall (17.1 confidence) suggests  ***************************
:
:If you believe that python should be allowed getattr access on the check 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 jockey-backend /var/log/audit/audit.log | audit2allow -M mypol
:# semodule -i mypol.pp
:
:Additional Information:
:Source Context                system_u:system_r:system_dbusd_t:s0-s0:c0.c1023
:Target Context                system_u:object_r:var_t:s0
:Target Objects                /var/cache/jockey/check [ file ]
:Source                        jockey-backend
:Source Path                   /usr/bin/python
:Port                          <Unknown>
:Host                          (removed)
:Source RPM Packages           python-2.7.2-5.2.fc16
:Target RPM Packages           
:Policy RPM                    selinux-policy-3.10.0-46.fc16
:Selinux Enabled               True
:Policy Type                   targeted
:Enforcing Mode                Permissive
:Host Name                     (removed)
:Platform                      Linux (removed) 3.1.0-7.fc16.x86_64 #1 SMP Tue Nov
:                              1 21:10:48 UTC 2011 x86_64 x86_64
:Alert Count                   1
:First Seen                    Tue 20 Mar 2012 09:38:09 PM EDT
:Last Seen                     Tue 20 Mar 2012 09:38:09 PM EDT
:Local ID                      eec270da-2ebb-4209-9fc9-a31c5c49ee10
:
:Raw Audit Messages
:type=AVC msg=audit(1332293889.884:72): avc:  denied  { getattr } for  pid=1560 comm="jockey-backend" path="/var/cache/jockey/check" dev=dm-1 ino=264534 scontext=system_u:system_r:system_dbusd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:var_t:s0 tclass=file
:
:
:type=SYSCALL msg=audit(1332293889.884:72): arch=x86_64 syscall=fstat success=yes exit=0 a0=8 a1=7fffbda6c7b0 a2=7fffbda6c7b0 a3=7fae80bcd7f0 items=0 ppid=1 pid=1560 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=jockey-backend exe=/usr/bin/python subj=system_u:system_r:system_dbusd_t:s0-s0:c0.c1023 key=(null)
:
:Hash: jockey-backend,system_dbusd_t,var_t,file,getattr
:
:audit2allow
:
:#============= system_dbusd_t ==============
:allow system_dbusd_t var_t:file getattr;
:
:audit2allow -R
:
:#============= system_dbusd_t ==============
:allow system_dbusd_t var_t:file getattr;
:

Comment 1 Miroslav Grepl 2012-03-21 07:20:50 UTC
Fixed in selinux-policy-3.10.0-81.fc16

Comment 2 Fedora Update System 2012-04-18 12:55:11 UTC
selinux-policy-3.10.0-84.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/selinux-policy-3.10.0-84.fc16

Comment 3 Fedora Update System 2012-04-22 03:37:22 UTC
selinux-policy-3.10.0-84.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.