aboutsummaryrefslogtreecommitdiff
blob: b9790021cd2bd4039a9ecb0119ab6bc15f4e6039 (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
policy_module(openvswitch, 1.4.0)

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

type openvswitch_t;
type openvswitch_exec_t;
init_daemon_domain(openvswitch_t, openvswitch_exec_t)

type openvswitch_initrc_exec_t;
init_script_file(openvswitch_initrc_exec_t)

type openvswitch_conf_t;
files_config_file(openvswitch_conf_t)

type openvswitch_var_lib_t;
files_type(openvswitch_var_lib_t)

type openvswitch_log_t;
logging_log_file(openvswitch_log_t)

type openvswitch_tmp_t;
files_tmp_file(openvswitch_tmp_t)

type openvswitch_var_run_t;
files_pid_file(openvswitch_var_run_t)

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

allow openvswitch_t self:capability { ipc_lock net_admin sys_nice sys_resource };
allow openvswitch_t self:process { setrlimit setsched signal };
allow openvswitch_t self:fifo_file rw_fifo_file_perms;
allow openvswitch_t self:rawip_socket create_socket_perms;
allow openvswitch_t self:unix_stream_socket { accept connectto listen };

manage_dirs_pattern(openvswitch_t, openvswitch_conf_t, openvswitch_conf_t)
manage_files_pattern(openvswitch_t, openvswitch_conf_t, openvswitch_conf_t)
manage_lnk_files_pattern(openvswitch_t, openvswitch_conf_t, openvswitch_conf_t)

manage_dirs_pattern(openvswitch_t, openvswitch_var_lib_t, openvswitch_var_lib_t)
manage_files_pattern(openvswitch_t, openvswitch_var_lib_t, openvswitch_var_lib_t)
manage_lnk_files_pattern(openvswitch_t, openvswitch_var_lib_t, openvswitch_var_lib_t)
files_var_lib_filetrans(openvswitch_t, openvswitch_var_lib_t, { dir file lnk_file })

manage_dirs_pattern(openvswitch_t, openvswitch_log_t, openvswitch_log_t)
append_files_pattern(openvswitch_t, openvswitch_log_t, openvswitch_log_t)
create_files_pattern(openvswitch_t, openvswitch_log_t, openvswitch_log_t)
setattr_files_pattern(openvswitch_t, openvswitch_log_t, openvswitch_log_t)
manage_lnk_files_pattern(openvswitch_t, openvswitch_log_t, openvswitch_log_t)
logging_log_filetrans(openvswitch_t, openvswitch_log_t, { dir file lnk_file })

manage_dirs_pattern(openvswitch_t, openvswitch_tmp_t, openvswitch_tmp_t)
manage_files_pattern(openvswitch_t, openvswitch_tmp_t, openvswitch_tmp_t)
manage_lnk_files_pattern(openvswitch_t, openvswitch_tmp_t, openvswitch_tmp_t)
files_tmp_filetrans(openvswitch_t, openvswitch_tmp_t, { file dir })

manage_dirs_pattern(openvswitch_t, openvswitch_var_run_t, openvswitch_var_run_t)
manage_files_pattern(openvswitch_t, openvswitch_var_run_t, openvswitch_var_run_t)
manage_sock_files_pattern(openvswitch_t, openvswitch_var_run_t, openvswitch_var_run_t)
manage_lnk_files_pattern(openvswitch_t, openvswitch_var_run_t, openvswitch_var_run_t)
files_pid_filetrans(openvswitch_t, openvswitch_var_run_t, { dir file lnk_file })

can_exec(openvswitch_t, openvswitch_exec_t)

kernel_read_network_state(openvswitch_t)
kernel_read_system_state(openvswitch_t)

corenet_all_recvfrom_unlabeled(openvswitch_t)
corenet_all_recvfrom_netlabel(openvswitch_t)
corenet_raw_sendrecv_generic_if(openvswitch_t)
corenet_raw_sendrecv_generic_node(openvswitch_t)

corecmd_exec_bin(openvswitch_t)

dev_read_urand(openvswitch_t)

domain_use_interactive_fds(openvswitch_t)

files_read_etc_files(openvswitch_t)

fs_getattr_all_fs(openvswitch_t)
fs_search_cgroup_dirs(openvswitch_t)

logging_send_syslog_msg(openvswitch_t)

miscfiles_read_localization(openvswitch_t)

sysnet_dns_name_resolve(openvswitch_t)

optional_policy(`
	iptables_domtrans(openvswitch_t)
')