Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1058950 - SELinux is preventing /usr/bin/tpprint from 'read' accesses on the file Stylus-Photo-R220.ink.
Summary: SELinux is preventing /usr/bin/tpprint from 'read' accesses on the file Stylu...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 20
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:151e86f299a2667f3ff10e716af...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-01-28 20:04 UTC by Paulo Fessel
Modified: 2014-01-29 11:52 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-01-29 11:52:07 UTC


Attachments (Terms of Use)

Description Paulo Fessel 2014-01-28 20:04:51 UTC
Description of problem:
Normal utilization of TurboPrint. When printing I've got the SElinux error.
SELinux is preventing /usr/bin/tpprint from 'read' accesses on the file Stylus-Photo-R220.ink.

*****  Plugin file (36.8 confidence) suggests   ******************************

If você acredita que é causado por uma máquina com rotulamento errado.
Then você precisa rotular novamente.
Do
touch /.autorelabel; reboot

*****  Plugin file (36.8 confidence) suggests   ******************************

If você acredita que é causado por uma máquina com rotulamento errado.
Then você precisa rotular novamente.
Do
touch /.autorelabel; reboot

*****  Plugin catchall_labels (23.2 confidence) suggests   *******************

If you want to allow tpprint to have read access on the Stylus-Photo-R220.ink file
Then você precisará mudar o rótulo em Stylus-Photo-R220.ink
Do
# semanage fcontext -a -t FILE_TYPE 'Stylus-Photo-R220.ink'
onde FILE_TYPE é um dos seguintes: NetworkManager_tmp_t, abrt_helper_exec_t, abrt_tmp_t, abrt_upload_watch_tmp_t, abrt_var_cache_t, abrt_var_run_t, admin_crontab_tmp_t, afs_cache_t, alsa_tmp_t, amanda_tmp_t, anon_inodefs_t, antivirus_tmp_t, apcupsd_tmp_t, apm_exec_t, apmd_tmp_t, arpwatch_tmp_t, asterisk_t, asterisk_tmp_t, auditadm_sudo_tmp_t, automount_tmp_t, awstats_tmp_t, bin_t, bitlbee_tmp_t, bluetooth_helper_tmp_t, bluetooth_tmp_t, boinc_project_tmp_t, boinc_tmp_t, boot_t, bootloader_tmp_t, cardmgr_dev_t, ccs_tmp_t, cdcc_tmp_t, cert_t, chkpwd_exec_t, chrome_sandbox_tmp_t, cloud_init_tmp_t, cluster_conf_t, cluster_tmp_t, cluster_var_lib_t, cluster_var_run_t, cobbler_tmp_t, colord_tmp_t, comsat_tmp_t, condor_master_tmp_t, condor_schedd_tmp_t, condor_startd_tmp_t, couchdb_tmp_t, courier_exec_t, cpu_online_t, crack_tmp_t, crond_tmp_t, crontab_tmp_t, ctdbd_tmp_t, cups_pdf_exec_t, cups_pdf_tmp_t, cupsd_etc_t, cupsd_exec_t, cupsd_interface_t, cupsd_lock_t, cupsd_log_t, cupsd_lpd_tmp_t, cupsd_rw_etc_t, cupsd_tmp_t, cupsd_unit_file_t, cupsd_var_lib_t, cupsd_var_run_t, cvs_tmp_t, cyphesis_tmp_t, cyrus_tmp_t, dbadm_sudo_tmp_t, dbskkd_tmp_t, dbusd_etc_t, dcc_client_tmp_t, dcc_dbclean_tmp_t, dccd_tmp_t, dccifd_tmp_t, dccm_tmp_t, ddclient_tmp_t, deltacloudd_tmp_t, devicekit_tmp_t, dhcpc_tmp_t, dhcpd_tmp_t, dirsrv_tmp_t, dirsrvadmin_tmp_t, disk_munin_plugin_tmp_t, dkim_milter_tmp_t, docker_tmp_t, dovecot_auth_tmp_t, dovecot_deliver_tmp_t, dovecot_tmp_t, etc_runtime_t, etc_t, exim_exec_t, exim_tmp_t, fail2ban_tmp_t, fail2ban_var_lib_t, faillog_t, fenced_tmp_t, file_context_t, firewalld_tmp_t, firewallgui_tmp_t, fonts_cache_t, fonts_t, fsadm_tmp_t, fsdaemon_tmp_t, ftpd_tmp_t, ftpdctl_tmp_t, games_tmp_t, gconf_tmp_t, getty_tmp_t, gkeyringd_tmp_t, glance_registry_tmp_t, glance_tmp_t, glusterd_tmp_t, gpg_agent_tmp_t, gpg_pinentry_tmp_t, gpm_tmp_t, gssd_tmp_t, hostname_etc_t, hostname_exec_t, httpd_bugzilla_tmp_t, httpd_collectd_script_tmp_t, httpd_mojomojo_tmp_t, httpd_munin_script_tmp_t, httpd_php_tmp_t, httpd_suexec_tmp_t, httpd_tmp_t, ifconfig_exec_t, inetd_child_tmp_t, inetd_tmp_t, initrc_exec_t, initrc_state_t, initrc_tmp_t, initrc_var_run_t, ipsec_tmp_t, iptables_tmp_t, iscsi_tmp_t, kadmind_tmp_t, kdumpctl_tmp_t, kdumpgui_tmp_t, keystone_tmp_t, kismet_tmp_t, kismet_tmpfs_t, klogd_tmp_t, krb5_conf_t, krb5_host_rcache_t, krb5_keytab_t, krb5kdc_tmp_t, ktalkd_tmp_t, l2tpd_tmp_t, ld_so_cache_t, ld_so_t, ldconfig_exec_t, ldconfig_tmp_t, lib_t, livecd_tmp_t, locale_t, logrotate_exec_t, logrotate_mail_tmp_t, logrotate_tmp_t, logwatch_mail_tmp_t, logwatch_tmp_t, lpd_tmp_t, lpd_var_run_t, lpr_exec_t, lpr_tmp_t, lsassd_tmp_t, lsmd_plugin_tmp_t, lvm_tmp_t, machineid_t, mail_munin_plugin_tmp_t, mailman_cgi_tmp_t, mailman_mail_tmp_t, mailman_queue_tmp_t, man_cache_t, man_t, mandb_cache_t, mock_tmp_t, mongod_tmp_t, mount_tmp_t, mozilla_plugin_tmp_t, mozilla_tmp_t, mpd_tmp_t, mscan_tmp_t, munin_tmp_t, mysqld_tmp_t, nagios_eventhandler_plugin_tmp_t, nagios_openshift_plugin_tmp_t, nagios_system_plugin_tmp_t, nagios_tmp_t, named_tmp_t, net_conf_t, netutils_tmp_t, neutron_tmp_t, nova_ajax_tmp_t, nova_api_tmp_t, nova_cert_tmp_t, nova_compute_tmp_t, nova_console_tmp_t, nova_direct_tmp_t, nova_network_tmp_t, nova_objectstore_tmp_t, nova_scheduler_tmp_t, nova_vncproxy_tmp_t, nova_volume_tmp_t, ntop_tmp_t, ntpd_tmp_t, nx_server_tmp_t, openshift_cgroup_read_tmp_t, openshift_cron_tmp_t, openshift_initrc_tmp_t, openshift_tmp_t, openvpn_tmp_t, openvswitch_tmp_t, pam_timestamp_tmp_t, passenger_tmp_t, passwd_file_t, pcscd_var_run_t, pegasus_openlmi_storage_tmp_t, pegasus_tmp_t, piranha_web_tmp_t, pkcsslotd_tmp_t, pki_tomcat_tmp_t, podsleuth_tmp_t, policykit_tmp_t, portmap_tmp_t, postfix_bounce_tmp_t, postfix_cleanup_tmp_t, postfix_local_tmp_t, postfix_map_tmp_t, postfix_pickup_tmp_t, postfix_pipe_tmp_t, postfix_postdrop_t, postfix_qmgr_tmp_t, postfix_smtp_tmp_t, postfix_smtpd_tmp_t, postfix_virtual_tmp_t, postgresql_tmp_t, pppd_tmp_t, prelink_exec_t, prelink_tmp_t, prelude_lml_tmp_t, print_spool_t, printconf_t, proc_t, procmail_tmp_t, psad_tmp_t, puppet_tmp_t, puppetmaster_tmp_t, qpidd_tmp_t, racoon_tmp_t, readable_t, realmd_tmp_t, rhev_agentd_tmp_t, ricci_tmp_t, rlogind_tmp_t, rpm_script_tmp_t, rpm_script_tmpfs_t, rpm_tmp_t, rsync_tmp_t, samba_etc_t, samba_net_tmp_t, samba_var_t, sblim_tmp_t, secadm_sudo_tmp_t, sectool_tmp_t, security_t, selinux_config_t, selinux_munin_plugin_tmp_t, semanage_tmp_t, sendmail_exec_t, sendmail_tmp_t, services_munin_plugin_tmp_t, session_dbusd_tmp_t, sge_tmp_t, shell_exec_t, shorewall_tmp_t, slapd_tmp_t, smbd_tmp_t, smoltclient_tmp_t, smsd_tmp_t, snmpd_var_lib_t, snort_tmp_t, sosreport_tmp_t, soundd_tmp_t, spamc_tmp_t, spamd_tmp_t, speech-dispatcher_tmp_t, squid_tmp_t, squirrelmail_spool_t, src_t, ssh_agent_tmp_t, sssd_public_t, sssd_var_lib_t, staff_sudo_tmp_t, stapserver_tmp_t, stunnel_tmp_t, svirt_tmp_t, svnserve_tmp_t, swat_tmp_t, sysadm_passwd_tmp_t, sysadm_sudo_tmp_t, sysctl_fs_t, sysctl_t, sysfs_t, syslogd_tmp_t, system_conf_t, system_cronjob_tmp_t, system_db_t, system_dbusd_tmp_t, system_dbusd_var_lib_t, system_mail_tmp_t, system_munin_plugin_tmp_t, tcpd_tmp_t, telepathy_gabble_tmp_t, telepathy_idle_tmp_t, telepathy_logger_tmp_t, telepathy_mission_control_tmp_t, telepathy_msn_tmp_t, telepathy_salut_tmp_t, telepathy_sofiasip_tmp_t, telepathy_stream_engine_tmp_t, telepathy_sunshine_tmp_t, telnetd_tmp_t, tetex_data_t, textrel_shlib_t, tgtd_tmp_t, thumb_tmp_t, tmp_t, tmpfs_t, tomcat_tmp_t, tuned_tmp_t, tvtime_tmp_t, udev_tmp_t, udev_var_run_t, uml_tmp_t, unconfined_munin_plugin_tmp_t, update_modules_tmp_t, updpwd_exec_t, usbfs_t, user_cron_spool_t, user_fonts_t, user_mail_tmp_t, user_tmp_t, usr_t, uucpd_tmp_t, var_lib_t, var_log_t, var_spool_t, var_t, var_yp_t, varnishd_tmp_t, virt_qemu_ga_tmp_t, virt_tmp_t, vmware_host_tmp_t, vmware_sys_conf_t, vmware_tmp_t, vpnc_tmp_t, webadm_tmp_t, webalizer_tmp_t, wireshark_tmp_t, xauth_tmp_t, xdm_tmp_t, xend_tmp_t, xenstored_tmp_t, ypbind_tmp_t, ypserv_tmp_t, zabbix_tmp_t, zarafa_deliver_tmp_t, zarafa_indexer_tmp_t, zarafa_server_tmp_t, zarafa_var_lib_t, zebra_tmp_t. 
Então execute: 
restorecon -v 'Stylus-Photo-R220.ink'


*****  Plugin catchall (5.04 confidence) suggests   **************************

If você acredita que o tpprint deva ser permitido acesso de read em Stylus-Photo-R220.ink file  por default.
Then você precisa reportar este como um erro.
Você pode gerar um módulo de política local para permitir este acesso.
Do
permitir este acesso agora executando:
# grep tpprint /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:cupsd_t:s0-s0:c0.c1023
Target Context                system_u:object_r:file_t:s0
Target Objects                Stylus-Photo-R220.ink [ file ]
Source                        tpprint
Source Path                   /usr/bin/tpprint
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           turboprint-2.30-1.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-119.fc20.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 3.12.8-300.fc20.x86_64 #1 SMP Thu
                              Jan 16 01:07:50 UTC 2014 x86_64 x86_64
Alert Count                   1
First Seen                    2014-01-28 14:31:45 BRST
Last Seen                     2014-01-28 14:31:45 BRST
Local ID                      50b32ad0-03c4-4b14-9992-f451a425c478

Raw Audit Messages
type=AVC msg=audit(1390926705.135:4340): avc:  denied  { read } for  pid=27520 comm="tpprint" name="Stylus-Photo-R220.ink" dev="sda5" ino=2494669 scontext=system_u:system_r:cupsd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:file_t:s0 tclass=file


type=SYSCALL msg=audit(1390926705.135:4340): arch=x86_64 syscall=open success=yes exit=EAGAIN a0=7fff80aeca30 a1=0 a2=1b6 a3=6 items=0 ppid=27496 pid=27520 auid=4294967295 uid=4 gid=7 euid=4 suid=4 fsuid=4 egid=7 sgid=7 fsgid=7 ses=4294967295 tty=(none) comm=tpprint exe=/usr/bin/tpprint subj=system_u:system_r:cupsd_t:s0-s0:c0.c1023 key=(null)

Hash: tpprint,cupsd_t,file_t,file,read

Additional info:
reporter:       libreport-2.1.11
hashmarkername: setroubleshoot
kernel:         3.12.8-300.fc20.x86_64
type:           libreport

Comment 1 Miroslav Grepl 2014-01-29 08:24:43 UTC
Where is "Stylus-Photo-R220.ink" located? Did you add a new disk? 

You will need to fix labeling.

Comment 2 Paulo Fessel 2014-01-29 11:07:19 UTC
Stylus-Photo-R220.ink is in /var/spool/turboprint/ink. No disks have been added.

Comment 3 Miroslav Grepl 2014-01-29 11:52:07 UTC
Ok, please execute

# restorecon -R -v /var/spool/turboprint


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