Description of problem: Imported a .ovpn openvpn config file using network manager wizard. The files seems not receiving the right file-context by default. SELinux is preventing /usr/libexec/nm-openvpn-service from 'open' accesses on the file /media/realcrypt1/Kunden/Focke/config/capri-ms.178.78/62.225.178.78.user.key. ***** Plugin file (36.8 confidence) suggests ******************************* If sie denken, dies durch ein falsch gekennzeichnetes Gerät verursacht wurde. Then sie müssen erneut eine vollständige Markierung durchführen. Do touch /.autorelabel; reboot ***** Plugin file (36.8 confidence) suggests ******************************* If sie denken, dies durch ein falsch gekennzeichnetes Gerät verursacht wurde. Then sie müssen erneut eine vollständige Markierung durchführen. Do touch /.autorelabel; reboot ***** Plugin catchall_labels (23.2 confidence) suggests ******************** If you want to allow nm-openvpn-service to have open access on the 62.225.178.78.user.key file Then sie müssen das Label auf /media/realcrypt1/Kunden/Focke/config/capri-ms.178.78/62.225.178.78.user.key ändern Do # semanage fcontext -a -t FILE_TYPE '/media/realcrypt1/Kunden/Focke/config/capri-ms.178.78/62.225.178.78.user.key' wobei FILE_TYPE einer der folgenen Werte ist: NetworkManager_etc_rw_t, NetworkManager_etc_t, NetworkManager_exec_t, NetworkManager_initrc_exec_t, NetworkManager_log_t, NetworkManager_tmp_t, NetworkManager_var_lib_t, NetworkManager_var_run_t, abrt_helper_exec_t, abrt_initrc_exec_t, abrt_var_run_t, afs_initrc_exec_t, aiccu_initrc_exec_t, aisexec_initrc_exec_t, ajaxterm_initrc_exec_t, alsa_home_t, amavis_initrc_exec_t, anon_inodefs_t, apcupsd_initrc_exec_t, arpwatch_initrc_exec_t, asterisk_initrc_exec_t, audio_home_t, auditd_initrc_exec_t, auth_home_t, automount_initrc_exec_t, avahi_exec_t, avahi_initrc_exec_t, bcfg2_initrc_exec_t, bin_t, bitlbee_initrc_exec_t, bluetooth_initrc_exec_t, boinc_initrc_exec_t, boot_t, cache_home_t, callweaver_initrc_exec_t, canna_initrc_exec_t, cert_t, certmaster_initrc_exec_t, certmonger_initrc_exec_t, cfengine_initrc_exec_t, cgconfig_initrc_exec_t, cgred_initrc_exec_t, cgroup_t, chronyd_initrc_exec_t, clamd_initrc_exec_t, clvmd_initrc_exec_t, cmirrord_initrc_exec_t, cobblerd_initrc_exec_t, collectd_initrc_exec_t, config_home_t, consolekit_var_run_t, corosync_initrc_exec_t, cpu_online_t, crond_initrc_exec_t, ctdbd_initrc_exec_t, cupsd_initrc_exec_t, cvs_initrc_exec_t, cyrus_initrc_exec_t, data_home_t, dbus_home_t, dbusd_etc_t, ddclient_initrc_exec_t, debugfs_t, denyhosts_initrc_exec_t, dhcp_etc_t, dhcpc_exec_t, dhcpc_helper_exec_t, dhcpc_state_t, dhcpc_var_run_t, dhcpd_initrc_exec_t, dictd_initrc_exec_t, dnsmasq_exec_t, dnsmasq_initrc_exec_t, dnsmasq_unit_file_t, dnsmasq_var_run_t, dovecot_initrc_exec_t, dspam_initrc_exec_t, etc_runtime_t, etc_t, exim_initrc_exec_t, fail2ban_initrc_exec_t, fail2ban_var_lib_t, fetchmail_home_t, file_context_t, firewalld_initrc_exec_t, fsdaemon_initrc_exec_t, ftpd_initrc_exec_t, gconf_home_t, git_user_content_t, gkeyringd_gnome_home_t, glance_api_initrc_exec_t, glance_registry_initrc_exec_t, glusterd_initrc_exec_t, gnome_home_t, gpg_secret_t, gpsd_initrc_exec_t, gstreamer_home_t, hddtemp_initrc_exec_t, home_bin_t, home_cert_t, hostname_etc_t, httpd_initrc_exec_t, httpd_user_content_t, httpd_user_htaccess_t, httpd_user_ra_content_t, httpd_user_rw_content_t, httpd_user_script_exec_t, icc_data_home_t, iceauth_home_t, icecast_initrc_exec_t, ifconfig_exec_t, initrc_exec_t, initrc_var_run_t, innd_initrc_exec_t, insmod_exec_t, ipsec_exec_t, ipsec_initrc_exec_t, ipsec_mgmt_exec_t, iptables_exec_t, iptables_initrc_exec_t, irc_home_t, irc_tmp_t, irssi_home_t, isnsd_initrc_exec_t, iwhd_initrc_exec_t, jabberd_initrc_exec_t, kdump_initrc_exec_t, kerberos_initrc_exec_t, kismet_home_t, krb5_conf_t, krb5_home_t, ksmtuned_initrc_exec_t, l2tpd_exec_t, l2tpd_initrc_exec_t, ld_so_cache_t, ld_so_t, ldconfig_exec_t, lib_t, likewise_initrc_exec_t, lircd_initrc_exec_t, lldpad_initrc_exec_t, local_login_home_t, locale_t, machineid_t, mail_home_rw_t, mail_home_t, man_t, mandb_cache_t, memcached_initrc_exec_t, mongod_initrc_exec_t, mozilla_home_t, mpd_initrc_exec_t, mpd_user_data_t, mplayer_home_t, mscan_initrc_exec_t, munin_initrc_exec_t, mysqld_home_t, mysqld_initrc_exec_t, mysqlmanagerd_initrc_exec_t, nagios_initrc_exec_t, named_cache_t, named_exec_t, named_initrc_exec_t, net_conf_t, nfsd_initrc_exec_t, nis_initrc_exec_t, nscd_exec_t, nscd_initrc_exec_t, nscd_unit_file_t, nslcd_initrc_exec_t, ntop_initrc_exec_t, ntpd_initrc_exec_t, ntpd_unit_file_t, openvpn_etc_t, openvpn_exec_t, openvpn_initrc_exec_t, pacemaker_initrc_exec_t, pads_initrc_exec_t, passwd_file_t, ping_exec_t, pingd_initrc_exec_t, piranha_pulse_initrc_exec_t, pki_ra_script_exec_t, pki_tps_script_exec_t, policykit_auth_exec_t, policykit_reload_t, policykit_var_lib_t, polipo_cache_home_t, polipo_config_home_t, polipo_initrc_exec_t, polipo_unit_file_t, portreserve_initrc_exec_t, postfix_initrc_exec_t, postgresql_initrc_exec_t, postgrey_initrc_exec_t, pppd_etc_t, pppd_exec_t, pppd_initrc_exec_t, pppd_unit_file_t, pppd_var_run_t, prelink_exec_t, prelude_initrc_exec_t, privoxy_initrc_exec_t, proc_t, procmail_home_t, psad_initrc_exec_t, pulseaudio_home_t, puppet_initrc_exec_t, puppetmaster_initrc_exec_t, qpidd_initrc_exec_t, radiusd_initrc_exec_t, radvd_initrc_exec_t, rgmanager_initrc_exec_t, rhsmcertd_initrc_exec_t, ricci_initrc_exec_t, rlogind_home_t, rngd_initrc_exec_t, roundup_initrc_exec_t, rpcbind_initrc_exec_t, rpcd_initrc_exec_t, rpm_exec_t, rpm_script_tmp_t, rpm_var_cache_t, rpm_var_lib_t, rssh_ro_t, rssh_rw_t, rwho_initrc_exec_t, samba_etc_t, samba_initrc_exec_t, samba_var_t, sanlock_initrc_exec_t, saslauthd_initrc_exec_t, screen_home_t, selinux_config_t, sendmail_initrc_exec_t, setrans_initrc_exec_t, shell_exec_t, shorewall_initrc_exec_t, slapd_initrc_exec_t, slpd_initrc_exec_t, smokeping_initrc_exec_t, smsd_initrc_exec_t, snmpd_initrc_exec_t, snort_initrc_exec_t, soundd_initrc_exec_t, spamc_home_t, spamd_initrc_exec_t, squid_initrc_exec_t, src_t, ssh_home_t, sshd_initrc_exec_t, sssd_initrc_exec_t, sssd_public_t, sssd_var_lib_t, svirt_home_t, svnserve_initrc_exec_t, sysfs_t, syslogd_initrc_exec_t, system_conf_t, system_cronjob_var_lib_t, system_dbusd_var_lib_t, systemd_logind_sessions_t, systemd_logind_var_run_t, systemd_passwd_agent_exec_t, systemd_passwd_var_run_t, systemd_systemctl_exec_t, tcsd_initrc_exec_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, textrel_shlib_t, tgtd_initrc_exec_t, thumb_home_t, tor_initrc_exec_t, tuned_initrc_exec_t, tvtime_home_t, udev_exec_t, udev_var_run_t, ulogd_initrc_exec_t, uml_ro_t, uml_rw_t, user_fonts_cache_t, user_fonts_config_t, user_fonts_t, user_home_t, user_tmp_t, user_tmpfs_t, usr_t, uuidd_initrc_exec_t, varnishd_initrc_exec_t, varnishlog_initrc_exec_t, vhostmd_initrc_exec_t, virt_content_t, virt_home_t, virtd_initrc_exec_t, vmware_conf_t, vmware_file_t, vpnc_exec_t, wdmd_initrc_exec_t, wine_home_t, wireshark_home_t, wpa_cli_exec_t, xauth_home_t, xdm_home_t, ypbind_initrc_exec_t, zabbix_agent_initrc_exec_t, zabbix_initrc_exec_t, zebra_initrc_exec_t, zoneminder_initrc_exec_t. Führen Sie danach Folgendes aus: restorecon -v '/media/realcrypt1/Kunden/Focke/config/capri-ms.178.78/62.225.178.78.user.key' ***** Plugin catchall (5.04 confidence) suggests *************************** If sie denken, dass es nm-openvpn-service standardmässig erlaubt sein sollte, open Zugriff auf 62.225.178.78.user.key file zu erhalten. Then sie sollten dies als Fehler melden. Um diesen Zugriff zu erlauben, können Sie ein lokales Richtlinien-Modul erstellen. Do zugriff jetzt erlauben, indem Sie die nachfolgenden Befehle ausführen: # grep nm-openvpn-serv /var/log/audit/audit.log | audit2allow -M mypol # semodule -i mypol.pp Additional Information: Source Context system_u:system_r:NetworkManager_t:s0 Target Context unconfined_u:object_r:file_t:s0 Target Objects /media/realcrypt1/Kunden/Focke/config/capri- ms.178.78/62.225.178.78.user.key [ file ] Source nm-openvpn-serv Source Path /usr/libexec/nm-openvpn-service Port <Unknown> Host (removed) Source RPM Packages NetworkManager-openvpn-0.9.3.997-3.fc18.x86_64 Target RPM Packages Policy RPM selinux-policy-3.11.1-97.fc18.noarch Selinux Enabled True Policy Type targeted Enforcing Mode Enforcing Host Name (removed) Platform Linux (removed) 3.9.4-200.fc18.x86_64 #1 SMP Fri May 24 20:10:49 UTC 2013 x86_64 x86_64 Alert Count 3 First Seen 2013-06-11 14:00:29 CEST Last Seen 2013-06-11 14:00:29 CEST Local ID 88d8df66-2e16-449e-b318-8627cd1890fe Raw Audit Messages type=AVC msg=audit(1370952029.471:3269): avc: denied { open } for pid=18084 comm="nm-openvpn-serv" path="/media/realcrypt1/Kunden/Focke/config/capri-ms.178.78/62.225.178.78.user.key" dev="dm-0" ino=389553 scontext=system_u:system_r:NetworkManager_t:s0 tcontext=unconfined_u:object_r:file_t:s0 tclass=file type=SYSCALL msg=audit(1370952029.471:3269): arch=x86_64 syscall=open success=no exit=EACCES a0=1e85a30 a1=0 a2=1b6 a3=0 items=0 ppid=756 pid=18084 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 ses=4294967295 tty=(none) comm=nm-openvpn-serv exe=/usr/libexec/nm-openvpn-service subj=system_u:system_r:NetworkManager_t:s0 key=(null) Hash: nm-openvpn-serv,NetworkManager_t,file_t,file,open audit2allow #============= NetworkManager_t ============== allow NetworkManager_t file_t:file open; audit2allow -R require { type NetworkManager_t; } #============= NetworkManager_t ============== files_read_isid_type_files(NetworkManager_t) Additional info: reporter: libreport-2.1.4 hashmarkername: setroubleshoot kernel: 3.9.4-200.fc18.x86_64 type: libreport
*** Bug 973163 has been marked as a duplicate of this bug. ***
When I get an openvpn config package, containing all required files to establish a vpn to the site where this config comes from, I would expect that all files get the correct permissions when I import them with the NetworkManager vpn config import wizard. Either the wizard should copy the files to the correct location, or set the correct permissions. Should this issue be relayed to the NetworkManager maitainers ?
You will need to fix labeling # chcon -R -t mnt_t /media/realcrypt1 and then you will add additional AVC msgs which you will need to allow to make this working. Basically this is not standard location for keys. And yes, the wizard should tell you what is the proper location.
We probably want to allow NetworkManager to read file_t since this seems like it could be a common occurance. A usb stick with no labels used to transfer keys.
Markus if you run in permissive mode, do you get additional avc messages?
Daniel I did a very short test in permissive mode and got avc messages again. I think they were the same. I hope to have more time to test in the next days. When I correct the lables of the files contained in an openvpn-package to home_cert_t:s0 everything is fine. I could imagine, when a user imports a vpn configuration, it would be strait foreward for him, when the import wizard takes care of either the corret location for the files to put to, and/or sets the proper lables on them. Should a feature request or a bug be opened for the network-manager team ?
Well we now allow this in F19, not sure Miroslav has back ported it to F18 yet. In order for this to work NetworkManager has to be allowed to read content without labels on it.
Yes, has been back ported. commit b19632fb7da9a52aaed5bbfb9907155247f31bee Author: Miroslav Grepl <mgrepl> Date: Mon Jun 24 12:14:53 2013 +0200 Allow NM to read file_t (usb stick with no labels used to transfer keys for example) http://koji.fedoraproject.org/koji/buildinfo?buildID=429804
This message is a reminder that Fedora 18 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 18. 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 WONTFIX if it remains open with a Fedora 'version' of '18'. 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 prior to Fedora 18's end of life. Thank you for reporting this issue and we are sorry that we may not be able to fix it before Fedora 18 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 to Fedora 18's end of life. 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.
Fedora 18 changed to end-of-life (EOL) status on 2014-01-14. Fedora 18 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 bug. Thank you for reporting this bug and we are sorry it could not be fixed.