aboutsummaryrefslogtreecommitdiff
blob: 2af2dda53e90c5913e1588623a693fd34224c19e (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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
policy_module(pegasus, 1.13.0)

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

type pegasus_t;
type pegasus_exec_t;
init_daemon_domain(pegasus_t, pegasus_exec_t)

type pegasus_initrc_exec_t;
init_script_file(pegasus_initrc_exec_t)

type pegasus_cache_t;
files_type(pegasus_cache_t)

type pegasus_data_t;
files_type(pegasus_data_t)

type pegasus_tmp_t;
files_tmp_file(pegasus_tmp_t)

type pegasus_conf_t;
files_config_file(pegasus_conf_t)

type pegasus_mof_t;
files_type(pegasus_mof_t)

type pegasus_var_run_t;
files_pid_file(pegasus_var_run_t)

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

allow pegasus_t self:capability { chown dac_override ipc_lock kill net_admin net_bind_service setgid setuid sys_nice };
dontaudit pegasus_t self:capability sys_tty_config;
allow pegasus_t self:process signal;
allow pegasus_t self:fifo_file rw_fifo_file_perms;
allow pegasus_t self:unix_stream_socket { connectto accept listen };
allow pegasus_t self:tcp_socket { accept listen };

allow pegasus_t pegasus_conf_t:dir rw_dir_perms;
allow pegasus_t pegasus_conf_t:file { read_file_perms delete_file_perms rename_file_perms };
allow pegasus_t pegasus_conf_t:lnk_file read_lnk_file_perms;

manage_dirs_pattern(pegasus_t, pegasus_cache_t, pegasus_cache_t)
manage_files_pattern(pegasus_t, pegasus_cache_t, pegasus_cache_t)
manage_lnk_files_pattern(pegasus_t, pegasus_cache_t, pegasus_cache_t)
files_var_filetrans(pegasus_t, pegasus_cache_t, { dir file lnk_file })

manage_dirs_pattern(pegasus_t, pegasus_data_t, pegasus_data_t)
manage_files_pattern(pegasus_t, pegasus_data_t, pegasus_data_t)
manage_lnk_files_pattern(pegasus_t, pegasus_data_t, pegasus_data_t)
filetrans_pattern(pegasus_t, pegasus_conf_t, pegasus_data_t, { dir file })

allow pegasus_t pegasus_mof_t:dir list_dir_perms;
allow pegasus_t pegasus_mof_t:file read_file_perms;
allow pegasus_t pegasus_mof_t:lnk_file read_lnk_file_perms;

manage_dirs_pattern(pegasus_t, pegasus_tmp_t, pegasus_tmp_t)
manage_files_pattern(pegasus_t, pegasus_tmp_t, pegasus_tmp_t)
files_tmp_filetrans(pegasus_t, pegasus_tmp_t, { dir file })

manage_dirs_pattern(pegasus_t, pegasus_var_run_t, pegasus_var_run_t)
manage_files_pattern(pegasus_t, pegasus_var_run_t, pegasus_var_run_t)
manage_sock_files_pattern(pegasus_t, pegasus_var_run_t, pegasus_var_run_t)
files_pid_filetrans(pegasus_t, pegasus_var_run_t, { dir file sock_file })

can_exec(pegasus_t, pegasus_exec_t)

kernel_read_network_state(pegasus_t)
kernel_read_kernel_sysctls(pegasus_t)
kernel_read_fs_sysctls(pegasus_t)
kernel_read_system_state(pegasus_t)
kernel_search_vm_sysctl(pegasus_t)
kernel_read_net_sysctls(pegasus_t)
kernel_read_xen_state(pegasus_t)
kernel_write_xen_state(pegasus_t)

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

corenet_sendrecv_pegasus_http_server_packets(pegasus_t)
corenet_tcp_bind_pegasus_http_port(pegasus_t)

corenet_sendrecv_pegasus_https_server_packets(pegasus_t)
corenet_tcp_bind_pegasus_https_port(pegasus_t)

corenet_sendrecv_pegasus_http_client_packets(pegasus_t)
corenet_tcp_connect_pegasus_http_port(pegasus_t)

corenet_sendrecv_pegasus_https_client_packets(pegasus_t)
corenet_tcp_connect_pegasus_https_port(pegasus_t)

corenet_sendrecv_generic_client_packets(pegasus_t)
corenet_tcp_connect_generic_port(pegasus_t)

corecmd_exec_bin(pegasus_t)
corecmd_exec_shell(pegasus_t)

dev_rw_sysfs(pegasus_t)
dev_read_urand(pegasus_t)

fs_getattr_all_fs(pegasus_t)
fs_search_auto_mountpoints(pegasus_t)
files_getattr_all_dirs(pegasus_t)

auth_use_nsswitch(pegasus_t)
auth_domtrans_chk_passwd(pegasus_t)

domain_use_interactive_fds(pegasus_t)
domain_read_all_domains_state(pegasus_t)

files_list_var_lib(pegasus_t)
files_read_var_lib_files(pegasus_t)
files_read_var_lib_symlinks(pegasus_t)

init_rw_utmp(pegasus_t)
init_stream_connect_script(pegasus_t)

logging_send_audit_msgs(pegasus_t)
logging_send_syslog_msg(pegasus_t)

miscfiles_read_localization(pegasus_t)

userdom_dontaudit_use_unpriv_user_fds(pegasus_t)
userdom_dontaudit_search_user_home_dirs(pegasus_t)

optional_policy(`
	dbus_system_bus_client(pegasus_t)
	dbus_connect_system_bus(pegasus_t)

	optional_policy(`
		networkmanager_dbus_chat(pegasus_t)
	')
')

optional_policy(`
	dmidecode_domtrans(pegasus_t)
')

optional_policy(`
	hostname_exec(pegasus_t)
')

optional_policy(`
	lldpad_dgram_send(pegasus_t)
')

optional_policy(`
	rpm_exec(pegasus_t)
')

optional_policy(`
	samba_manage_config(pegasus_t)
')

optional_policy(`
	seutil_sigchld_newrole(pegasus_t)
	seutil_dontaudit_read_config(pegasus_t)
')

optional_policy(`
	ssh_exec(pegasus_t)
')

optional_policy(`
	sysnet_domtrans_ifconfig(pegasus_t)
')

optional_policy(`
	udev_read_db(pegasus_t)
')

optional_policy(`
	unconfined_signull(pegasus_t)
')

optional_policy(`
	virt_domtrans(pegasus_t)
	virt_stream_connect(pegasus_t)
	virt_manage_config(pegasus_t)
')

optional_policy(`
	xen_stream_connect(pegasus_t)
	xen_stream_connect_xenstore(pegasus_t)
')