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

policy_module(imaze, 1.5.0)

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

type imazesrv_t;
type imazesrv_exec_t;
init_daemon_domain(imazesrv_t, imazesrv_exec_t)

type imazesrv_data_t;
files_type(imazesrv_data_t)

type imazesrv_data_labs_t;
files_type(imazesrv_data_labs_t)

type imazesrv_log_t;
logging_log_file(imazesrv_log_t)

type imazesrv_var_run_t;
files_pid_file(imazesrv_var_run_t)

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

dontaudit imazesrv_t self:capability sys_tty_config;
allow imazesrv_t self:process ~{ ptrace setcurrent setexec setfscreate setrlimit execmem execstack execheap };
allow imazesrv_t self:fd use;
allow imazesrv_t self:fifo_file rw_fifo_file_perms;
allow imazesrv_t self:unix_dgram_socket { create_socket_perms sendto };
allow imazesrv_t self:unix_stream_socket { create_stream_socket_perms connectto };
allow imazesrv_t self:shm create_shm_perms;
allow imazesrv_t self:sem create_sem_perms;
allow imazesrv_t self:msgq create_msgq_perms;
allow imazesrv_t self:msg { send receive };
allow imazesrv_t self:tcp_socket create_stream_socket_perms;
allow imazesrv_t self:udp_socket create_socket_perms;

allow imazesrv_t imazesrv_data_t:dir list_dir_perms;
read_files_pattern(imazesrv_t, imazesrv_data_t, imazesrv_data_t)
read_lnk_files_pattern(imazesrv_t, imazesrv_data_t, imazesrv_data_t)

allow imazesrv_t imazesrv_log_t:file manage_file_perms;
allow imazesrv_t imazesrv_log_t:dir add_entry_dir_perms;
logging_log_filetrans(imazesrv_t, imazesrv_log_t, file)

manage_files_pattern(imazesrv_t, imazesrv_var_run_t, imazesrv_var_run_t)
files_pid_filetrans(imazesrv_t, imazesrv_var_run_t, file)

kernel_read_kernel_sysctls(imazesrv_t)
kernel_list_proc(imazesrv_t)
kernel_read_proc_symlinks(imazesrv_t)

corenet_all_recvfrom_unlabeled(imazesrv_t)
corenet_all_recvfrom_netlabel(imazesrv_t)
corenet_tcp_sendrecv_generic_if(imazesrv_t)
corenet_udp_sendrecv_generic_if(imazesrv_t)
corenet_tcp_sendrecv_all_nodes(imazesrv_t)
corenet_udp_sendrecv_all_nodes(imazesrv_t)
corenet_tcp_sendrecv_all_ports(imazesrv_t)
corenet_udp_sendrecv_all_ports(imazesrv_t)
corenet_tcp_bind_all_nodes(imazesrv_t)
corenet_udp_bind_all_nodes(imazesrv_t)
corenet_tcp_bind_imaze_port(imazesrv_t)
corenet_udp_bind_imaze_port(imazesrv_t)
corenet_sendrecv_imaze_server_packets(imazesrv_t)

dev_read_sysfs(imazesrv_t)

domain_use_interactive_fds(imazesrv_t)

files_read_etc_files(imazesrv_t)

fs_getattr_all_fs(imazesrv_t)
fs_search_auto_mountpoints(imazesrv_t)

logging_send_syslog_msg(imazesrv_t)

miscfiles_read_localization(imazesrv_t)

sysnet_read_config(imazesrv_t)

userdom_use_unpriv_users_fds(imazesrv_t)

sysadm_dontaudit_search_home_dirs(imazesrv_t)

optional_policy(`
	nis_use_ypbind(imazesrv_t)
')

optional_policy(`
	seutil_sigchld_newrole(imazesrv_t)
')

optional_policy(`
	udev_read_db(imazesrv_t)
')