summaryrefslogtreecommitdiff
path: root/policy/modules/services/gatekeeper.te
blob: e248a0331ae24d641686707db1fef3c9d1c04d8f (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

policy_module(gatekeeper, 1.6.0)

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

type gatekeeper_t;
type gatekeeper_exec_t;
init_daemon_domain(gatekeeper_t, gatekeeper_exec_t)

type gatekeeper_etc_t;
files_config_file(gatekeeper_etc_t)

type gatekeeper_log_t;
logging_log_file(gatekeeper_log_t)

# for stupid symlinks
type gatekeeper_tmp_t;
files_tmp_file(gatekeeper_tmp_t)

type gatekeeper_var_run_t;
files_pid_file(gatekeeper_var_run_t)

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

dontaudit gatekeeper_t self:capability sys_tty_config;
allow gatekeeper_t self:process { setsched signal_perms };
allow gatekeeper_t self:fifo_file rw_fifo_file_perms;
allow gatekeeper_t self:tcp_socket create_stream_socket_perms;
allow gatekeeper_t self:udp_socket create_socket_perms;

allow gatekeeper_t gatekeeper_etc_t:lnk_file { getattr read };
allow gatekeeper_t gatekeeper_etc_t:file read_file_perms;
files_search_etc(gatekeeper_t)

manage_files_pattern(gatekeeper_t, gatekeeper_log_t, gatekeeper_log_t)
logging_log_filetrans(gatekeeper_t, gatekeeper_log_t, { file dir })

manage_dirs_pattern(gatekeeper_t, gatekeeper_tmp_t, gatekeeper_tmp_t)
manage_files_pattern(gatekeeper_t, gatekeeper_tmp_t, gatekeeper_tmp_t)
files_tmp_filetrans(gatekeeper_t, gatekeeper_tmp_t, { file dir })

manage_files_pattern(gatekeeper_t, gatekeeper_var_run_t, gatekeeper_var_run_t)
files_pid_filetrans(gatekeeper_t, gatekeeper_var_run_t, file)

kernel_read_system_state(gatekeeper_t)
kernel_read_kernel_sysctls(gatekeeper_t)

corecmd_list_bin(gatekeeper_t)

corenet_all_recvfrom_unlabeled(gatekeeper_t)
corenet_all_recvfrom_netlabel(gatekeeper_t)
corenet_tcp_sendrecv_generic_if(gatekeeper_t)
corenet_udp_sendrecv_generic_if(gatekeeper_t)
corenet_tcp_sendrecv_all_nodes(gatekeeper_t)
corenet_udp_sendrecv_all_nodes(gatekeeper_t)
corenet_tcp_sendrecv_all_ports(gatekeeper_t)
corenet_udp_sendrecv_all_ports(gatekeeper_t)
corenet_tcp_bind_all_nodes(gatekeeper_t)
corenet_udp_bind_all_nodes(gatekeeper_t)
corenet_tcp_bind_gatekeeper_port(gatekeeper_t)
corenet_udp_bind_gatekeeper_port(gatekeeper_t)
corenet_sendrecv_gatekeeper_server_packets(gatekeeper_t)

dev_read_sysfs(gatekeeper_t)
# for SSP
dev_read_urand(gatekeeper_t)

domain_use_interactive_fds(gatekeeper_t)

files_read_etc_files(gatekeeper_t)

fs_getattr_all_fs(gatekeeper_t)
fs_search_auto_mountpoints(gatekeeper_t)

logging_send_syslog_msg(gatekeeper_t)

miscfiles_read_localization(gatekeeper_t)

sysnet_read_config(gatekeeper_t)

userdom_dontaudit_use_unpriv_user_fds(gatekeeper_t)
userdom_dontaudit_search_user_home_dirs(gatekeeper_t)

optional_policy(`
	nis_use_ypbind(gatekeeper_t)
')

optional_policy(`
	seutil_sigchld_newrole(gatekeeper_t)
')

optional_policy(`
	udev_read_db(gatekeeper_t)
')