Bug 969713 - SELinux is preventing /usr/bin/rm from 'rmdir' accesses on the directory module.
SELinux is preventing /usr/bin/rm from 'rmdir' accesses on the directory module.
Status: CLOSED DUPLICATE of bug 969711
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
19
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Miroslav Grepl
Fedora Extras Quality Assurance
abrt_hash:e9416e8ebfa03bf93bb817e66ce...
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-01 21:25 EDT by Moez Roy
Modified: 2013-06-03 01:57 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-06-03 01:57:36 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 Moez Roy 2013-06-01 21:25:24 EDT
Description of problem:
SELinux is preventing /usr/bin/rm from 'rmdir' accesses on the directory module.

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

If you want to allow rm to have rmdir access on the module directory
Then you need to change the label on module
Do
# semanage fcontext -a -t FILE_TYPE 'module'
where FILE_TYPE is one of the following: NetworkManager_tmp_t, NetworkManager_unit_file_t, NetworkManager_var_run_t, abrt_tmp_t, abrt_unit_file_t, abrt_var_cache_t, abrt_var_run_t, accountsd_unit_file_t, admin_crontab_tmp_t, aiccu_var_run_t, ajaxterm_var_run_t, alsa_tmp_t, alsa_unit_file_t, alsa_var_run_t, amanda_tmp_t, antivirus_tmp_t, antivirus_unit_file_t, antivirus_var_run_t, apcupsd_lock_t, apcupsd_tmp_t, apcupsd_unit_file_t, apcupsd_var_run_t, apmd_lock_t, apmd_tmp_t, apmd_unit_file_t, apmd_var_run_t, arpwatch_tmp_t, arpwatch_unit_file_t, arpwatch_var_run_t, asterisk_tmp_t, asterisk_var_run_t, audisp_var_run_t, auditadm_sudo_tmp_t, auditd_unit_file_t, auditd_var_run_t, automount_lock_t, automount_tmp_t, automount_unit_file_t, automount_var_run_t, avahi_unit_file_t, avahi_var_lib_t, avahi_var_run_t, awstats_tmp_t, bcfg2_unit_file_t, bcfg2_var_run_t, bitlbee_tmp_t, bitlbee_var_run_t, blktap_var_run_t, blueman_var_run_t, bluetooth_helper_tmp_t, bluetooth_lock_t, bluetooth_tmp_t, bluetooth_unit_file_t, bluetooth_var_run_t, boinc_project_tmp_t, boinc_tmp_t, boinc_unit_file_t, bootloader_tmp_t, bootloader_var_run_t, cachefilesd_var_run_t, callweaver_var_run_t, canna_var_run_t, cardmgr_dev_t, cardmgr_var_run_t, ccs_tmp_t, ccs_var_run_t, cdcc_tmp_t, certmaster_var_run_t, certmonger_var_run_t, cgred_var_run_t, cgroup_t, chrome_sandbox_tmp_t, chronyd_unit_file_t, chronyd_var_run_t, clogd_var_run_t, cluster_tmp_t, cluster_unit_file_t, cluster_var_run_t, clvmd_var_run_t, cmirrord_var_run_t, cobbler_tmp_t, collectd_unit_file_t, collectd_var_run_t, colord_tmp_t, colord_unit_file_t, comsat_tmp_t, comsat_var_run_t, condor_master_tmp_t, condor_schedd_tmp_t, condor_startd_tmp_t, condor_unit_file_t, condor_var_lock_t, condor_var_run_t, consolekit_unit_file_t, consolekit_var_run_t, couchdb_tmp_t, couchdb_unit_file_t, couchdb_var_run_t, courier_var_run_t, cpuspeed_var_run_t, crack_tmp_t, cron_var_run_t, crond_tmp_t, crond_unit_file_t, crond_var_run_t, crontab_tmp_t, ctdbd_tmp_t, ctdbd_var_run_t, cups_pdf_tmp_t, cupsd_config_var_run_t, cupsd_lock_t, cupsd_lpd_tmp_t, cupsd_lpd_var_run_t, cupsd_tmp_t, cupsd_unit_file_t, cupsd_var_run_t, cvs_tmp_t, cvs_var_run_t, cyphesis_tmp_t, cyphesis_var_run_t, cyrus_tmp_t, cyrus_var_run_t, dbadm_sudo_tmp_t, dbskkd_tmp_t, dbskkd_var_run_t, dcc_client_tmp_t, dcc_dbclean_tmp_t, dcc_var_run_t, dccd_tmp_t, dccd_var_run_t, dccifd_tmp_t, dccifd_var_run_t, dccm_tmp_t, dccm_var_run_t, dcerpcd_var_run_t, ddclient_tmp_t, ddclient_var_run_t, deltacloudd_tmp_t, deltacloudd_var_run_t, denyhosts_var_lock_t, devicekit_tmp_t, devicekit_var_run_t, dhcpc_tmp_t, dhcpc_var_run_t, dhcpd_tmp_t, dhcpd_unit_file_t, dhcpd_var_run_t, dictd_var_run_t, dirsrv_snmp_var_run_t, dirsrv_tmp_t, dirsrv_var_lock_t, dirsrv_var_run_t, dirsrvadmin_lock_t, dirsrvadmin_tmp_t, disk_munin_plugin_tmp_t, dkim_milter_data_t, dlm_controld_var_run_t, dnsmasq_unit_file_t, dnsmasq_var_run_t, dnssec_trigger_var_run_t, dovecot_auth_tmp_t, dovecot_deliver_tmp_t, dovecot_tmp_t, dovecot_var_run_t, drbd_lock_t, dspam_var_run_t, entropyd_var_run_t, eventlogd_var_run_t, evtchnd_var_run_t, exim_tmp_t, exim_var_run_t, fail2ban_tmp_t, fail2ban_var_run_t, faillog_t, fcoemon_var_run_t, fenced_lock_t, fenced_tmp_t, fenced_var_run_t, fetchmail_var_run_t, file_t, fingerd_var_run_t, firewalld_tmp_t, firewalld_unit_file_t, firewalld_var_run_t, firewallgui_tmp_t, foghorn_var_run_t, fonts_t, fsadm_tmp_t, fsadm_var_run_t, fsdaemon_tmp_t, fsdaemon_var_run_t, ftpd_lock_t, ftpd_tmp_t, ftpd_unit_file_t, ftpd_var_run_t, ftpdctl_tmp_t, games_srv_var_run_t, games_tmp_t, gconf_tmp_t, getty_lock_t, getty_tmp_t, getty_unit_file_t, getty_var_run_t, gfs_controld_var_run_t, gkeyringd_tmp_t, glance_registry_tmp_t, glance_tmp_t, glance_var_run_t, glusterd_tmp_t, glusterd_var_run_t, gpg_agent_tmp_t, gpg_pinentry_tmp_t, gpm_tmp_t, gpm_var_run_t, gpsd_var_run_t, greylist_milter_data_t, groupd_var_run_t, gssd_tmp_t, httpd_bugzilla_tmp_t, httpd_collectd_script_tmp_t, httpd_lock_t, httpd_mojomojo_tmp_t, httpd_munin_script_tmp_t, httpd_php_tmp_t, httpd_suexec_tmp_t, httpd_tmp_t, httpd_unit_file_t, httpd_var_run_t, icecast_var_run_t, ifconfig_var_run_t, inetd_child_tmp_t, inetd_child_var_run_t, inetd_tmp_t, inetd_var_run_t, init_var_run_t, initrc_state_t, initrc_tmp_t, initrc_var_log_t, initrc_var_run_t, innd_var_run_t, ipsec_mgmt_lock_t, ipsec_mgmt_unit_file_t, ipsec_mgmt_var_run_t, ipsec_tmp_t, ipsec_var_run_t, iptables_tmp_t, iptables_unit_file_t, iptables_var_run_t, irqbalance_var_run_t, iscsi_lock_t, iscsi_tmp_t, iscsi_unit_file_t, iscsi_var_run_t, isnsd_var_run_t, iwhd_var_run_t, jetty_var_run_t, kadmind_tmp_t, kadmind_var_run_t, kdump_unit_file_t, kdumpctl_tmp_t, kdumpgui_tmp_t, keystone_tmp_t, keystone_unit_file_t, kismet_tmp_t, kismet_tmpfs_t, kismet_var_run_t, klogd_tmp_t, klogd_var_run_t, krb5_host_rcache_t, krb5kdc_lock_t, krb5kdc_tmp_t, krb5kdc_var_run_t, ksmtuned_unit_file_t, ksmtuned_var_run_t, ktalkd_tmp_t, l2tpd_tmp_t, l2tpd_var_run_t, ldconfig_tmp_t, likewise_pstore_lock_t, lircd_var_run_t, livecd_tmp_t, lldpad_var_run_t, local_login_lock_t, lockdev_lock_t, logrotate_lock_t, logrotate_mail_tmp_t, logrotate_tmp_t, logwatch_lock_t, logwatch_mail_tmp_t, logwatch_tmp_t, logwatch_var_run_t, lpd_tmp_t, lpd_var_run_t, lpr_tmp_t, lsassd_tmp_t, lsassd_var_run_t, lvm_lock_t, lvm_tmp_t, lvm_unit_file_t, lvm_var_run_t, lwiod_var_run_t, lwregd_var_run_t, lwsmd_var_run_t, mail_munin_plugin_tmp_t, mailman_cgi_tmp_t, mailman_lock_t, mailman_mail_tmp_t, mailman_queue_tmp_t, mailman_var_run_t, mandb_lock_t, mcelog_var_run_t, mdadm_var_run_t, memcached_var_run_t, mnt_t, mock_tmp_t, mongod_tmp_t, mongod_var_run_t, mount_tmp_t, mount_var_run_t, mozilla_plugin_tmp_t, mozilla_tmp_t, mpd_tmp_t, mpd_var_run_t, mrtg_lock_t, mrtg_var_run_t, mscan_tmp_t, mscan_var_run_t, munin_tmp_t, munin_var_run_t, mysqld_db_t, mysqld_tmp_t, mysqld_unit_file_t, mysqld_var_run_t, mysqlmanagerd_var_run_t, nagios_eventhandler_plugin_tmp_t, nagios_system_plugin_tmp_t, nagios_tmp_t, nagios_var_run_t, named_conf_t, named_tmp_t, named_unit_file_t, named_var_run_t, netlogond_var_run_t, netutils_tmp_t, nfsd_unit_file_t, nis_unit_file_t, nmbd_var_run_t, nova_ajax_tmp_t, nova_ajax_unit_file_t, nova_api_tmp_t, nova_api_unit_file_t, nova_cert_tmp_t, nova_cert_unit_file_t, nova_compute_tmp_t, nova_compute_unit_file_t, nova_console_tmp_t, nova_console_unit_file_t, nova_direct_tmp_t, nova_direct_unit_file_t, nova_network_tmp_t, nova_network_unit_file_t, nova_objectstore_tmp_t, nova_objectstore_unit_file_t, nova_scheduler_tmp_t, nova_scheduler_unit_file_t, nova_var_run_t, nova_vncproxy_tmp_t, nova_vncproxy_unit_file_t, nova_volume_tmp_t, nova_volume_unit_file_t, nrpe_var_run_t, nscd_unit_file_t, nscd_var_run_t, nslcd_var_run_t, ntop_tmp_t, ntop_var_run_t, ntpd_tmp_t, ntpd_unit_file_t, ntpd_var_run_t, numad_unit_file_t, numad_var_run_t, nut_unit_file_t, nut_var_run_t, nx_server_tmp_t, nx_server_var_run_t, oddjob_unit_file_t, oddjob_var_run_t, openct_var_run_t, openshift_cgroup_read_tmp_t, openshift_cron_tmp_t, openshift_initrc_tmp_t, openshift_tmp_t, openshift_var_run_t, openvpn_tmp_t, openvpn_var_run_t, openvswitch_unit_file_t, openvswitch_var_run_t, pads_var_run_t, pam_timestamp_tmp_t, pam_var_console_t, pam_var_run_t, passenger_tmp_t, passenger_var_run_t, pcscd_var_run_t, pegasus_tmp_t, pegasus_var_run_t, piranha_fos_var_run_t, piranha_lvs_var_run_t, piranha_pulse_var_run_t, piranha_web_tmp_t, piranha_web_var_run_t, pkcsslotd_lock_t, pkcsslotd_tmp_t, pkcsslotd_unit_file_t, pkcsslotd_var_run_t, pki_ra_lock_t, pki_ra_var_run_t, pki_tomcat_lock_t, pki_tomcat_tmp_t, pki_tomcat_unit_file_t, pki_tomcat_var_run_t, pki_tps_lock_t, pki_tps_var_run_t, plymouthd_var_run_t, podsleuth_tmp_t, policykit_tmp_t, policykit_var_run_t, polipo_pid_t, polipo_unit_file_t, portmap_tmp_t, portmap_var_run_t, portreserve_var_run_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_qmgr_tmp_t, postfix_smtp_tmp_t, postfix_smtpd_tmp_t, postfix_var_run_t, postfix_virtual_tmp_t, postgresql_db_t, postgresql_lock_t, postgresql_tmp_t, postgresql_var_run_t, postgrey_var_run_t, power_unit_file_t, pppd_lock_t, pppd_tmp_t, pppd_unit_file_t, pppd_var_run_t, pptp_var_run_t, prelink_tmp_t, prelude_audisp_var_run_t, prelude_lml_tmp_t, prelude_lml_var_run_t, prelude_var_run_t, privoxy_var_run_t, procmail_tmp_t, psad_tmp_t, psad_var_run_t, ptal_var_run_t, pulseaudio_var_run_t, puppet_tmp_t, puppet_var_run_t, puppetmaster_tmp_t, pwauth_var_run_t, pyicqt_var_run_t, qdiskd_var_run_t, qemu_var_run_t, qpidd_tmp_t, qpidd_var_run_t, quantum_tmp_t, quantum_unit_file_t, quota_nld_var_run_t, rabbitmq_var_run_t, racoon_tmp_t, radiusd_unit_file_t, radiusd_var_run_t, radvd_var_run_t, readahead_var_run_t, realmd_tmp_t, regex_milter_data_t, restorecond_var_run_t, rhev_agentd_tmp_t, rhev_agentd_unit_file_t, rhev_agentd_var_run_t, rhsmcertd_lock_t, rhsmcertd_var_run_t, ricci_modcluster_var_run_t, ricci_modstorage_lock_t, ricci_tmp_t, ricci_var_lib_t, ricci_var_run_t, rlogind_tmp_t, rlogind_var_run_t, rngd_unit_file_t, roundup_var_run_t, rpcbind_var_run_t, rpcd_unit_file_t, rpcd_var_run_t, rpm_script_tmp_t, rpm_tmp_t, rpm_var_run_t, rsync_tmp_t, rsync_var_run_t, samba_net_tmp_t, samba_unit_file_t, sanlock_unit_file_t, sanlock_var_run_t, saslauthd_var_run_t, sblim_var_run_t, screen_var_run_t, secadm_sudo_tmp_t, sectool_tmp_t, selinux_munin_plugin_tmp_t, semanage_read_lock_t, semanage_tmp_t, semanage_trans_lock_t, sendmail_tmp_t, sendmail_var_run_t, sensord_unit_file_t, sensord_var_run_t, services_munin_plugin_tmp_t, session_dbusd_tmp_t, setrans_var_run_t, setroubleshoot_var_run_t, sge_tmp_t, shorewall_lock_t, shorewall_tmp_t, slapd_lock_t, slapd_tmp_t, slapd_unit_file_t, slapd_var_run_t, slpd_var_run_t, smbd_tmp_t, smbd_var_run_t, smokeping_var_run_t, smoltclient_tmp_t, smsd_tmp_t, smsd_var_run_t, snmpd_var_run_t, snort_tmp_t, snort_var_run_t, sosreport_tmp_t, soundd_tmp_t, soundd_var_run_t, spamass_milter_data_t, spamc_tmp_t, spamd_tmp_t, spamd_var_run_t, squid_tmp_t, squid_var_run_t, squirrelmail_spool_t, srvsvcd_var_run_t, ssh_agent_tmp_t, sshd_unit_file_t, sshd_var_run_t, sssd_public_t, sssd_unit_file_t, sssd_var_run_t, staff_sudo_tmp_t, stapserver_tmp_t, stapserver_var_run_t, stunnel_tmp_t, stunnel_var_run_t, svc_svc_t, svirt_tmp_t, svnserve_tmp_t, svnserve_unit_file_t, svnserve_var_run_t, swat_tmp_t, swat_var_run_t, swift_unit_file_t, swift_var_run_t, sysadm_passwd_tmp_t, sysadm_sudo_tmp_t, syslogd_tmp_t, syslogd_var_run_t, system_cronjob_lock_t, system_cronjob_tmp_t, system_cronjob_var_run_t, system_dbusd_tmp_t, system_dbusd_var_run_t, system_mail_tmp_t, system_munin_plugin_tmp_t, systemd_logind_inhibit_var_run_t, systemd_logind_sessions_t, systemd_logind_var_run_t, systemd_passwd_var_run_t, systemd_unit_file_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, telnetd_var_run_t, tetex_data_t, tftpd_var_run_t, tgtd_tmp_t, tgtd_var_run_t, thin_aeolus_configserver_var_run_t, thin_var_run_t, thumb_tmp_t, tmp_t, tmpfs_t, tomcat_tmp_t, tomcat_unit_file_t, tomcat_var_run_t, tor_unit_file_t, tor_var_run_t, tuned_tmp_t, tuned_var_run_t, tvtime_tmp_t, udev_var_run_t, uml_switch_var_run_t, uml_tmp_t, unconfined_munin_plugin_tmp_t, update_modules_tmp_t, usbmuxd_unit_file_t, usbmuxd_var_run_t, user_fonts_t, user_mail_tmp_t, user_tmp_t, useradd_var_run_t, uucpd_lock_t, uucpd_tmp_t, uucpd_var_run_t, uuidd_var_run_t, var_lock_t, var_run_t, var_spool_t, varnishd_tmp_t, varnishd_var_run_t, varnishlog_var_run_t, vdagent_var_run_t, vhostmd_var_run_t, virt_cache_t, virt_lock_t, virt_lxc_var_run_t, virt_qemu_ga_tmp_t, virt_qemu_ga_var_run_t, virt_tmp_t, virt_var_run_t, virtd_unit_file_t, vmware_host_pid_t, vmware_host_tmp_t, vmware_pid_t, vmware_tmp_t, vnstatd_var_run_t, vpnc_tmp_t, vpnc_var_run_t, wdmd_var_run_t, webadm_tmp_t, webalizer_tmp_t, winbind_var_run_t, wine_tmp_t, wireshark_tmp_t, xauth_tmp_t, xdm_lock_t, xdm_tmp_t, xdm_var_run_t, xenconsoled_var_run_t, xend_tmp_t, xend_var_run_t, xenstored_tmp_t, xenstored_var_run_t, xserver_var_run_t, ypbind_tmp_t, ypbind_unit_file_t, ypbind_var_run_t, yppasswdd_var_run_t, ypserv_tmp_t, ypserv_var_run_t, ypxfr_var_run_t, zabbix_tmp_t, zabbix_var_run_t, zarafa_deliver_tmp_t, zarafa_deliver_var_run_t, zarafa_gateway_var_run_t, zarafa_ical_var_run_t, zarafa_indexer_tmp_t, zarafa_indexer_var_run_t, zarafa_monitor_var_run_t, zarafa_server_tmp_t, zarafa_server_var_run_t, zarafa_spooler_var_run_t, zarafa_var_lib_t, zebra_tmp_t, zebra_var_run_t, zoneminder_var_run_t. 
Then execute: 
restorecon -v 'module'


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

If you believe that rm should be allowed rmdir access on the module 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 rm /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                unconfined_u:system_r:initrc_t:s0
Target Context                unconfined_u:object_r:var_lib_t:s0
Target Objects                module [ dir ]
Source                        rm
Source Path                   /usr/bin/rm
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           coreutils-8.21-11.fc19.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-47.fc19.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.9.4-300.fc19.x86_64 #1 SMP Fri
                              May 24 22:17:06 UTC 2013 x86_64 x86_64
Alert Count                   2
First Seen                    2013-06-01 21:21:48 EDT
Last Seen                     2013-06-01 21:21:48 EDT
Local ID                      56756496-0827-469e-8228-b8f6bae15c85

Raw Audit Messages
type=AVC msg=audit(1370136108.107:513): avc:  denied  { rmdir } for  pid=3645 comm="rm" name="module" dev="sda2" ino=1839332 scontext=unconfined_u:system_r:initrc_t:s0 tcontext=unconfined_u:object_r:var_lib_t:s0 tclass=dir


type=SYSCALL msg=audit(1370136108.107:513): arch=x86_64 syscall=unlinkat success=no exit=EACCES a0=4 a1=1b2d6d8 a2=200 a3=0 items=0 ppid=3270 pid=3645 auid=1000 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 ses=1 tty=pts0 comm=rm exe=/usr/bin/rm subj=unconfined_u:system_r:initrc_t:s0 key=(null)

Hash: rm,initrc_t,var_lib_t,dir,rmdir

Additional info:
reporter:       libreport-2.1.4
hashmarkername: setroubleshoot
kernel:         3.9.4-300.fc19.x86_64
type:           libreport
Comment 1 Miroslav Grepl 2013-06-03 01:57:36 EDT

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

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