Bug 1123590 - SELinux is preventing /usr/bin/gnome-shell from 'search' accesses on the directory . [NEEDINFO]
Summary: SELinux is preventing /usr/bin/gnome-shell from 'search' accesses on the dire...
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 20
Hardware: x86_64
OS: Unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
Whiteboard: abrt_hash:e130f2a3c887ce72276344fb644...
Depends On:
TreeView+ depends on / blocked
Reported: 2014-07-27 00:33 UTC by Steven Citron-Pousty
Modified: 2015-06-29 21:46 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2015-06-29 21:46:55 UTC
lvrabec: needinfo? (spousty)

Attachments (Terms of Use)

Description Steven Citron-Pousty 2014-07-27 00:33:56 UTC
Description of problem:
Happened on boot
SELinux is preventing /usr/bin/gnome-shell from 'search' accesses on the directory .

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

If you want to allow gnome-shell to have search access on the  directory
Then you need to change the label on $FIX_TARGET_PATH
# semanage fcontext -a -t FILE_TYPE '$FIX_TARGET_PATH'
where FILE_TYPE is one of the following: NetworkManager_etc_rw_t, NetworkManager_etc_t, NetworkManager_unit_file_t, abrt_etc_t, abrt_unit_file_t, abrt_var_run_t, accountsd_unit_file_t, accountsd_var_lib_t, admin_home_t, afs_config_t, aiccu_etc_t, alsa_etc_rw_t, alsa_home_t, alsa_unit_file_t, amanda_unit_file_t, anon_inodefs_t, antivirus_conf_t, antivirus_home_t, antivirus_unit_file_t, apcupsd_unit_file_t, apmd_unit_file_t, arpwatch_unit_file_t, asterisk_etc_t, asterisk_t, audio_home_t, auditd_unit_file_t, auth_cache_t, auth_home_t, autofs_t, automount_unit_file_t, avahi_unit_file_t, avahi_var_run_t, bcfg2_unit_file_t, bin_t, binfmt_misc_fs_t, bitlbee_conf_t, bluetooth_conf_t, bluetooth_unit_file_t, boinc_unit_file_t, boot_t, bootloader_etc_t, bumblebee_unit_file_t, cache_home_t, capifs_t, cert_t, cgconfig_etc_t, cgroup_t, cgrules_etc_t, chrome_sandbox_home_t, chronyd_unit_file_t, cifs_t, cinder_api_unit_file_t, cinder_backup_unit_file_t, cinder_scheduler_unit_file_t, cinder_volume_unit_file_t, cloud_init_unit_file_t, cluster_conf_t, cluster_unit_file_t, cobbler_etc_t, collectd_unit_file_t, colord_unit_file_t, condor_etc_rw_t, condor_unit_file_t, config_home_t, config_usr_t, conman_unit_file_t, consolekit_log_t, consolekit_unit_file_t, couchdb_conf_t, couchdb_unit_file_t, courier_etc_t, cpu_online_t, cpucontrol_conf_t, crack_db_t, crond_unit_file_t, cupsd_etc_t, cupsd_rw_etc_t, cupsd_unit_file_t, cvs_home_t, data_home_t, dbus_home_t, dbusd_etc_t, ddclient_etc_t, debugfs_t, default_context_t, default_t, device_t, devpts_t, dhcp_etc_t, dhcpd_unit_file_t, dictd_etc_t, dnsmasq_etc_t, dnsmasq_unit_file_t, docker_unit_file_t, dosfs_t, dovecot_etc_t, ecryptfs_t, efivarfs_t, etc_mail_t, etc_runtime_t, etc_t, exports_t, faillog_t, fetchmail_etc_t, fetchmail_home_t, file_context_t, file_t, fingerd_etc_t, firewalld_etc_rw_t, firewalld_unit_file_t, firstboot_etc_t, fonts_cache_t, fonts_t, freeipmi_bmc_watchdog_unit_file_t, freeipmi_ipmidetectd_unit_file_t, freeipmi_ipmiseld_unit_file_t, ftpd_etc_t, ftpd_unit_file_t, fusefs_t, gconf_etc_t, gconf_home_t, gconf_tmp_t, gear_unit_file_t, getty_etc_t, getty_unit_file_t, git_user_content_t, gkeyringd_gnome_home_t, gkeyringd_tmp_t, gnome_home_t, gpg_secret_t, gpm_conf_t, gpmctl_t, gssproxy_unit_file_t, gstreamer_home_t, haproxy_unit_file_t, hddtemp_etc_t, home_bin_t, home_cert_t, home_root_t, hostname_etc_t, httpd_config_t, httpd_unit_file_t, httpd_user_content_t, httpd_user_htaccess_t, httpd_user_ra_content_t, httpd_user_rw_content_t, httpd_user_script_exec_t, hugetlbfs_t, hwdata_t, hypervkvp_unit_file_t, hypervvssd_unit_file_t, icc_data_home_t, iceauth_home_t, init_var_run_t, innd_etc_t, iodined_unit_file_t, ipa_otpd_unit_file_t, ipsec_mgmt_unit_file_t, iptables_unit_file_t, irc_conf_t, irc_home_t, irc_tmp_t, irssi_etc_t, irssi_home_t, iscsi_unit_file_t, iso9660_t, kdump_etc_t, kdump_unit_file_t, keepalived_unit_file_t, keystone_unit_file_t, kismet_home_t, krb5_conf_t, krb5_home_t, krb5_host_rcache_t, krb5kdc_conf_t, ksmtuned_unit_file_t, ktalkd_unit_file_t, l2tp_conf_t, lib_t, likewise_etc_t, likewise_var_lib_t, lircd_etc_t, local_login_home_t, locale_t, lost_found_t, lsmd_unit_file_t, lvm_etc_t, lvm_unit_file_t, machineid_t, mail_home_rw_t, mail_home_t, man_cache_t, man_t, mandb_cache_t, mandb_home_t, mcelog_etc_t, mdadm_conf_t, mdadm_unit_file_t, mip6d_unit_file_t, mnt_t, mock_etc_t, modemmanager_unit_file_t, modules_conf_t, motion_unit_file_t, mozilla_conf_t, mozilla_home_t, mozilla_plugin_tmpfs_t, mpd_etc_t, mpd_home_t, mpd_user_data_t, mplayer_etc_t, mplayer_home_t, mrtg_etc_t, mscan_etc_t, munin_etc_t, mysqld_etc_t, mysqld_home_t, mysqld_unit_file_t, nagios_etc_t, named_conf_t, named_unit_file_t, net_conf_t, netlabel_mgmt_unit_file_t, neutron_unit_file_t, nfs_t, nfsd_fs_t, nfsd_unit_file_t, ninfod_unit_file_t, nis_unit_file_t, nmbd_var_run_t, nova_ajax_unit_file_t, nova_api_unit_file_t, nova_cert_unit_file_t, nova_compute_unit_file_t, nova_conductor_unit_file_t, nova_console_unit_file_t, nova_direct_unit_file_t, nova_network_unit_file_t, nova_objectstore_unit_file_t, nova_scheduler_unit_file_t, nova_vncproxy_unit_file_t, nova_volume_unit_file_t, nrpe_etc_t, nscd_unit_file_t, nscd_var_run_t, nslcd_conf_t, nslcd_var_run_t, ntop_etc_t, ntp_conf_t, ntpd_unit_file_t, numad_unit_file_t, nut_conf_t, nut_unit_file_t, oddjob_unit_file_t, openct_var_run_t, openshift_var_lib_t, opensm_unit_file_t, openvpn_etc_rw_t, openvpn_etc_t, openvswitch_rw_t, openvswitch_unit_file_t, openwsman_unit_file_t, oracleasmfs_t, pads_config_t, pam_var_console_t, pam_var_run_t, pcscd_var_run_t, pegasus_conf_t, pesign_unit_file_t, pingd_etc_t, piranha_etc_rw_t, piranha_web_conf_t, pkcsslotd_unit_file_t, pki_tomcat_unit_file_t, plymouthd_spool_t, plymouthd_var_log_t, policykit_reload_t, policykit_var_lib_t, polipo_cache_home_t, polipo_config_home_t, polipo_etc_t, polipo_unit_file_t, portreserve_etc_t, postfix_etc_t, postfix_postdrop_t, postgresql_etc_t, postgrey_etc_t, power_unit_file_t, pppd_etc_t, pppd_unit_file_t, prelude_correlator_config_t, printconf_t, proc_t, procmail_home_t, prosody_unit_file_t, psad_etc_t, ptal_etc_t, pulseaudio_home_t, pulseaudio_var_run_t, puppet_etc_t, qmail_etc_t, radiusd_etc_t, radiusd_unit_file_t, radvd_etc_t, ramfs_t, rasdaemon_unit_file_t, rdisc_unit_file_t, redis_unit_file_t, removable_t, rhev_agentd_unit_file_t, rhev_agentd_var_run_t, rhnsd_conf_t, rhnsd_unit_file_t, rkhunter_var_lib_t, rlogind_home_t, rngd_unit_file_t, root_t, rpc_pipefs_t, rpcd_unit_file_t, rpm_log_t, rpm_script_tmp_t, rpm_var_cache_t, rpm_var_lib_t, rssh_ro_t, rssh_rw_t, rsync_etc_t, rtas_errd_unit_file_t, samba_etc_t, samba_unit_file_t, samba_var_t, sandbox_file_t, sanlock_unit_file_t, screen_home_t, security_t, selinux_config_t, selinux_login_config_t, sensord_unit_file_t, setrans_var_run_t, shell_exec_t, shorewall_etc_t, slapd_etc_t, slapd_unit_file_t, smbd_var_run_t, snapperd_conf_t, snapperd_home_t, snort_etc_t, sosreport_tmp_t, soundd_etc_t, spamc_home_t, spamd_etc_t, speech-dispatcher_unit_file_t, spufs_t, squid_conf_t, src_t, ssh_home_t, sshd_keygen_unit_file_t, sshd_unit_file_t, sssd_conf_t, sssd_public_t, sssd_unit_file_t, sssd_var_lib_t, stunnel_etc_t, svc_conf_t, svirt_home_t, svirt_sandbox_file_t, svnserve_unit_file_t, swift_unit_file_t, sysctl_t, sysfs_t, syslog_conf_t, syslogd_var_run_t, system_conf_t, system_cronjob_var_lib_t, system_db_t, system_dbusd_var_lib_t, system_dbusd_var_run_t, systemd_home_t, systemd_logind_sessions_t, systemd_logind_var_run_t, systemd_passwd_var_run_t, systemd_runtime_unit_file_t, systemd_unit_file_t, systemd_vconsole_unit_file_t, sysv_t, telepathy_cache_home_t, telepathy_data_home_t, telepathy_gabble_cache_home_t, telepathy_logger_cache_home_t, telepathy_logger_data_home_t, telepathy_mission_control_cache_home_t, telepathy_mission_control_data_home_t, telepathy_mission_control_home_t, telepathy_sunshine_home_t, texlive_home_t, textrel_shlib_t, tftpd_etc_t, thumb_home_t, tmp_t, tmpfs_t, tomcat_unit_file_t, tor_etc_t, tor_unit_file_t, tuned_etc_t, tuned_rw_etc_t, tvtime_home_t, udev_etc_t, udev_var_run_t, ulogd_etc_t, uml_ro_t, uml_rw_t, usbfs_t, usbmuxd_unit_file_t, usbmuxd_var_run_t, user_fonts_cache_t, user_fonts_config_t, user_fonts_t, user_home_dir_t, user_home_t, user_tmp_t, user_tmpfs_t, userhelper_conf_t, usr_t, var_auth_t, var_lib_t, var_lock_t, var_log_t, var_run_t, var_spool_t, var_t, varnishd_etc_t, vdagent_var_run_t, virt_content_t, virt_etc_t, virt_home_t, virtd_unit_file_t, vmblock_t, vmtools_unit_file_t, vmware_conf_t, vmware_file_t, vmware_sys_conf_t, vxfs_t, webalizer_etc_t, winbind_var_run_t, wine_home_t, wireshark_home_t, xauth_home_t, xdm_etc_t, xdm_home_t, xdm_log_t, xdm_rw_etc_t, xdm_spool_t, xdm_tmp_t, xdm_tmpfs_t, xdm_unconfined_exec_t, xdm_var_lib_t, xdm_var_run_t, xenfs_t, xkb_var_lib_t, xserver_etc_t, xserver_log_t, ypbind_unit_file_t, ypserv_conf_t, zarafa_etc_t, zebra_conf_t, zebra_unit_file_t, zoneminder_unit_file_t. 
Then execute: 
restorecon -v '$FIX_TARGET_PATH'

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

If you believe that gnome-shell should be allowed search access on the  directory by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
allow this access for now by executing:
# grep gnome-shell /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:xdm_t:s0-s0:c0.c1023
Target Context                unconfined_u:object_r:unlabeled_t:s0
Target Objects                 [ dir ]
Source                        gnome-shell
Source Path                   /usr/bin/gnome-shell
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           gnome-shell-3.10.4-7.fc20.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-177.fc20.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 3.15.6-200.fc20.x86_64 #1 SMP Fri
                              Jul 18 02:36:27 UTC 2014 x86_64 x86_64
Alert Count                   3
First Seen                    2014-07-26 15:11:04 PDT
Last Seen                     2014-07-26 17:30:22 PDT
Local ID                      71371bab-96ad-48a6-bc07-7a4d6ab0f1ba

Raw Audit Messages
type=AVC msg=audit(1406421022.290:367): avc:  denied  { search } for  pid=1277 comm="gnome-shell" name="sublime_text_2" dev="dm-0" ino=807025 scontext=system_u:system_r:xdm_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:unlabeled_t:s0 tclass=dir

type=AVC msg=audit(1406421022.290:367): avc:  denied  { execute } for  pid=1277 comm="gnome-shell" name="sublime_text" dev="dm-0" ino=807026 scontext=system_u:system_r:xdm_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:unlabeled_t:s0 tclass=file

type=SYSCALL msg=audit(1406421022.290:367): arch=x86_64 syscall=access success=yes exit=0 a0=2d90ec9 a1=1 a2=8 a3=12 items=0 ppid=1168 pid=1277 auid=4294967295 uid=42 gid=42 euid=42 suid=42 fsuid=42 egid=42 sgid=42 fsgid=42 tty=(none) ses=4294967295 comm=gnome-shell exe=/usr/bin/gnome-shell subj=system_u:system_r:xdm_t:s0-s0:c0.c1023 key=(null)

Hash: gnome-shell,xdm_t,unlabeled_t,dir,search

Additional info:
reporter:       libreport-2.2.3
hashmarkername: setroubleshoot
kernel:         3.15.6-200.fc20.x86_64
type:           libreport

Comment 1 Miroslav Grepl 2014-07-28 06:28:16 UTC
Where is sublime_text located? Did you try to add a label for it?

Comment 2 Daniel Walsh 2014-07-28 12:20:43 UTC
unlabeled_t means you got a file onto your system either without a label or with a label the kernel does not understand.  If you run restorecon on the file it will add a proper label.

Comment 3 Steven Citron-Pousty 2014-09-02 16:59:09 UTC
This a stock Fedora install and I don't have sublime text installed. I reported this bug because I think SELinux should have given this permission by default.

Comment 4 Daniel Walsh 2014-09-03 10:22:40 UTC
find / -name sublime_text

Comment 5 Fedora End Of Life 2015-05-29 12:29:02 UTC
This message is a reminder that Fedora 20 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 20. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '20'.

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

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 20 is 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  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

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.

Comment 6 Fedora End Of Life 2015-06-29 21:46:55 UTC
Fedora 20 changed to end-of-life (EOL) status on 2015-06-23. Fedora 20 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this

Thank you for reporting this bug and we are sorry it could not be fixed.

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