aboutsummaryrefslogtreecommitdiff
blob: 7f398c04ccf86e010dbde1ae3a7b3837e4074207 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
policy_module(openhpi, 1.0.1)

########################################
#
# 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)

########################################
#
# 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)

manage_files_pattern(openhpid_t, openhpid_var_run_t, openhpid_var_run_t)
files_pid_filetrans(openhpid_t, openhpid_var_run_t, file)

corenet_all_recvfrom_unlabeled(openhpid_t)
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)
corenet_tcp_sendrecv_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)