2010-05-24 19:32:01 +00:00
|
|
|
policy_module(networkmanager, 1.14.0)
|
2005-10-22 17:44:04 +00:00
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Declarations
|
|
|
|
#
|
|
|
|
|
|
|
|
type NetworkManager_t;
|
|
|
|
type NetworkManager_exec_t;
|
2008-07-23 21:38:39 +00:00
|
|
|
init_daemon_domain(NetworkManager_t, NetworkManager_exec_t)
|
2005-10-22 17:44:04 +00:00
|
|
|
|
2008-09-15 14:20:20 +00:00
|
|
|
type NetworkManager_initrc_exec_t;
|
|
|
|
init_script_file(NetworkManager_initrc_exec_t)
|
|
|
|
|
2008-09-11 13:35:06 +00:00
|
|
|
type NetworkManager_log_t;
|
|
|
|
logging_log_file(NetworkManager_log_t)
|
|
|
|
|
2008-09-11 14:02:53 +00:00
|
|
|
type NetworkManager_tmp_t;
|
|
|
|
files_tmp_file(NetworkManager_tmp_t)
|
|
|
|
|
2010-05-03 18:01:26 +00:00
|
|
|
type NetworkManager_var_lib_t;
|
|
|
|
files_type(NetworkManager_var_lib_t)
|
|
|
|
|
2005-10-22 17:44:04 +00:00
|
|
|
type NetworkManager_var_run_t;
|
|
|
|
files_pid_file(NetworkManager_var_run_t)
|
|
|
|
|
2008-09-18 15:06:29 +00:00
|
|
|
type wpa_cli_t;
|
|
|
|
type wpa_cli_exec_t;
|
|
|
|
init_system_domain(wpa_cli_t, wpa_cli_exec_t)
|
|
|
|
|
2005-10-22 17:44:04 +00:00
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Local policy
|
|
|
|
#
|
|
|
|
|
2006-09-04 15:15:35 +00:00
|
|
|
# networkmanager will ptrace itself if gdb is installed
|
2010-05-03 18:01:26 +00:00
|
|
|
# and it receives a unexpected signal (rh bug #204161)
|
2010-08-26 13:41:21 +00:00
|
|
|
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 };
|
2006-09-22 17:14:35 +00:00
|
|
|
dontaudit NetworkManager_t self:capability { sys_tty_config sys_ptrace };
|
2010-05-03 18:01:26 +00:00
|
|
|
allow NetworkManager_t self:process { ptrace getcap setcap setpgid getsched setsched signal_perms };
|
2006-12-12 20:08:08 +00:00
|
|
|
allow NetworkManager_t self:fifo_file rw_fifo_file_perms;
|
2006-02-16 19:32:13 +00:00
|
|
|
allow NetworkManager_t self:unix_dgram_socket { sendto create_socket_perms };
|
2005-10-22 17:44:04 +00:00
|
|
|
allow NetworkManager_t self:unix_stream_socket create_stream_socket_perms;
|
2006-02-06 22:47:46 +00:00
|
|
|
allow NetworkManager_t self:netlink_route_socket create_netlink_socket_perms;
|
2010-05-03 18:01:26 +00:00
|
|
|
allow NetworkManager_t self:netlink_kobject_uevent_socket create_socket_perms;
|
2005-10-22 17:44:04 +00:00
|
|
|
allow NetworkManager_t self:tcp_socket create_stream_socket_perms;
|
2010-08-26 13:41:21 +00:00
|
|
|
allow NetworkManager_t self:tun_socket { create_socket_perms relabelfrom relabelto };
|
2005-10-22 17:44:04 +00:00
|
|
|
allow NetworkManager_t self:udp_socket create_socket_perms;
|
|
|
|
allow NetworkManager_t self:packet_socket create_socket_perms;
|
|
|
|
|
2008-09-18 15:06:29 +00:00
|
|
|
allow NetworkManager_t wpa_cli_t:unix_dgram_socket sendto;
|
|
|
|
|
2007-09-06 18:34:40 +00:00
|
|
|
can_exec(NetworkManager_t, NetworkManager_exec_t)
|
|
|
|
|
2008-09-11 14:02:53 +00:00
|
|
|
manage_files_pattern(NetworkManager_t, NetworkManager_log_t, NetworkManager_log_t)
|
|
|
|
logging_log_filetrans(NetworkManager_t, NetworkManager_log_t, file)
|
|
|
|
|
2010-08-26 13:41:21 +00:00
|
|
|
can_exec(NetworkManager_t, NetworkManager_tmp_t)
|
2010-05-03 18:01:26 +00:00
|
|
|
manage_files_pattern(NetworkManager_t, NetworkManager_tmp_t, NetworkManager_tmp_t)
|
|
|
|
manage_sock_files_pattern(NetworkManager_t, NetworkManager_tmp_t, NetworkManager_tmp_t)
|
|
|
|
files_tmp_filetrans(NetworkManager_t, NetworkManager_tmp_t, { sock_file file })
|
|
|
|
|
|
|
|
manage_dirs_pattern(NetworkManager_t, NetworkManager_var_lib_t, NetworkManager_var_lib_t)
|
|
|
|
manage_files_pattern(NetworkManager_t, NetworkManager_var_lib_t, NetworkManager_var_lib_t)
|
|
|
|
files_var_lib_filetrans(NetworkManager_t, NetworkManager_var_lib_t, dir)
|
2008-09-11 14:02:53 +00:00
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
manage_dirs_pattern(NetworkManager_t, NetworkManager_var_run_t, NetworkManager_var_run_t)
|
|
|
|
manage_files_pattern(NetworkManager_t, NetworkManager_var_run_t, NetworkManager_var_run_t)
|
|
|
|
manage_sock_files_pattern(NetworkManager_t, NetworkManager_var_run_t, NetworkManager_var_run_t)
|
2009-06-26 14:40:13 +00:00
|
|
|
files_pid_filetrans(NetworkManager_t, NetworkManager_var_run_t, { dir file sock_file })
|
2005-10-22 17:44:04 +00:00
|
|
|
|
|
|
|
kernel_read_system_state(NetworkManager_t)
|
|
|
|
kernel_read_network_state(NetworkManager_t)
|
2006-01-31 16:49:43 +00:00
|
|
|
kernel_read_kernel_sysctls(NetworkManager_t)
|
2010-05-03 18:01:26 +00:00
|
|
|
kernel_request_load_module(NetworkManager_t)
|
|
|
|
kernel_read_debugfs(NetworkManager_t)
|
|
|
|
kernel_rw_net_sysctls(NetworkManager_t)
|
2005-10-22 17:44:04 +00:00
|
|
|
|
2007-06-27 15:23:21 +00:00
|
|
|
corenet_all_recvfrom_unlabeled(NetworkManager_t)
|
|
|
|
corenet_all_recvfrom_netlabel(NetworkManager_t)
|
2009-01-06 20:24:10 +00:00
|
|
|
corenet_tcp_sendrecv_generic_if(NetworkManager_t)
|
|
|
|
corenet_udp_sendrecv_generic_if(NetworkManager_t)
|
|
|
|
corenet_raw_sendrecv_generic_if(NetworkManager_t)
|
2009-01-09 19:48:02 +00:00
|
|
|
corenet_tcp_sendrecv_generic_node(NetworkManager_t)
|
|
|
|
corenet_udp_sendrecv_generic_node(NetworkManager_t)
|
|
|
|
corenet_raw_sendrecv_generic_node(NetworkManager_t)
|
2005-10-22 17:44:04 +00:00
|
|
|
corenet_tcp_sendrecv_all_ports(NetworkManager_t)
|
|
|
|
corenet_udp_sendrecv_all_ports(NetworkManager_t)
|
2009-01-09 19:48:02 +00:00
|
|
|
corenet_udp_bind_generic_node(NetworkManager_t)
|
2005-10-22 17:44:04 +00:00
|
|
|
corenet_udp_bind_isakmp_port(NetworkManager_t)
|
|
|
|
corenet_udp_bind_dhcpc_port(NetworkManager_t)
|
2006-05-30 19:46:34 +00:00
|
|
|
corenet_tcp_connect_all_ports(NetworkManager_t)
|
|
|
|
corenet_sendrecv_isakmp_server_packets(NetworkManager_t)
|
|
|
|
corenet_sendrecv_dhcpc_server_packets(NetworkManager_t)
|
|
|
|
corenet_sendrecv_all_client_packets(NetworkManager_t)
|
2010-05-03 18:01:26 +00:00
|
|
|
corenet_rw_tun_tap_dev(NetworkManager_t)
|
|
|
|
corenet_getattr_ppp_dev(NetworkManager_t)
|
2005-10-22 17:44:04 +00:00
|
|
|
|
|
|
|
dev_read_sysfs(NetworkManager_t)
|
|
|
|
dev_read_rand(NetworkManager_t)
|
|
|
|
dev_read_urand(NetworkManager_t)
|
2010-05-03 18:01:26 +00:00
|
|
|
dev_dontaudit_getattr_generic_blk_files(NetworkManager_t)
|
|
|
|
dev_getattr_all_chr_files(NetworkManager_t)
|
2005-10-22 17:44:04 +00:00
|
|
|
|
|
|
|
fs_getattr_all_fs(NetworkManager_t)
|
|
|
|
fs_search_auto_mountpoints(NetworkManager_t)
|
2010-05-03 18:01:26 +00:00
|
|
|
fs_list_inotifyfs(NetworkManager_t)
|
2005-10-22 17:44:04 +00:00
|
|
|
|
2007-08-20 18:26:08 +00:00
|
|
|
mls_file_read_all_levels(NetworkManager_t)
|
2005-10-22 17:44:04 +00:00
|
|
|
|
2005-11-25 16:43:03 +00:00
|
|
|
selinux_dontaudit_search_fs(NetworkManager_t)
|
|
|
|
|
2005-10-22 17:44:04 +00:00
|
|
|
corecmd_exec_shell(NetworkManager_t)
|
|
|
|
corecmd_exec_bin(NetworkManager_t)
|
|
|
|
|
2006-02-20 21:33:25 +00:00
|
|
|
domain_use_interactive_fds(NetworkManager_t)
|
2005-10-22 17:44:04 +00:00
|
|
|
domain_read_confined_domains_state(NetworkManager_t)
|
|
|
|
|
|
|
|
files_read_etc_files(NetworkManager_t)
|
|
|
|
files_read_etc_runtime_files(NetworkManager_t)
|
|
|
|
files_read_usr_files(NetworkManager_t)
|
2010-05-03 18:01:26 +00:00
|
|
|
files_read_usr_src_files(NetworkManager_t)
|
|
|
|
|
|
|
|
storage_getattr_fixed_disk_dev(NetworkManager_t)
|
2005-10-22 17:44:04 +00:00
|
|
|
|
2006-01-18 18:08:39 +00:00
|
|
|
init_read_utmp(NetworkManager_t)
|
2010-05-03 18:01:26 +00:00
|
|
|
init_dontaudit_write_utmp(NetworkManager_t)
|
2005-10-22 17:44:04 +00:00
|
|
|
init_domtrans_script(NetworkManager_t)
|
|
|
|
|
2010-05-03 18:01:26 +00:00
|
|
|
auth_use_nsswitch(NetworkManager_t)
|
|
|
|
|
2005-10-22 17:44:04 +00:00
|
|
|
logging_send_syslog_msg(NetworkManager_t)
|
|
|
|
|
|
|
|
miscfiles_read_localization(NetworkManager_t)
|
2006-06-21 18:25:06 +00:00
|
|
|
miscfiles_read_certs(NetworkManager_t)
|
2005-10-22 17:44:04 +00:00
|
|
|
|
|
|
|
modutils_domtrans_insmod(NetworkManager_t)
|
|
|
|
|
|
|
|
seutil_read_config(NetworkManager_t)
|
|
|
|
|
|
|
|
sysnet_domtrans_ifconfig(NetworkManager_t)
|
|
|
|
sysnet_domtrans_dhcpc(NetworkManager_t)
|
|
|
|
sysnet_signal_dhcpc(NetworkManager_t)
|
2005-11-25 16:43:03 +00:00
|
|
|
sysnet_read_dhcpc_pid(NetworkManager_t)
|
2010-08-26 13:41:21 +00:00
|
|
|
sysnet_read_dhcp_config(NetworkManager_t)
|
2005-11-25 16:43:03 +00:00
|
|
|
sysnet_delete_dhcpc_pid(NetworkManager_t)
|
2010-08-26 13:41:21 +00:00
|
|
|
sysnet_kill_dhcpc(NetworkManager_t)
|
|
|
|
sysnet_read_dhcpc_state(NetworkManager_t)
|
|
|
|
sysnet_delete_dhcpc_state(NetworkManager_t)
|
2005-11-25 16:43:03 +00:00
|
|
|
sysnet_search_dhcp_state(NetworkManager_t)
|
2005-10-22 17:44:04 +00:00
|
|
|
# in /etc created by NetworkManager will be labelled net_conf_t.
|
|
|
|
sysnet_manage_config(NetworkManager_t)
|
2006-02-21 18:40:44 +00:00
|
|
|
sysnet_etc_filetrans_config(NetworkManager_t)
|
2005-10-22 17:44:04 +00:00
|
|
|
|
2010-08-26 13:41:21 +00:00
|
|
|
userdom_stream_connect(NetworkManager_t)
|
2006-02-20 21:33:25 +00:00
|
|
|
userdom_dontaudit_use_unpriv_user_fds(NetworkManager_t)
|
2008-11-05 16:10:46 +00:00
|
|
|
userdom_dontaudit_use_user_ttys(NetworkManager_t)
|
2007-10-02 16:04:50 +00:00
|
|
|
# Read gnome-keyring
|
2010-08-26 13:41:21 +00:00
|
|
|
userdom_read_home_certs(NetworkManager_t)
|
2008-11-05 16:10:46 +00:00
|
|
|
userdom_read_user_home_content_files(NetworkManager_t)
|
2010-08-26 13:41:21 +00:00
|
|
|
userdom_dgram_send(NetworkManager_t)
|
|
|
|
|
|
|
|
cron_read_system_job_lib_files(NetworkManager_t)
|
2008-04-29 13:58:34 +00:00
|
|
|
|
2010-05-03 18:01:26 +00:00
|
|
|
optional_policy(`
|
|
|
|
avahi_domtrans(NetworkManager_t)
|
|
|
|
avahi_kill(NetworkManager_t)
|
|
|
|
avahi_signal(NetworkManager_t)
|
|
|
|
avahi_signull(NetworkManager_t)
|
2010-08-26 13:41:21 +00:00
|
|
|
avahi_dbus_chat(NetworkManager_t)
|
2010-05-03 18:01:26 +00:00
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-12-02 22:06:05 +00:00
|
|
|
bind_domtrans(NetworkManager_t)
|
|
|
|
bind_manage_cache(NetworkManager_t)
|
2010-05-03 18:01:26 +00:00
|
|
|
bind_kill(NetworkManager_t)
|
2005-12-02 22:06:05 +00:00
|
|
|
bind_signal(NetworkManager_t)
|
2010-05-03 18:01:26 +00:00
|
|
|
bind_signull(NetworkManager_t)
|
2005-12-02 22:06:05 +00:00
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2008-11-05 16:10:46 +00:00
|
|
|
bluetooth_dontaudit_read_helper_state(NetworkManager_t)
|
2005-10-24 21:25:02 +00:00
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2010-08-26 13:41:21 +00:00
|
|
|
consoletype_domtrans(NetworkManager_t)
|
2005-10-22 17:44:04 +00:00
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2010-05-03 18:01:26 +00:00
|
|
|
dbus_system_domain(NetworkManager_t, NetworkManager_exec_t)
|
|
|
|
|
2010-09-08 16:06:20 +00:00
|
|
|
init_dbus_chat(NetworkManager_t)
|
|
|
|
|
2010-05-03 18:01:26 +00:00
|
|
|
optional_policy(`
|
|
|
|
consolekit_dbus_chat(NetworkManager_t)
|
|
|
|
')
|
|
|
|
')
|
|
|
|
|
|
|
|
optional_policy(`
|
|
|
|
dnsmasq_read_pid_files(NetworkManager_t)
|
|
|
|
dnsmasq_delete_pid_files(NetworkManager_t)
|
|
|
|
dnsmasq_domtrans(NetworkManager_t)
|
|
|
|
dnsmasq_initrc_domtrans(NetworkManager_t)
|
|
|
|
dnsmasq_kill(NetworkManager_t)
|
|
|
|
dnsmasq_signal(NetworkManager_t)
|
|
|
|
dnsmasq_signull(NetworkManager_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
optional_policy(`
|
|
|
|
hal_write_log(NetworkManager_t)
|
2005-11-25 16:43:03 +00:00
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-11-25 16:43:03 +00:00
|
|
|
howl_signal(NetworkManager_t)
|
|
|
|
')
|
|
|
|
|
2010-08-26 13:41:21 +00:00
|
|
|
optional_policy(`
|
|
|
|
ipsec_domtrans_mgmt(NetworkManager_t)
|
|
|
|
ipsec_kill_mgmt(NetworkManager_t)
|
|
|
|
ipsec_signal_mgmt(NetworkManager_t)
|
|
|
|
ipsec_signull_mgmt(NetworkManager_t)
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2010-05-03 18:01:26 +00:00
|
|
|
iptables_domtrans(NetworkManager_t)
|
2005-10-22 17:44:04 +00:00
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2010-05-03 18:01:26 +00:00
|
|
|
nscd_domtrans(NetworkManager_t)
|
2006-04-12 15:04:28 +00:00
|
|
|
nscd_signal(NetworkManager_t)
|
2010-05-03 18:01:26 +00:00
|
|
|
nscd_signull(NetworkManager_t)
|
|
|
|
nscd_kill(NetworkManager_t)
|
|
|
|
nscd_initrc_domtrans(NetworkManager_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
optional_policy(`
|
|
|
|
# Dispatcher starting and stoping ntp
|
|
|
|
ntp_initrc_domtrans(NetworkManager_t)
|
2005-10-22 17:44:04 +00:00
|
|
|
')
|
|
|
|
|
2007-09-06 18:34:40 +00:00
|
|
|
optional_policy(`
|
|
|
|
openvpn_domtrans(NetworkManager_t)
|
2010-05-03 18:01:26 +00:00
|
|
|
openvpn_kill(NetworkManager_t)
|
2007-09-06 18:34:40 +00:00
|
|
|
openvpn_signal(NetworkManager_t)
|
2010-05-03 18:01:26 +00:00
|
|
|
openvpn_signull(NetworkManager_t)
|
2007-09-06 18:34:40 +00:00
|
|
|
')
|
|
|
|
|
2006-06-12 21:36:38 +00:00
|
|
|
optional_policy(`
|
2010-05-03 18:01:26 +00:00
|
|
|
policykit_dbus_chat(NetworkManager_t)
|
|
|
|
policykit_domtrans_auth(NetworkManager_t)
|
|
|
|
policykit_read_lib(NetworkManager_t)
|
|
|
|
policykit_read_reload(NetworkManager_t)
|
|
|
|
userdom_read_all_users_state(NetworkManager_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
optional_policy(`
|
|
|
|
ppp_initrc_domtrans(NetworkManager_t)
|
2006-06-12 21:36:38 +00:00
|
|
|
ppp_domtrans(NetworkManager_t)
|
2010-05-03 18:01:26 +00:00
|
|
|
ppp_manage_pid_files(NetworkManager_t)
|
|
|
|
ppp_kill(NetworkManager_t)
|
2006-09-25 18:53:06 +00:00
|
|
|
ppp_signal(NetworkManager_t)
|
2010-05-03 18:01:26 +00:00
|
|
|
ppp_signull(NetworkManager_t)
|
|
|
|
ppp_read_config(NetworkManager_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
optional_policy(`
|
|
|
|
rpm_exec(NetworkManager_t)
|
|
|
|
rpm_read_db(NetworkManager_t)
|
|
|
|
rpm_dontaudit_manage_db(NetworkManager_t)
|
2006-06-12 21:36:38 +00:00
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-10-22 17:44:04 +00:00
|
|
|
seutil_sigchld_newrole(NetworkManager_t)
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2010-05-03 18:01:26 +00:00
|
|
|
udev_exec(NetworkManager_t)
|
2005-10-22 17:44:04 +00:00
|
|
|
udev_read_db(NetworkManager_t)
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-10-22 17:44:04 +00:00
|
|
|
vpn_domtrans(NetworkManager_t)
|
2010-05-03 18:01:26 +00:00
|
|
|
vpn_kill(NetworkManager_t)
|
2006-01-11 15:28:14 +00:00
|
|
|
vpn_signal(NetworkManager_t)
|
2010-05-03 18:01:26 +00:00
|
|
|
vpn_signull(NetworkManager_t)
|
2010-08-26 13:41:21 +00:00
|
|
|
vpn_relabelfrom_tun_socket(NetworkManager_t)
|
2005-10-22 17:44:04 +00:00
|
|
|
')
|
2008-09-18 15:06:29 +00:00
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# wpa_cli local policy
|
|
|
|
#
|
2008-11-05 16:10:46 +00:00
|
|
|
|
2008-09-18 15:06:29 +00:00
|
|
|
allow wpa_cli_t self:capability dac_override;
|
|
|
|
allow wpa_cli_t self:unix_dgram_socket create_socket_perms;
|
|
|
|
|
|
|
|
allow wpa_cli_t NetworkManager_t:unix_dgram_socket sendto;
|
|
|
|
|
|
|
|
manage_sock_files_pattern(wpa_cli_t, NetworkManager_tmp_t, NetworkManager_tmp_t)
|
|
|
|
files_tmp_filetrans(wpa_cli_t, NetworkManager_tmp_t, sock_file)
|
|
|
|
|
|
|
|
list_dirs_pattern(wpa_cli_t, NetworkManager_var_run_t, NetworkManager_var_run_t)
|
|
|
|
rw_sock_files_pattern(wpa_cli_t, NetworkManager_var_run_t, NetworkManager_var_run_t)
|
|
|
|
|
|
|
|
init_dontaudit_use_fds(wpa_cli_t)
|
|
|
|
init_use_script_ptys(wpa_cli_t)
|
|
|
|
|
|
|
|
miscfiles_read_localization(wpa_cli_t)
|
|
|
|
|
|
|
|
term_dontaudit_use_console(wpa_cli_t)
|