Chris PeBenito 239db5
Chris PeBenito 10b1f3
policy_module(networkmanager,0.9)
Chris PeBenito 239db5
Chris PeBenito 239db5
########################################
Chris PeBenito 239db5
#
Chris PeBenito 239db5
# Declarations
Chris PeBenito 239db5
#
Chris PeBenito 239db5
Chris PeBenito 239db5
type NetworkManager_t;
Chris PeBenito 239db5
type NetworkManager_exec_t;
Chris PeBenito 239db5
init_daemon_domain(NetworkManager_t,NetworkManager_exec_t)
Chris PeBenito 239db5
Chris PeBenito 239db5
type NetworkManager_var_run_t;
Chris PeBenito 239db5
files_pid_file(NetworkManager_var_run_t)
Chris PeBenito 239db5
Chris PeBenito 239db5
########################################
Chris PeBenito 239db5
#
Chris PeBenito 239db5
# Local policy
Chris PeBenito 239db5
#
Chris PeBenito 239db5
Chris PeBenito 239db5
allow NetworkManager_t self:capability { kill setgid setuid sys_nice dac_override net_admin net_raw net_bind_service ipc_lock};
Chris PeBenito 239db5
dontaudit NetworkManager_t self:capability sys_tty_config;
Chris PeBenito f85544
allow NetworkManager_t self:process { setcap getsched signal_perms };
Chris PeBenito 239db5
allow NetworkManager_t self:fifo_file rw_file_perms;
Chris PeBenito 239db5
allow NetworkManager_t self:unix_dgram_socket create_socket_perms;
Chris PeBenito 239db5
allow NetworkManager_t self:unix_stream_socket create_stream_socket_perms;
Chris PeBenito 239db5
allow NetworkManager_t self:netlink_route_socket r_netlink_socket_perms;
Chris PeBenito 239db5
allow NetworkManager_t self:tcp_socket create_stream_socket_perms;
Chris PeBenito 239db5
allow NetworkManager_t self:udp_socket create_socket_perms;
Chris PeBenito 239db5
allow NetworkManager_t self:packet_socket create_socket_perms;
Chris PeBenito 239db5
# allow vpnc connections
Chris PeBenito 239db5
allow NetworkManager_t self:rawip_socket create_socket_perms;
Chris PeBenito 239db5
Chris PeBenito 239db5
allow NetworkManager_t NetworkManager_var_run_t:file create_file_perms;
Chris PeBenito 239db5
allow NetworkManager_t NetworkManager_var_run_t:dir rw_dir_perms;
Chris PeBenito 239db5
files_create_pid(NetworkManager_t,NetworkManager_var_run_t)
Chris PeBenito 239db5
Chris PeBenito 239db5
kernel_read_system_state(NetworkManager_t)
Chris PeBenito 239db5
kernel_read_network_state(NetworkManager_t)
Chris PeBenito 239db5
kernel_read_kernel_sysctl(NetworkManager_t)
Chris PeBenito 239db5
kernel_load_module(NetworkManager_t)
Chris PeBenito 239db5
Chris PeBenito 239db5
corenet_tcp_sendrecv_all_if(NetworkManager_t)
Chris PeBenito 239db5
corenet_udp_sendrecv_all_if(NetworkManager_t)
Chris PeBenito 239db5
corenet_raw_sendrecv_all_if(NetworkManager_t)
Chris PeBenito 239db5
corenet_tcp_sendrecv_all_nodes(NetworkManager_t)
Chris PeBenito 239db5
corenet_udp_sendrecv_all_nodes(NetworkManager_t)
Chris PeBenito 239db5
corenet_raw_sendrecv_all_nodes(NetworkManager_t)
Chris PeBenito 239db5
corenet_tcp_sendrecv_all_ports(NetworkManager_t)
Chris PeBenito 239db5
corenet_udp_sendrecv_all_ports(NetworkManager_t)
Chris PeBenito 239db5
corenet_tcp_bind_all_nodes(NetworkManager_t)
Chris PeBenito 239db5
corenet_udp_bind_all_nodes(NetworkManager_t)
Chris PeBenito 239db5
corenet_tcp_connect_all_ports(NetworkManager_t)
Chris PeBenito 239db5
corenet_udp_bind_isakmp_port(NetworkManager_t)
Chris PeBenito 239db5
corenet_udp_bind_dhcpc_port(NetworkManager_t)
Chris PeBenito 239db5
# vpn connections
Chris PeBenito 239db5
corenet_use_tun_tap_device(NetworkManager_t)
Chris PeBenito 239db5
Chris PeBenito 239db5
dev_read_sysfs(NetworkManager_t)
Chris PeBenito 239db5
dev_read_rand(NetworkManager_t)
Chris PeBenito 239db5
dev_read_urand(NetworkManager_t)
Chris PeBenito 239db5
Chris PeBenito 239db5
fs_getattr_all_fs(NetworkManager_t)
Chris PeBenito 239db5
fs_search_auto_mountpoints(NetworkManager_t)
Chris PeBenito 239db5
Chris PeBenito 239db5
mls_file_read_up(NetworkManager_t)
Chris PeBenito 239db5
Chris PeBenito 239db5
term_dontaudit_use_console(NetworkManager_t)
Chris PeBenito 239db5
Chris PeBenito 239db5
corecmd_exec_shell(NetworkManager_t)
Chris PeBenito 239db5
corecmd_exec_bin(NetworkManager_t)
Chris PeBenito 239db5
corecmd_exec_sbin(NetworkManager_t)
Chris PeBenito 239db5
corecmd_exec_ls(NetworkManager_t)
Chris PeBenito 239db5
Chris PeBenito 239db5
domain_use_wide_inherit_fd(NetworkManager_t)
Chris PeBenito 239db5
domain_read_confined_domains_state(NetworkManager_t)
Chris PeBenito 239db5
Chris PeBenito 239db5
files_read_etc_files(NetworkManager_t)
Chris PeBenito 239db5
files_read_etc_runtime_files(NetworkManager_t)
Chris PeBenito 239db5
files_read_usr_files(NetworkManager_t)
Chris PeBenito 239db5
Chris PeBenito 239db5
init_use_fd(NetworkManager_t)
Chris PeBenito 239db5
init_use_script_pty(NetworkManager_t)
Chris PeBenito 239db5
init_read_script_pid(NetworkManager_t)
Chris PeBenito 239db5
init_domtrans_script(NetworkManager_t)
Chris PeBenito 239db5
Chris PeBenito 239db5
libs_use_ld_so(NetworkManager_t)
Chris PeBenito 239db5
libs_use_shared_libs(NetworkManager_t)
Chris PeBenito 239db5
Chris PeBenito 239db5
logging_send_syslog_msg(NetworkManager_t)
Chris PeBenito 239db5
Chris PeBenito 239db5
miscfiles_read_localization(NetworkManager_t)
Chris PeBenito 239db5
Chris PeBenito 239db5
modutils_domtrans_insmod(NetworkManager_t)
Chris PeBenito 239db5
Chris PeBenito 239db5
seutil_read_config(NetworkManager_t)
Chris PeBenito 239db5
Chris PeBenito 239db5
sysnet_domtrans_ifconfig(NetworkManager_t)
Chris PeBenito 239db5
sysnet_domtrans_dhcpc(NetworkManager_t)
Chris PeBenito 239db5
sysnet_signal_dhcpc(NetworkManager_t)
Chris PeBenito 239db5
# in /etc created by NetworkManager will be labelled net_conf_t.
Chris PeBenito 239db5
sysnet_manage_config(NetworkManager_t)
Chris PeBenito 239db5
sysnet_create_config(NetworkManager_t)
Chris PeBenito 239db5
Chris PeBenito 239db5
userdom_dontaudit_use_unpriv_user_fd(NetworkManager_t)
Chris PeBenito 239db5
userdom_dontaudit_search_sysadm_home_dir(NetworkManager_t)
Chris PeBenito 239db5
Chris PeBenito 239db5
ifdef(`targeted_policy', `
Chris PeBenito 239db5
	term_dontaudit_use_unallocated_tty(NetworkManager_t)
Chris PeBenito 239db5
	term_dontaudit_use_generic_pty(NetworkManager_t)
Chris PeBenito 239db5
	files_dontaudit_read_root_file(NetworkManager_t)
Chris PeBenito 239db5
')
Chris PeBenito 239db5
Chris PeBenito 239db5
optional_policy(`consoletype.te',`
Chris PeBenito 239db5
	consoletype_exec(NetworkManager_t)
Chris PeBenito 239db5
')
Chris PeBenito 239db5
Chris PeBenito 239db5
optional_policy(`mount.te',`
Chris PeBenito 239db5
	mount_send_nfs_client_request(NetworkManager_t)
Chris PeBenito 239db5
')
Chris PeBenito 239db5
Chris PeBenito 239db5
optional_policy(`nis.te',`
Chris PeBenito 239db5
	nis_use_ypbind(NetworkManager_t)
Chris PeBenito 239db5
')
Chris PeBenito 239db5
Chris PeBenito 239db5
optional_policy(`nscd.te',`
Chris PeBenito 239db5
	nscd_use_socket(NetworkManager_t)
Chris PeBenito 239db5
')
Chris PeBenito 239db5
Chris PeBenito 239db5
optional_policy(`selinuxutil.te',`
Chris PeBenito 239db5
	seutil_sigchld_newrole(NetworkManager_t)
Chris PeBenito 239db5
')
Chris PeBenito 239db5
Chris PeBenito 239db5
optional_policy(`udev.te', `
Chris PeBenito 239db5
	udev_read_db(NetworkManager_t)
Chris PeBenito 239db5
')
Chris PeBenito 239db5
Chris PeBenito 239db5
optional_policy(`vpn.te',`
Chris PeBenito 239db5
	vpn_domtrans(NetworkManager_t)
Chris PeBenito 239db5
')
Chris PeBenito 239db5
Chris PeBenito 239db5
ifdef(`TODO',`
Chris PeBenito 239db5
optional_policy(`rhgb.te',`
Chris PeBenito 239db5
	rhgb_domain(NetworkManager_t)
Chris PeBenito 239db5
')
Chris PeBenito 239db5
') dnl end TODO
Chris PeBenito 239db5
Chris PeBenito 239db5
###########################################################
Chris PeBenito 239db5
#
Chris PeBenito 239db5
# Partially converted rules.  THESE ARE ONLY TEMPORARY
Chris PeBenito 239db5
#
Chris PeBenito 239db5
Chris PeBenito 239db5
optional_policy(`dbus.te',`
Chris PeBenito 239db5
	gen_require(`
Chris PeBenito 239db5
		class dbus send_msg;
Chris PeBenito 239db5
	')
Chris PeBenito 239db5
Chris PeBenito 239db5
	allow NetworkManager_t self:dbus send_msg;
Chris PeBenito 239db5
Chris PeBenito 239db5
	allow NetworkManager_t userdomain:dbus send_msg;
Chris PeBenito 239db5
	allow userdomain NetworkManager_t:dbus send_msg;
Chris PeBenito 239db5
Chris PeBenito 239db5
	allow NetworkManager_t initrc_t:dbus send_msg;
Chris PeBenito 239db5
	allow initrc_t NetworkManager_t:dbus send_msg;
Chris PeBenito 239db5
Chris PeBenito 239db5
	dbus_system_bus_client_template(NetworkManager,NetworkManager_t)
Chris PeBenito 239db5
	dbus_connect_system_bus(NetworkManager_t)
Chris PeBenito 239db5
	dbus_send_system_bus_msg(NetworkManager_t)
Chris PeBenito 239db5
Chris PeBenito 239db5
	ifdef(`targeted_policy',`
Chris PeBenito 239db5
		allow NetworkManager_t unconfined_t:dbus send_msg;
Chris PeBenito 239db5
		allow unconfined_t NetworkManager_t:dbus send_msg;
Chris PeBenito 239db5
	')
Chris PeBenito 239db5
Chris PeBenito 239db5
	optional_policy(`hal.te',`
Chris PeBenito 239db5
		allow NetworkManager_t hald_t:dbus send_msg;
Chris PeBenito 239db5
		allow hald_t NetworkManager_t:dbus send_msg;
Chris PeBenito 239db5
	')
Chris PeBenito 239db5
')
Chris PeBenito 239db5
Chris PeBenito 239db5
allow NetworkManager_t howl_t:process signal;
Chris PeBenito 239db5
Chris PeBenito 239db5
allow NetworkManager_t dhcp_state_t:dir search;
Chris PeBenito 239db5
allow NetworkManager_t dhcpc_var_run_t:file { getattr read unlink };
Chris PeBenito 239db5
Chris PeBenito 239db5
allow NetworkManager_t var_lib_t:dir search;
Chris PeBenito 239db5
dontaudit NetworkManager_t user_ttynode:chr_file { read write };
Chris PeBenito 239db5
dontaudit NetworkManager_t security_t:dir search;