aboutsummaryrefslogtreecommitdiff
blob: 869f9761b64fc9054afc4c0e28c8d4387659bcf1 (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
policy_module(sblim, 1.0.0)

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

attribute sblim_domain;

type sblim_gatherd_t, sblim_domain;
type sblim_gatherd_exec_t;
init_daemon_domain(sblim_gatherd_t, sblim_gatherd_exec_t)

type sblim_reposd_t, sblim_domain;
type sblim_reposd_exec_t;
init_daemon_domain(sblim_reposd_t, sblim_reposd_exec_t)

type sblim_var_run_t;
files_pid_file(sblim_var_run_t)

########################################
#
# sblim_gatherd local policy
#
allow sblim_gatherd_t self:capability dac_override;
allow sblim_gatherd_t self:process signal;
allow sblim_gatherd_t self:fifo_file rw_fifo_file_perms;
allow sblim_gatherd_t self:unix_stream_socket create_stream_socket_perms;

kernel_read_fs_sysctls(sblim_gatherd_t)
kernel_read_kernel_sysctls(sblim_gatherd_t)

corecmd_exec_bin(sblim_gatherd_t)
corecmd_exec_shell(sblim_gatherd_t)

corenet_tcp_connect_repository_port(sblim_gatherd_t)

dev_read_rand(sblim_gatherd_t)
dev_read_urand(sblim_gatherd_t)

domain_read_all_domains_state(sblim_gatherd_t)

fs_getattr_all_fs(sblim_gatherd_t)

sysnet_dns_name_resolve(sblim_gatherd_t)

term_getattr_pty_fs(sblim_gatherd_t)

init_read_utmp(sblim_gatherd_t)

userdom_signull_unpriv_users(sblim_gatherd_t)

optional_policy(`
	locallogin_signull(sblim_gatherd_t)
')

optional_policy(`
	rpc_search_nfs_state_data(sblim_gatherd_t)
')

optional_policy(`
	ssh_signull(sblim_gatherd_t)
')

optional_policy(`
	virt_stream_connect(sblim_gatherd_t)
')

optional_policy(`
	xen_stream_connect(sblim_gatherd_t)
	xen_stream_connect_xenstore(sblim_gatherd_t)
')

#######################################
#
# sblim_reposd local policy
#

domtrans_pattern(sblim_gatherd_t, sblim_reposd_exec_t, sblim_reposd_t)

corenet_tcp_bind_all_nodes(sblim_reposd_t)
corenet_tcp_bind_repository_port(sblim_reposd_t)

######################################
#
# sblim_domain local policy
#

allow sblim_domain self:tcp_socket create_stream_socket_perms;

manage_dirs_pattern(sblim_domain, sblim_var_run_t, sblim_var_run_t)
manage_files_pattern(sblim_domain, sblim_var_run_t, sblim_var_run_t)
manage_sock_files_pattern(sblim_domain, sblim_var_run_t, sblim_var_run_t)

kernel_read_network_state(sblim_domain)
kernel_read_system_state(sblim_domain)

dev_read_sysfs(sblim_domain)

logging_send_syslog_msg(sblim_domain)

files_read_etc_files(sblim_domain)

miscfiles_read_localization(sblim_domain)