aboutsummaryrefslogtreecommitdiff
blob: 228b63c4fd5bbede043237559ef5b3eaac5b72d4 (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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
policy_module(nx)

########################################
#
# Declarations
#

type nx_server_t;
type nx_server_exec_t;
domain_type(nx_server_t)
domain_entry_file(nx_server_t, nx_server_exec_t)
domain_user_exemption_target(nx_server_t)

role nx_server_r;
role nx_server_r types nx_server_t;
allow system_r nx_server_r;

type nx_server_devpts_t;
term_user_pty(nx_server_t, nx_server_devpts_t)

type nx_server_runtime_t alias nx_server_var_run_t;
files_runtime_file(nx_server_runtime_t)

type nx_server_tmp_t;
files_tmp_file(nx_server_tmp_t)

type nx_server_var_lib_t;
files_type(nx_server_var_lib_t)

########################################
#
# Local policy
#

allow nx_server_t self:fifo_file rw_fifo_file_perms;
allow nx_server_t self:tcp_socket create_socket_perms;
allow nx_server_t self:udp_socket create_socket_perms;

allow nx_server_t nx_server_devpts_t:chr_file { rw_chr_file_perms setattr_chr_file_perms };
term_create_pty(nx_server_t, nx_server_devpts_t)

manage_dirs_pattern(nx_server_t, nx_server_tmp_t, nx_server_tmp_t)
manage_files_pattern(nx_server_t, nx_server_tmp_t, nx_server_tmp_t)
files_tmp_filetrans(nx_server_t, nx_server_tmp_t, { file dir })

manage_files_pattern(nx_server_t, nx_server_var_lib_t, nx_server_var_lib_t)
manage_dirs_pattern(nx_server_t, nx_server_var_lib_t, nx_server_var_lib_t)
files_var_lib_filetrans(nx_server_t, nx_server_var_lib_t, { file dir })

manage_files_pattern(nx_server_t, nx_server_runtime_t, nx_server_runtime_t)
files_runtime_filetrans(nx_server_t, nx_server_runtime_t, file)

kernel_read_system_state(nx_server_t)
kernel_read_kernel_sysctls(nx_server_t)

corecmd_exec_shell(nx_server_t)
corecmd_exec_bin(nx_server_t)

corenet_all_recvfrom_netlabel(nx_server_t)
corenet_tcp_sendrecv_generic_if(nx_server_t)
corenet_tcp_sendrecv_generic_node(nx_server_t)

corenet_tcp_connect_all_ports(nx_server_t)
corenet_sendrecv_all_client_packets(nx_server_t)

dev_read_urand(nx_server_t)

files_read_etc_files(nx_server_t)
files_read_etc_runtime_files(nx_server_t)
files_read_usr_files(nx_server_t)

miscfiles_read_localization(nx_server_t)

seutil_dontaudit_search_config(nx_server_t)

sysnet_read_config(nx_server_t)

ssh_basic_client_template(nx_server, nx_server_t, nx_server_r)