aboutsummaryrefslogtreecommitdiff
blob: 20f0ff272b9f10ea5acfe4a3368e82f53d4930c5 (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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
policy_module(glance, 1.3.0)

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

attribute glance_domain;

type glance_registry_t, glance_domain;
type glance_registry_exec_t;
init_daemon_domain(glance_registry_t, glance_registry_exec_t)

type glance_registry_initrc_exec_t;
init_script_file(glance_registry_initrc_exec_t)

type glance_registry_tmp_t;
files_tmp_file(glance_registry_tmp_t)

type glance_api_t, glance_domain;
type glance_api_exec_t;
init_daemon_domain(glance_api_t, glance_api_exec_t)

type glance_api_initrc_exec_t;
init_script_file(glance_api_initrc_exec_t)

type glance_log_t;
logging_log_file(glance_log_t)

type glance_var_lib_t;
files_type(glance_var_lib_t)

type glance_tmp_t;
files_tmp_file(glance_tmp_t)

type glance_var_run_t;
files_pid_file(glance_var_run_t)

#######################################
#
# Common local policy
#

allow glance_domain self:fifo_file rw_fifo_file_perms;
allow glance_domain self:unix_stream_socket create_stream_socket_perms;
allow glance_domain self:tcp_socket { accept listen };

manage_dirs_pattern(glance_domain, glance_log_t, glance_log_t)
append_files_pattern(glance_domain, glance_log_t, glance_log_t)
create_files_pattern(glance_domain, glance_log_t, glance_log_t)
setattr_files_pattern(glance_domain, glance_log_t, glance_log_t)

manage_dirs_pattern(glance_domain, glance_var_lib_t, glance_var_lib_t)
manage_files_pattern(glance_domain, glance_var_lib_t, glance_var_lib_t)

manage_dirs_pattern(glance_domain, glance_var_run_t, glance_var_run_t)
manage_files_pattern(glance_domain, glance_var_run_t, glance_var_run_t)

kernel_read_system_state(glance_domain)

corenet_all_recvfrom_unlabeled(glance_domain)
corenet_all_recvfrom_netlabel(glance_domain)
corenet_tcp_sendrecv_generic_if(glance_domain)
corenet_tcp_sendrecv_generic_node(glance_domain)
corenet_tcp_sendrecv_all_ports(glance_domain)
corenet_tcp_bind_generic_node(glance_domain)

corecmd_exec_bin(glance_domain)
corecmd_exec_shell(glance_domain)

dev_read_urand(glance_domain)

files_read_etc_files(glance_domain)
files_read_usr_files(glance_domain)

libs_exec_ldconfig(glance_domain)

miscfiles_read_localization(glance_domain)

sysnet_dns_name_resolve(glance_domain)

########################################
#
# Registry local policy
#

manage_dirs_pattern(glance_registry_t, glance_registry_tmp_t, glance_registry_tmp_t)
manage_files_pattern(glance_registry_t, glance_registry_tmp_t, glance_registry_tmp_t)
files_tmp_filetrans(glance_registry_t, glance_registry_tmp_t, { dir file })

corenet_sendrecv_glance_registry_server_packets(glance_registry_t)
corenet_tcp_bind_glance_registry_port(glance_registry_t)

logging_send_syslog_msg(glance_registry_t)

optional_policy(`
	mysql_stream_connect(glance_registry_t)
	mysql_tcp_connect(glance_registry_t)
')

########################################
#
# Api local policy
#

manage_dirs_pattern(glance_api_t, glance_tmp_t, glance_tmp_t)
manage_files_pattern(glance_api_t, glance_tmp_t, glance_tmp_t)
files_tmp_filetrans(glance_api_t, glance_tmp_t, { dir file })
can_exec(glance_api_t, glance_tmp_t)

corenet_sendrecv_armtechdaemon_server_packets(glance_api_t)
corenet_tcp_bind_armtechdaemon_port(glance_api_t)

corenet_sendrecv_hplip_server_packets(glance_api_t)
corenet_tcp_bind_hplip_port(glance_api_t)

corenet_sendrecv_glance_registry_client_packets(glance_api_t)
corenet_tcp_connect_glance_registry_port(glance_api_t)

fs_getattr_xattr_fs(glance_api_t)