## 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;
')
domtrans_pattern($1,clamd_exec_t,clamd_t)
')
########################################
##
## Connect to run clamd.
##
##
##
## Domain allowed to connect.
##
##
#
interface(`clamav_stream_connect',`
gen_require(`
type clamd_t, clamd_var_run_t;
')
stream_connect_pattern($1,clamd_var_run_t,clamd_var_run_t,clamd_t)
')
########################################
##
## 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 read_file_perms;
')
########################################
##
## Search clamav libraries directories.
##
##
##
## Domain allowed access.
##
##
#
interface(`clamav_search_lib',`
gen_require(`
type clamd_var_lib_t;
')
files_search_var_lib($1)
allow $1 clamd_var_lib_t:dir search_dir_perms;
')
########################################
##
## Execute a domain transition to run clamscan.
##
##
##
## Domain allowed access.
##
##
#
interface(`clamav_domtrans_clamscan',`
gen_require(`
type clamscan_t, clamscan_exec_t;
')
domtrans_pattern($1,clamscan_exec_t,clamscan_t)
')