2006-03-07 21:15:24 +00:00
|
|
|
## <summary>ClamAV Virus Scanner</summary>
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Execute a domain transition to run clamd.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed to transition.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`clamav_domtrans',`
|
|
|
|
gen_require(`
|
|
|
|
type clamd_t, clamd_exec_t;
|
|
|
|
')
|
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
domtrans_pattern($1,clamd_exec_t,clamd_t)
|
2006-03-07 21:15:24 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Connect to run clamd.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed to connect.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`clamav_stream_connect',`
|
|
|
|
gen_require(`
|
2006-07-28 15:13:58 +00:00
|
|
|
type clamd_t, clamd_var_run_t;
|
2006-03-07 21:15:24 +00:00
|
|
|
')
|
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
stream_connect_pattern($1,clamd_var_run_t,clamd_var_run_t,clamd_t)
|
2006-03-07 21:15:24 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read clamav configuration files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`clamav_read_config',`
|
|
|
|
gen_require(`
|
|
|
|
type clamd_etc_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
files_search_etc($1)
|
2006-12-12 20:08:08 +00:00
|
|
|
allow $1 clamd_etc_t:file read_file_perms;
|
2006-03-07 21:15:24 +00:00
|
|
|
')
|
2006-05-17 14:50:31 +00:00
|
|
|
|
2006-06-21 18:25:06 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Search clamav libraries directories.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
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;
|
|
|
|
')
|
|
|
|
|
2006-05-17 14:50:31 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Execute a domain transition to run clamscan.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`clamav_domtrans_clamscan',`
|
|
|
|
gen_require(`
|
|
|
|
type clamscan_t, clamscan_exec_t;
|
|
|
|
')
|
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
domtrans_pattern($1,clamscan_exec_t,clamscan_t)
|
2006-05-17 14:50:31 +00:00
|
|
|
')
|