2020-08-18 13:09:10 +00:00
|
|
|
policy_module(openhpi, 1.6.0)
|
2018-06-23 13:00:56 +00:00
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Declarations
|
|
|
|
#
|
|
|
|
|
|
|
|
type openhpid_t;
|
|
|
|
type openhpid_exec_t;
|
|
|
|
init_daemon_domain(openhpid_t, openhpid_exec_t)
|
|
|
|
|
|
|
|
type openhpid_initrc_exec_t;
|
|
|
|
init_script_file(openhpid_initrc_exec_t)
|
|
|
|
|
2019-09-08 20:55:02 +00:00
|
|
|
type openhpid_runtime_t alias openhpid_var_run_t;
|
2020-06-27 21:11:48 +00:00
|
|
|
files_runtime_file(openhpid_runtime_t)
|
2018-06-23 13:00:56 +00:00
|
|
|
|
2019-09-11 00:05:46 +00:00
|
|
|
type openhpid_var_lib_t;
|
|
|
|
files_type(openhpid_var_lib_t)
|
|
|
|
|
2018-06-23 13:00:56 +00:00
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Local policy
|
|
|
|
#
|
|
|
|
|
|
|
|
allow openhpid_t self:capability kill;
|
|
|
|
allow openhpid_t self:process signal;
|
|
|
|
allow openhpid_t self:fifo_file rw_fifo_file_perms;
|
|
|
|
allow openhpid_t self:netlink_route_socket r_netlink_socket_perms;
|
|
|
|
allow openhpid_t self:unix_stream_socket { accept listen };
|
|
|
|
allow openhpid_t self:tcp_socket create_stream_socket_perms;
|
|
|
|
allow openhpid_t self:udp_socket create_socket_perms;
|
|
|
|
|
|
|
|
manage_dirs_pattern(openhpid_t, openhpid_var_lib_t, openhpid_var_lib_t)
|
|
|
|
manage_files_pattern(openhpid_t, openhpid_var_lib_t, openhpid_var_lib_t)
|
|
|
|
files_var_lib_filetrans(openhpid_t, openhpid_var_lib_t, dir)
|
|
|
|
|
2019-09-08 20:55:02 +00:00
|
|
|
manage_files_pattern(openhpid_t, openhpid_runtime_t, openhpid_runtime_t)
|
2020-06-27 21:11:48 +00:00
|
|
|
files_runtime_filetrans(openhpid_t, openhpid_runtime_t, file)
|
2018-06-23 13:00:56 +00:00
|
|
|
|
|
|
|
corenet_all_recvfrom_netlabel(openhpid_t)
|
|
|
|
corenet_tcp_sendrecv_generic_if(openhpid_t)
|
|
|
|
corenet_tcp_sendrecv_generic_node(openhpid_t)
|
|
|
|
corenet_tcp_bind_generic_node(openhpid_t)
|
|
|
|
|
|
|
|
corenet_sendrecv_openhpid_server_packets(openhpid_t)
|
|
|
|
corenet_tcp_bind_openhpid_port(openhpid_t)
|
|
|
|
|
|
|
|
dev_read_urand(openhpid_t)
|
|
|
|
|
|
|
|
files_read_etc_files(openhpid_t)
|
|
|
|
|
|
|
|
logging_send_syslog_msg(openhpid_t)
|
|
|
|
|
|
|
|
miscfiles_read_localization(openhpid_t)
|