## ClamAV Virus Scanner
########################################
##
## Execute a domain transition to run clamd.
##
##
##
## Domain allowed to transition.
##
##
#
interface(`clamav_domtrans',`
gen_require(`
type clamd_t, clamd_exec_t;
')
domain_auto_trans($1,clamd_exec_t,clamd_t)
allow $1 clamd_t:fd use;
allow clamd_t $1:fd use;
allow clamd_t $1:fifo_file rw_file_perms;
allow clamd_t $1:process sigchld;
')
########################################
##
## Connect to run clamd.
##
##
##
## Domain allowed to connect.
##
##
#
interface(`clamav_stream_connect',`
gen_require(`
type clamd_t, clamd_sock_t, clamd_var_run_t;
')
allow $1 clamd_var_run_t:dir search;
allow $1 clamd_sock_t:sock_file write;
allow $1 clamd_t:unix_stream_socket connectto;
')
########################################
##
## Read clamav configuration files.
##
##
##
## Domain allowed access.
##
##
#
interface(`clamav_read_config',`
gen_require(`
type clamd_etc_t;
')
files_search_etc($1)
allow $1 clamd_etc_t:file r_file_perms;
')