aboutsummaryrefslogtreecommitdiff
blob: 685e7b8b8d2a957c0e07c845f9a119d38f35876f (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
policy_module(vhostmd, 1.4.0)

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

type vhostmd_t;
type vhostmd_exec_t;
init_daemon_domain(vhostmd_t, vhostmd_exec_t)

type vhostmd_initrc_exec_t;
init_script_file(vhostmd_initrc_exec_t)

type vhostmd_tmpfs_t;
files_tmpfs_file(vhostmd_tmpfs_t)

type vhostmd_var_run_t;
files_pid_file(vhostmd_var_run_t)

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

allow vhostmd_t self:capability { dac_override ipc_lock setgid setuid };
allow vhostmd_t self:process { setsched getsched signal };
allow vhostmd_t self:fifo_file rw_fifo_file_perms;

manage_dirs_pattern(vhostmd_t, vhostmd_tmpfs_t, vhostmd_tmpfs_t)
manage_files_pattern(vhostmd_t, vhostmd_tmpfs_t, vhostmd_tmpfs_t)
fs_tmpfs_filetrans(vhostmd_t, vhostmd_tmpfs_t, { file dir })

manage_dirs_pattern(vhostmd_t, vhostmd_var_run_t, vhostmd_var_run_t)
manage_files_pattern(vhostmd_t, vhostmd_var_run_t, vhostmd_var_run_t)
manage_sock_files_pattern(vhostmd_t, vhostmd_var_run_t, vhostmd_var_run_t)
files_pid_filetrans(vhostmd_t, vhostmd_var_run_t, { file dir sock_file })

kernel_read_kernel_sysctls(vhostmd_t)
kernel_read_system_state(vhostmd_t)
kernel_read_network_state(vhostmd_t)
kernel_write_xen_state(vhostmd_t)

corecmd_exec_bin(vhostmd_t)
corecmd_exec_shell(vhostmd_t)

corenet_all_recvfrom_unlabeled(vhostmd_t)
corenet_all_recvfrom_netlabel(vhostmd_t)
corenet_tcp_sendrecv_generic_if(vhostmd_t)
corenet_tcp_sendrecv_generic_node(vhostmd_t)

corenet_sendrecv_soundd_client_packets(vhostmd_t)
corenet_tcp_connect_soundd_port(vhostmd_t)
corenet_tcp_sendrecv_soundd_port(vhostmd_t)

dev_read_rand(vhostmd_t)
dev_read_urand(vhostmd_t)
dev_read_sysfs(vhostmd_t)

files_list_tmp(vhostmd_t)
files_read_usr_files(vhostmd_t)

auth_use_nsswitch(vhostmd_t)

logging_send_syslog_msg(vhostmd_t)

miscfiles_read_localization(vhostmd_t)

optional_policy(`
	hostname_exec(vhostmd_t)
')

optional_policy(`
	rpm_exec(vhostmd_t)
	rpm_read_db(vhostmd_t)
')

optional_policy(`
	virt_stream_connect(vhostmd_t)
')

optional_policy(`
	xen_domtrans_xm(vhostmd_t)
	xen_stream_connect(vhostmd_t)
	xen_stream_connect_xenstore(vhostmd_t)
	xen_stream_connect_xm(vhostmd_t)
')