28a36c2
policy_module(antivirus, 1.0.0)
28a36c2
28a36c2
########################################
28a36c2
#
28a36c2
# Declarations
28a36c2
#
28a36c2
28a36c2
## <desc>
28a36c2
##  

94ee5ce
##  Allow antivirus programs to read non security files on a system
28a36c2
##  

28a36c2
## </desc>
28a36c2
gen_tunable(antivirus_can_scan_system, false)
28a36c2
28a36c2
attribute antivirus_domain;
28a36c2
28a36c2
type antivirus_db_t;
28a36c2
files_type(antivirus_db_t)
28a36c2
28a36c2
########################################
28a36c2
#
28a36c2
# antivirus domain local policy
28a36c2
#
28a36c2
28a36c2
manage_files_pattern(antivirus_domain, antivirus_db_t, antivirus_db_t)
28a36c2
manage_dirs_pattern(antivirus_domain, antivirus_db_t, antivirus_db_t)
28a36c2
e4b88e0
optional_policy(`
e4b88e0
	amavis_manage_spool_files(antivirus_domain)
e4b88e0
')
e4b88e0
28a36c2
tunable_policy(`antivirus_can_scan_system',`
28a36c2
        files_read_non_security_files(antivirus_domain)
28a36c2
        files_getattr_all_pipes(antivirus_domain)
28a36c2
        files_getattr_all_sockets(antivirus_domain)
28a36c2
')