|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
c12621 |
policy_module(openvpn, 1.7.2)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
########################################
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
17de1b |
# Declarations
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
72f82c |
## <desc>
|
|
Chris PeBenito |
72f82c |
##
|
|
Chris PeBenito |
72f82c |
## Allow openvpn to read home directories
|
|
Chris PeBenito |
72f82c |
##
|
|
Chris PeBenito |
72f82c |
## </desc>
|
|
Chris PeBenito |
0bfccd |
gen_tunable(openvpn_enable_homedirs, false)
|
|
Chris PeBenito |
72f82c |
|
|
Chris PeBenito |
17de1b |
# main openvpn domain
|
|
Chris PeBenito |
17de1b |
type openvpn_t;
|
|
Chris PeBenito |
17de1b |
type openvpn_exec_t;
|
|
Chris PeBenito |
17de1b |
init_daemon_domain(openvpn_t, openvpn_exec_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
# configuration files
|
|
Chris PeBenito |
17de1b |
type openvpn_etc_t;
|
|
Chris PeBenito |
967fd1 |
files_config_file(openvpn_etc_t)
|
|
Chris PeBenito |
967fd1 |
|
|
Chris PeBenito |
967fd1 |
type openvpn_initrc_exec_t;
|
|
Chris PeBenito |
967fd1 |
init_script_file(openvpn_initrc_exec_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
# log files
|
|
Chris PeBenito |
17de1b |
type openvpn_var_log_t;
|
|
Chris PeBenito |
17de1b |
logging_log_file(openvpn_var_log_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
# pid files
|
|
Chris PeBenito |
17de1b |
type openvpn_var_run_t;
|
|
Chris PeBenito |
17de1b |
files_pid_file(openvpn_var_run_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
########################################
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
17de1b |
# openvpn local policy
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
967fd1 |
allow openvpn_t self:capability { dac_read_search dac_override net_bind_service net_admin setgid setuid sys_chroot sys_tty_config };
|
|
Chris PeBenito |
72f82c |
allow openvpn_t self:process { signal getsched };
|
|
Chris PeBenito |
72f82c |
|
|
Chris PeBenito |
17de1b |
allow openvpn_t self:unix_dgram_socket { create_socket_perms sendto };
|
|
Chris PeBenito |
17de1b |
allow openvpn_t self:unix_stream_socket { create_stream_socket_perms connectto };
|
|
Chris PeBenito |
17de1b |
allow openvpn_t self:udp_socket create_socket_perms;
|
|
Chris PeBenito |
6b19be |
allow openvpn_t self:tcp_socket server_stream_socket_perms;
|
|
Chris PeBenito |
a5e213 |
allow openvpn_t self:netlink_route_socket rw_netlink_socket_perms;
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
c0868a |
allow openvpn_t openvpn_etc_t:dir list_dir_perms;
|
|
Chris PeBenito |
967fd1 |
can_exec(openvpn_t, openvpn_etc_t)
|
|
Chris PeBenito |
0bfccd |
read_files_pattern(openvpn_t, openvpn_etc_t, openvpn_etc_t)
|
|
Chris PeBenito |
0bfccd |
read_lnk_files_pattern(openvpn_t, openvpn_etc_t, openvpn_etc_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
c0868a |
allow openvpn_t openvpn_var_log_t:file manage_file_perms;
|
|
Chris PeBenito |
0bfccd |
logging_log_filetrans(openvpn_t, openvpn_var_log_t, file)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
72f82c |
manage_files_pattern(openvpn_t, openvpn_var_run_t, openvpn_var_run_t)
|
|
Chris PeBenito |
72f82c |
files_pid_filetrans(openvpn_t, openvpn_var_run_t, { file dir })
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
kernel_read_kernel_sysctls(openvpn_t)
|
|
Chris PeBenito |
17de1b |
kernel_read_net_sysctls(openvpn_t)
|
|
Chris PeBenito |
17de1b |
kernel_read_network_state(openvpn_t)
|
|
Chris PeBenito |
17de1b |
kernel_read_system_state(openvpn_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
corecmd_exec_bin(openvpn_t)
|
|
Chris PeBenito |
17de1b |
corecmd_exec_shell(openvpn_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
190066 |
corenet_all_recvfrom_unlabeled(openvpn_t)
|
|
Chris PeBenito |
190066 |
corenet_all_recvfrom_netlabel(openvpn_t)
|
|
Chris PeBenito |
668b30 |
corenet_tcp_sendrecv_generic_if(openvpn_t)
|
|
Chris PeBenito |
668b30 |
corenet_udp_sendrecv_generic_if(openvpn_t)
|
|
Chris PeBenito |
17de1b |
corenet_tcp_sendrecv_generic_node(openvpn_t)
|
|
Chris PeBenito |
17de1b |
corenet_udp_sendrecv_generic_node(openvpn_t)
|
|
Chris PeBenito |
17de1b |
corenet_tcp_sendrecv_all_ports(openvpn_t)
|
|
Chris PeBenito |
17de1b |
corenet_udp_sendrecv_all_ports(openvpn_t)
|
|
Chris PeBenito |
c12621 |
corenet_tcp_bind_generic_node(openvpn_t)
|
|
Chris PeBenito |
c12621 |
corenet_udp_bind_generic_node(openvpn_t)
|
|
Chris PeBenito |
17de1b |
corenet_tcp_bind_openvpn_port(openvpn_t)
|
|
Chris PeBenito |
17de1b |
corenet_udp_bind_openvpn_port(openvpn_t)
|
|
Chris PeBenito |
72f82c |
corenet_tcp_connect_openvpn_port(openvpn_t)
|
|
Chris PeBenito |
967fd1 |
corenet_tcp_connect_http_port(openvpn_t)
|
|
Chris PeBenito |
967fd1 |
corenet_rw_tun_tap_dev(openvpn_t)
|
|
Chris PeBenito |
967fd1 |
corenet_sendrecv_openvpn_server_packets(openvpn_t)
|
|
Chris PeBenito |
967fd1 |
corenet_sendrecv_openvpn_client_packets(openvpn_t)
|
|
Chris PeBenito |
967fd1 |
corenet_sendrecv_http_client_packets(openvpn_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
465510 |
dev_search_sysfs(openvpn_t)
|
|
Chris PeBenito |
17de1b |
dev_read_rand(openvpn_t)
|
|
Chris PeBenito |
17de1b |
dev_read_urand(openvpn_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
files_read_etc_files(openvpn_t)
|
|
Chris PeBenito |
17de1b |
files_read_etc_runtime_files(openvpn_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
logging_send_syslog_msg(openvpn_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
miscfiles_read_localization(openvpn_t)
|
|
Chris PeBenito |
72f82c |
miscfiles_read_certs(openvpn_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
465510 |
sysnet_dns_name_resolve(openvpn_t)
|
|
Chris PeBenito |
17de1b |
sysnet_exec_ifconfig(openvpn_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
296273 |
userdom_use_user_terminals(openvpn_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
72f82c |
tunable_policy(`openvpn_enable_homedirs',`
|
|
Chris PeBenito |
296273 |
userdom_read_user_home_content_files(openvpn_t)
|
|
Chris PeBenito |
72f82c |
')
|
|
Chris PeBenito |
72f82c |
|
|
Chris PeBenito |
17de1b |
optional_policy(`
|
|
Chris PeBenito |
0bfccd |
daemontools_service_domain(openvpn_t, openvpn_exec_t)
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
72f82c |
|
|
Chris PeBenito |
72f82c |
optional_policy(`
|
|
Chris PeBenito |
296273 |
dbus_system_bus_client(openvpn_t)
|
|
Chris PeBenito |
72f82c |
dbus_connect_system_bus(openvpn_t)
|
|
Chris PeBenito |
72f82c |
|
|
Chris PeBenito |
72f82c |
networkmanager_dbus_chat(openvpn_t)
|
|
Chris PeBenito |
72f82c |
')
|