policy_module(openhpid, 1.0.0) ######################################## # # 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) type openhpid_var_lib_t; files_type(openhpid_var_lib_t) type openhpid_var_run_t; files_pid_file(openhpid_var_run_t) ######################################## # # openhpid local policy # allow openhpid_t self:capability { kill }; allow openhpid_t self:process { fork 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 create_stream_socket_perms; 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 file }) manage_files_pattern(openhpid_t, openhpid_var_run_t, openhpid_var_run_t) files_pid_filetrans(openhpid_t, openhpid_var_run_t, { file }) corenet_tcp_bind_generic_node(openhpid_t) corenet_tcp_bind_openhpid_port(openhpid_t) domain_use_interactive_fds(openhpid_t) dev_read_urand(openhpid_t) logging_send_syslog_msg(openhpid_t)