Chris PeBenito 29af4c
policy_module(networkmanager, 1.14.0)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
# Declarations
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type NetworkManager_t;
Chris PeBenito 17de1b
type NetworkManager_exec_t;
Chris PeBenito 0bfccd
init_daemon_domain(NetworkManager_t, NetworkManager_exec_t)
Chris PeBenito 17de1b
Chris PeBenito 48f645
type NetworkManager_initrc_exec_t;
Chris PeBenito 48f645
init_script_file(NetworkManager_initrc_exec_t)
Chris PeBenito 48f645
Chris PeBenito ae3386
type NetworkManager_log_t;
Chris PeBenito ae3386
logging_log_file(NetworkManager_log_t)
Chris PeBenito ae3386
Chris PeBenito 52ceaa
type NetworkManager_tmp_t;
Chris PeBenito 52ceaa
files_tmp_file(NetworkManager_tmp_t)
Chris PeBenito 52ceaa
Chris PeBenito baea7b
type NetworkManager_var_lib_t;
Chris PeBenito baea7b
files_type(NetworkManager_var_lib_t)
Chris PeBenito baea7b
Chris PeBenito 17de1b
type NetworkManager_var_run_t;
Chris PeBenito 17de1b
files_pid_file(NetworkManager_var_run_t)
Chris PeBenito 17de1b
Chris PeBenito fd49fe
type wpa_cli_t;
Chris PeBenito fd49fe
type wpa_cli_exec_t;
Chris PeBenito fd49fe
init_system_domain(wpa_cli_t, wpa_cli_exec_t)
Chris PeBenito fd49fe
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
# Local policy
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
Chris PeBenito 5dbda5
# networkmanager will ptrace itself if gdb is installed
Chris PeBenito baea7b
# and it receives a unexpected signal (rh bug #204161)
Dan Walsh 3eaa99
allow NetworkManager_t self:capability { chown fsetid kill setgid setuid sys_admin sys_nice sys_ptrace dac_override net_admin net_raw net_bind_service ipc_lock };
Chris PeBenito 8708d9
dontaudit NetworkManager_t self:capability { sys_tty_config sys_ptrace };
Chris PeBenito baea7b
allow NetworkManager_t self:process { ptrace getcap setcap setpgid getsched setsched signal_perms };
Chris PeBenito c0868a
allow NetworkManager_t self:fifo_file rw_fifo_file_perms;
Chris PeBenito 17de1b
allow NetworkManager_t self:unix_dgram_socket { sendto create_socket_perms };
Chris PeBenito 17de1b
allow NetworkManager_t self:unix_stream_socket create_stream_socket_perms;
Chris PeBenito 17de1b
allow NetworkManager_t self:netlink_route_socket create_netlink_socket_perms;
Chris PeBenito baea7b
allow NetworkManager_t self:netlink_kobject_uevent_socket create_socket_perms;
Chris PeBenito 17de1b
allow NetworkManager_t self:tcp_socket create_stream_socket_perms;
Dan Walsh 3eaa99
allow NetworkManager_t self:tun_socket { create_socket_perms relabelfrom relabelto };
Chris PeBenito 17de1b
allow NetworkManager_t self:udp_socket create_socket_perms;
Chris PeBenito 17de1b
allow NetworkManager_t self:packet_socket create_socket_perms;
Chris PeBenito 17de1b
Chris PeBenito fd49fe
allow NetworkManager_t wpa_cli_t:unix_dgram_socket sendto;
Chris PeBenito fd49fe
Chris PeBenito 72f82c
can_exec(NetworkManager_t, NetworkManager_exec_t)
Chris PeBenito 72f82c
Chris PeBenito 52ceaa
manage_files_pattern(NetworkManager_t, NetworkManager_log_t, NetworkManager_log_t)
Chris PeBenito 52ceaa
logging_log_filetrans(NetworkManager_t, NetworkManager_log_t, file)
Chris PeBenito 52ceaa
Dan Walsh 3eaa99
can_exec(NetworkManager_t, NetworkManager_tmp_t)
Chris PeBenito baea7b
manage_files_pattern(NetworkManager_t, NetworkManager_tmp_t, NetworkManager_tmp_t)
Chris PeBenito baea7b
manage_sock_files_pattern(NetworkManager_t, NetworkManager_tmp_t, NetworkManager_tmp_t)
Chris PeBenito baea7b
files_tmp_filetrans(NetworkManager_t, NetworkManager_tmp_t, { sock_file file })
Chris PeBenito baea7b
Chris PeBenito baea7b
manage_dirs_pattern(NetworkManager_t, NetworkManager_var_lib_t, NetworkManager_var_lib_t)
Chris PeBenito baea7b
manage_files_pattern(NetworkManager_t, NetworkManager_var_lib_t, NetworkManager_var_lib_t)
Chris PeBenito baea7b
files_var_lib_filetrans(NetworkManager_t, NetworkManager_var_lib_t, dir)
Chris PeBenito 52ceaa
Chris PeBenito 0bfccd
manage_dirs_pattern(NetworkManager_t, NetworkManager_var_run_t, NetworkManager_var_run_t)
Chris PeBenito 0bfccd
manage_files_pattern(NetworkManager_t, NetworkManager_var_run_t, NetworkManager_var_run_t)
Chris PeBenito 0bfccd
manage_sock_files_pattern(NetworkManager_t, NetworkManager_var_run_t, NetworkManager_var_run_t)
Chris PeBenito 3f67f7
files_pid_filetrans(NetworkManager_t, NetworkManager_var_run_t, { dir file sock_file })
Chris PeBenito 17de1b
Chris PeBenito 17de1b
kernel_read_system_state(NetworkManager_t)
Chris PeBenito 17de1b
kernel_read_network_state(NetworkManager_t)
Chris PeBenito 17de1b
kernel_read_kernel_sysctls(NetworkManager_t)
Chris PeBenito baea7b
kernel_request_load_module(NetworkManager_t)
Chris PeBenito baea7b
kernel_read_debugfs(NetworkManager_t)
Chris PeBenito baea7b
kernel_rw_net_sysctls(NetworkManager_t)
Chris PeBenito 17de1b
Chris PeBenito 190066
corenet_all_recvfrom_unlabeled(NetworkManager_t)
Chris PeBenito 190066
corenet_all_recvfrom_netlabel(NetworkManager_t)
Chris PeBenito 668b30
corenet_tcp_sendrecv_generic_if(NetworkManager_t)
Chris PeBenito 668b30
corenet_udp_sendrecv_generic_if(NetworkManager_t)
Chris PeBenito 668b30
corenet_raw_sendrecv_generic_if(NetworkManager_t)
Chris PeBenito c12621
corenet_tcp_sendrecv_generic_node(NetworkManager_t)
Chris PeBenito c12621
corenet_udp_sendrecv_generic_node(NetworkManager_t)
Chris PeBenito c12621
corenet_raw_sendrecv_generic_node(NetworkManager_t)
Chris PeBenito 17de1b
corenet_tcp_sendrecv_all_ports(NetworkManager_t)
Chris PeBenito 17de1b
corenet_udp_sendrecv_all_ports(NetworkManager_t)
Chris PeBenito c12621
corenet_udp_bind_generic_node(NetworkManager_t)
Chris PeBenito 17de1b
corenet_udp_bind_isakmp_port(NetworkManager_t)
Chris PeBenito 17de1b
corenet_udp_bind_dhcpc_port(NetworkManager_t)
Chris PeBenito 17de1b
corenet_tcp_connect_all_ports(NetworkManager_t)
Chris PeBenito 17de1b
corenet_sendrecv_isakmp_server_packets(NetworkManager_t)
Chris PeBenito 17de1b
corenet_sendrecv_dhcpc_server_packets(NetworkManager_t)
Chris PeBenito 17de1b
corenet_sendrecv_all_client_packets(NetworkManager_t)
Chris PeBenito baea7b
corenet_rw_tun_tap_dev(NetworkManager_t)
Chris PeBenito baea7b
corenet_getattr_ppp_dev(NetworkManager_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
dev_read_sysfs(NetworkManager_t)
Chris PeBenito 17de1b
dev_read_rand(NetworkManager_t)
Chris PeBenito 17de1b
dev_read_urand(NetworkManager_t)
Chris PeBenito baea7b
dev_dontaudit_getattr_generic_blk_files(NetworkManager_t)
Chris PeBenito baea7b
dev_getattr_all_chr_files(NetworkManager_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
fs_getattr_all_fs(NetworkManager_t)
Chris PeBenito 17de1b
fs_search_auto_mountpoints(NetworkManager_t)
Chris PeBenito baea7b
fs_list_inotifyfs(NetworkManager_t)
Chris PeBenito 17de1b
Chris PeBenito f8233a
mls_file_read_all_levels(NetworkManager_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
selinux_dontaudit_search_fs(NetworkManager_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
corecmd_exec_shell(NetworkManager_t)
Chris PeBenito 17de1b
corecmd_exec_bin(NetworkManager_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
domain_use_interactive_fds(NetworkManager_t)
Chris PeBenito 17de1b
domain_read_confined_domains_state(NetworkManager_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
files_read_etc_files(NetworkManager_t)
Chris PeBenito 17de1b
files_read_etc_runtime_files(NetworkManager_t)
Chris PeBenito 17de1b
files_read_usr_files(NetworkManager_t)
Chris PeBenito baea7b
files_read_usr_src_files(NetworkManager_t)
Chris PeBenito baea7b
Chris PeBenito baea7b
storage_getattr_fixed_disk_dev(NetworkManager_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
init_read_utmp(NetworkManager_t)
Chris PeBenito baea7b
init_dontaudit_write_utmp(NetworkManager_t)
Chris PeBenito 17de1b
init_domtrans_script(NetworkManager_t)
Chris PeBenito 17de1b
Chris PeBenito baea7b
auth_use_nsswitch(NetworkManager_t)
Chris PeBenito baea7b
Chris PeBenito 17de1b
logging_send_syslog_msg(NetworkManager_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
miscfiles_read_localization(NetworkManager_t)
Chris PeBenito 17de1b
miscfiles_read_certs(NetworkManager_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
modutils_domtrans_insmod(NetworkManager_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
seutil_read_config(NetworkManager_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
sysnet_domtrans_ifconfig(NetworkManager_t)
Chris PeBenito 17de1b
sysnet_domtrans_dhcpc(NetworkManager_t)
Chris PeBenito 17de1b
sysnet_signal_dhcpc(NetworkManager_t)
Chris PeBenito 17de1b
sysnet_read_dhcpc_pid(NetworkManager_t)
Dan Walsh 3eaa99
sysnet_read_dhcp_config(NetworkManager_t)
Chris PeBenito 17de1b
sysnet_delete_dhcpc_pid(NetworkManager_t)
Dan Walsh 3eaa99
sysnet_kill_dhcpc(NetworkManager_t)
Dan Walsh 3eaa99
sysnet_read_dhcpc_state(NetworkManager_t)
Dan Walsh 3eaa99
sysnet_delete_dhcpc_state(NetworkManager_t)
Chris PeBenito 17de1b
sysnet_search_dhcp_state(NetworkManager_t)
Chris PeBenito 17de1b
# in /etc created by NetworkManager will be labelled net_conf_t.
Chris PeBenito 17de1b
sysnet_manage_config(NetworkManager_t)
Chris PeBenito 17de1b
sysnet_etc_filetrans_config(NetworkManager_t)
Chris PeBenito 17de1b
Dan Walsh 3eaa99
userdom_stream_connect(NetworkManager_t)
Chris PeBenito 17de1b
userdom_dontaudit_use_unpriv_user_fds(NetworkManager_t)
Chris PeBenito 296273
userdom_dontaudit_use_user_ttys(NetworkManager_t)
Chris PeBenito 350b6a
# Read gnome-keyring
Dan Walsh 3eaa99
userdom_read_home_certs(NetworkManager_t)
Chris PeBenito 296273
userdom_read_user_home_content_files(NetworkManager_t)
Dan Walsh 3eaa99
userdom_dgram_send(NetworkManager_t)
Dan Walsh 3eaa99
Dan Walsh 3eaa99
cron_read_system_job_lib_files(NetworkManager_t)
Chris PeBenito e9c6cd
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito baea7b
	avahi_domtrans(NetworkManager_t)
Chris PeBenito baea7b
	avahi_kill(NetworkManager_t)
Chris PeBenito baea7b
	avahi_signal(NetworkManager_t)
Chris PeBenito baea7b
	avahi_signull(NetworkManager_t)
Dan Walsh 3eaa99
	avahi_dbus_chat(NetworkManager_t)
Chris PeBenito baea7b
')
Chris PeBenito baea7b
Chris PeBenito baea7b
optional_policy(`
Chris PeBenito 17de1b
	bind_domtrans(NetworkManager_t)
Chris PeBenito 17de1b
	bind_manage_cache(NetworkManager_t)
Chris PeBenito baea7b
	bind_kill(NetworkManager_t)
Chris PeBenito 17de1b
	bind_signal(NetworkManager_t)
Chris PeBenito baea7b
	bind_signull(NetworkManager_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito 296273
	bluetooth_dontaudit_read_helper_state(NetworkManager_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
optional_policy(`
Dan Walsh 3eaa99
	consoletype_domtrans(NetworkManager_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito baea7b
	dbus_system_domain(NetworkManager_t, NetworkManager_exec_t)
Chris PeBenito baea7b
Chris PeBenito baea7b
	optional_policy(`
Chris PeBenito baea7b
		consolekit_dbus_chat(NetworkManager_t)
Chris PeBenito baea7b
	')
Chris PeBenito baea7b
')
Chris PeBenito baea7b
Chris PeBenito baea7b
optional_policy(`
Chris PeBenito baea7b
	dnsmasq_read_pid_files(NetworkManager_t)
Chris PeBenito baea7b
	dnsmasq_delete_pid_files(NetworkManager_t)
Chris PeBenito baea7b
	dnsmasq_domtrans(NetworkManager_t)
Chris PeBenito baea7b
	dnsmasq_initrc_domtrans(NetworkManager_t)
Chris PeBenito baea7b
	dnsmasq_kill(NetworkManager_t)
Chris PeBenito baea7b
	dnsmasq_signal(NetworkManager_t)
Chris PeBenito baea7b
	dnsmasq_signull(NetworkManager_t)
Chris PeBenito baea7b
')
Chris PeBenito baea7b
Chris PeBenito baea7b
optional_policy(`
Chris PeBenito baea7b
	hal_write_log(NetworkManager_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito 17de1b
	howl_signal(NetworkManager_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
optional_policy(`
Dan Walsh 3eaa99
	ipsec_domtrans_mgmt(NetworkManager_t)
Dan Walsh 3eaa99
	ipsec_kill_mgmt(NetworkManager_t)
Dan Walsh 3eaa99
	ipsec_signal_mgmt(NetworkManager_t)
Dan Walsh 3eaa99
	ipsec_signull_mgmt(NetworkManager_t)
Dan Walsh 3eaa99
')
Dan Walsh 3eaa99
Dan Walsh 3eaa99
optional_policy(`
Chris PeBenito baea7b
	iptables_domtrans(NetworkManager_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito baea7b
	nscd_domtrans(NetworkManager_t)
Chris PeBenito 17de1b
	nscd_signal(NetworkManager_t)
Chris PeBenito baea7b
	nscd_signull(NetworkManager_t)
Chris PeBenito baea7b
	nscd_kill(NetworkManager_t)
Chris PeBenito baea7b
	nscd_initrc_domtrans(NetworkManager_t)
Chris PeBenito baea7b
')
Chris PeBenito baea7b
Chris PeBenito baea7b
optional_policy(`
Chris PeBenito baea7b
	# Dispatcher starting and stoping ntp
Chris PeBenito baea7b
	ntp_initrc_domtrans(NetworkManager_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito 72f82c
	openvpn_domtrans(NetworkManager_t)
Chris PeBenito baea7b
	openvpn_kill(NetworkManager_t)
Chris PeBenito 72f82c
	openvpn_signal(NetworkManager_t)
Chris PeBenito baea7b
	openvpn_signull(NetworkManager_t)
Chris PeBenito 72f82c
')
Chris PeBenito 72f82c
Chris PeBenito 72f82c
optional_policy(`
Chris PeBenito baea7b
	policykit_dbus_chat(NetworkManager_t)
Chris PeBenito baea7b
	policykit_domtrans_auth(NetworkManager_t)
Chris PeBenito baea7b
	policykit_read_lib(NetworkManager_t)
Chris PeBenito baea7b
	policykit_read_reload(NetworkManager_t)
Chris PeBenito baea7b
	userdom_read_all_users_state(NetworkManager_t)
Chris PeBenito baea7b
')
Chris PeBenito baea7b
Chris PeBenito baea7b
optional_policy(`
Chris PeBenito baea7b
	ppp_initrc_domtrans(NetworkManager_t)
Chris PeBenito 17de1b
	ppp_domtrans(NetworkManager_t)
Chris PeBenito baea7b
	ppp_manage_pid_files(NetworkManager_t)
Chris PeBenito baea7b
	ppp_kill(NetworkManager_t)
Chris PeBenito 693d4a
	ppp_signal(NetworkManager_t)
Chris PeBenito baea7b
	ppp_signull(NetworkManager_t)
Chris PeBenito baea7b
	ppp_read_config(NetworkManager_t)
Chris PeBenito baea7b
')
Chris PeBenito baea7b
Chris PeBenito baea7b
optional_policy(`
Chris PeBenito baea7b
	rpm_exec(NetworkManager_t)
Chris PeBenito baea7b
	rpm_read_db(NetworkManager_t)
Chris PeBenito baea7b
	rpm_dontaudit_manage_db(NetworkManager_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito 17de1b
	seutil_sigchld_newrole(NetworkManager_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito baea7b
	udev_exec(NetworkManager_t)
Chris PeBenito 17de1b
	udev_read_db(NetworkManager_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito 17de1b
	vpn_domtrans(NetworkManager_t)
Chris PeBenito baea7b
	vpn_kill(NetworkManager_t)
Chris PeBenito 17de1b
	vpn_signal(NetworkManager_t)
Chris PeBenito baea7b
	vpn_signull(NetworkManager_t)
Dan Walsh 3eaa99
	vpn_relabelfrom_tun_socket(NetworkManager_t)
Chris PeBenito 17de1b
')
Chris PeBenito fd49fe
Chris PeBenito fd49fe
########################################
Chris PeBenito fd49fe
#
Chris PeBenito fd49fe
# wpa_cli local policy
Chris PeBenito fd49fe
#
Chris PeBenito 296273
Chris PeBenito fd49fe
allow wpa_cli_t self:capability dac_override;
Chris PeBenito fd49fe
allow wpa_cli_t self:unix_dgram_socket create_socket_perms;
Chris PeBenito fd49fe
Chris PeBenito fd49fe
allow wpa_cli_t NetworkManager_t:unix_dgram_socket sendto;
Chris PeBenito fd49fe
Chris PeBenito fd49fe
manage_sock_files_pattern(wpa_cli_t, NetworkManager_tmp_t, NetworkManager_tmp_t)
Chris PeBenito fd49fe
files_tmp_filetrans(wpa_cli_t, NetworkManager_tmp_t, sock_file)
Chris PeBenito fd49fe
Chris PeBenito fd49fe
list_dirs_pattern(wpa_cli_t, NetworkManager_var_run_t, NetworkManager_var_run_t)
Chris PeBenito fd49fe
rw_sock_files_pattern(wpa_cli_t, NetworkManager_var_run_t, NetworkManager_var_run_t)
Chris PeBenito fd49fe
Chris PeBenito fd49fe
init_dontaudit_use_fds(wpa_cli_t)
Chris PeBenito fd49fe
init_use_script_ptys(wpa_cli_t)
Chris PeBenito fd49fe
Chris PeBenito fd49fe
miscfiles_read_localization(wpa_cli_t)
Chris PeBenito fd49fe
Chris PeBenito fd49fe
term_dontaudit_use_console(wpa_cli_t)