aboutsummaryrefslogtreecommitdiff
blob: 90f6ef5238643c2f61dbbf0af4959b998bdb68b2 (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(mailscanner, 1.4.0)

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

type mscan_t;
type mscan_exec_t;
init_daemon_domain(mscan_t, mscan_exec_t)

type mscan_initrc_exec_t;
init_script_file(mscan_initrc_exec_t)

type mscan_etc_t;
files_config_file(mscan_etc_t)

type mscan_runtime_t alias mscan_var_run_t;
files_pid_file(mscan_runtime_t)

type mscan_spool_t;
files_type(mscan_spool_t)

type mscan_tmp_t;
files_tmp_file(mscan_tmp_t)

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

allow mscan_t self:capability { chown dac_override setgid setuid };
allow mscan_t self:process signal;
allow mscan_t self:fifo_file rw_fifo_file_perms;

read_files_pattern(mscan_t, mscan_etc_t, mscan_etc_t)

manage_files_pattern(mscan_t, mscan_runtime_t, mscan_runtime_t)
files_pid_filetrans(mscan_t, mscan_runtime_t, file)

manage_dirs_pattern(mscan_t, mscan_spool_t, mscan_spool_t)
manage_files_pattern(mscan_t, mscan_spool_t, mscan_spool_t)
files_spool_filetrans(mscan_t, mscan_spool_t, dir)

manage_dirs_pattern(mscan_t, mscan_tmp_t, mscan_tmp_t)
manage_files_pattern(mscan_t, mscan_tmp_t, mscan_tmp_t)
files_tmp_filetrans(mscan_t, mscan_tmp_t, { dir file })

can_exec(mscan_t, mscan_exec_t)

kernel_read_system_state(mscan_t)

corecmd_exec_bin(mscan_t)
corecmd_exec_shell(mscan_t)

corenet_all_recvfrom_netlabel(mscan_t)
corenet_all_recvfrom_unlabeled(mscan_t)
corenet_tcp_bind_generic_node(mscan_t)
corenet_udp_bind_generic_node(mscan_t)
corenet_tcp_sendrecv_generic_if(mscan_t)
corenet_udp_sendrecv_generic_if(mscan_t)
corenet_tcp_sendrecv_generic_node(mscan_t)
corenet_udp_sendrecv_generic_node(mscan_t)

corenet_sendrecv_trisoap_client_packets(mscan_t)
corenet_tcp_connect_trisoap_port(mscan_t)
corenet_tcp_sendrecv_trisoap_port(mscan_t)

corenet_sendrecv_generic_server_packets(mscan_t)
corenet_udp_bind_generic_port(mscan_t)
corenet_udp_sendrecv_all_ports(mscan_t)

dev_read_urand(mscan_t)

files_read_usr_files(mscan_t)

fs_getattr_xattr_fs(mscan_t)

auth_dontaudit_read_shadow(mscan_t)
auth_use_nsswitch(mscan_t)

logging_send_syslog_msg(mscan_t)

miscfiles_read_localization(mscan_t)

optional_policy(`
	clamav_domtrans_clamscan(mscan_t)
')

optional_policy(`
	mta_send_mail(mscan_t)
	mta_manage_queue(mscan_t)
')

optional_policy(`
	procmail_domtrans(mscan_t)
')

optional_policy(`
	spamassassin_read_lib_files(mscan_t)
')