|
Chris PeBenito |
8a0a99 |
## <summary>ClamAV Virus Scanner</summary>
|
|
Chris PeBenito |
8a0a99 |
|
|
Chris PeBenito |
8a0a99 |
########################################
|
|
Chris PeBenito |
8a0a99 |
## <summary>
|
|
Chris PeBenito |
8a0a99 |
## Execute a domain transition to run clamd.
|
|
Chris PeBenito |
8a0a99 |
## </summary>
|
|
Chris PeBenito |
8a0a99 |
## <param name="domain">
|
|
Chris PeBenito |
8a0a99 |
## <summary>
|
|
Chris PeBenito |
8a0a99 |
## Domain allowed to transition.
|
|
Chris PeBenito |
8a0a99 |
## </summary>
|
|
Chris PeBenito |
8a0a99 |
## </param>
|
|
Chris PeBenito |
8a0a99 |
#
|
|
Chris PeBenito |
8a0a99 |
interface(`clamav_domtrans',`
|
|
Chris PeBenito |
8a0a99 |
gen_require(`
|
|
Chris PeBenito |
8a0a99 |
type clamd_t, clamd_exec_t;
|
|
Chris PeBenito |
8a0a99 |
')
|
|
Chris PeBenito |
8a0a99 |
|
|
Chris PeBenito |
8a0a99 |
domain_auto_trans($1,clamd_exec_t,clamd_t)
|
|
Chris PeBenito |
8a0a99 |
|
|
Chris PeBenito |
8a0a99 |
allow $1 clamd_t:fd use;
|
|
Chris PeBenito |
8a0a99 |
allow clamd_t $1:fd use;
|
|
Chris PeBenito |
8a0a99 |
allow clamd_t $1:fifo_file rw_file_perms;
|
|
Chris PeBenito |
8a0a99 |
allow clamd_t $1:process sigchld;
|
|
Chris PeBenito |
8a0a99 |
')
|
|
Chris PeBenito |
8a0a99 |
|
|
Chris PeBenito |
8a0a99 |
########################################
|
|
Chris PeBenito |
8a0a99 |
## <summary>
|
|
Chris PeBenito |
8a0a99 |
## Connect to run clamd.
|
|
Chris PeBenito |
8a0a99 |
## </summary>
|
|
Chris PeBenito |
8a0a99 |
## <param name="domain">
|
|
Chris PeBenito |
8a0a99 |
## <summary>
|
|
Chris PeBenito |
8a0a99 |
## Domain allowed to connect.
|
|
Chris PeBenito |
8a0a99 |
## </summary>
|
|
Chris PeBenito |
8a0a99 |
## </param>
|
|
Chris PeBenito |
8a0a99 |
#
|
|
Chris PeBenito |
8a0a99 |
interface(`clamav_stream_connect',`
|
|
Chris PeBenito |
8a0a99 |
gen_require(`
|
|
Chris PeBenito |
8a0a99 |
type clamd_t, clamd_sock_t, clamd_var_run_t;
|
|
Chris PeBenito |
8a0a99 |
')
|
|
Chris PeBenito |
8a0a99 |
|
|
Chris PeBenito |
8a0a99 |
allow $1 clamd_var_run_t:dir search;
|
|
Chris PeBenito |
8a0a99 |
allow $1 clamd_sock_t:sock_file write;
|
|
Chris PeBenito |
8a0a99 |
allow $1 clamd_t:unix_stream_socket connectto;
|
|
Chris PeBenito |
8a0a99 |
')
|
|
Chris PeBenito |
8a0a99 |
|
|
Chris PeBenito |
8a0a99 |
########################################
|
|
Chris PeBenito |
8a0a99 |
## <summary>
|
|
Chris PeBenito |
8a0a99 |
## Read clamav configuration files.
|
|
Chris PeBenito |
8a0a99 |
## </summary>
|
|
Chris PeBenito |
8a0a99 |
## <param name="domain">
|
|
Chris PeBenito |
8a0a99 |
## <summary>
|
|
Chris PeBenito |
8a0a99 |
## Domain allowed access.
|
|
Chris PeBenito |
8a0a99 |
## </summary>
|
|
Chris PeBenito |
8a0a99 |
## </param>
|
|
Chris PeBenito |
8a0a99 |
#
|
|
Chris PeBenito |
8a0a99 |
interface(`clamav_read_config',`
|
|
Chris PeBenito |
8a0a99 |
gen_require(`
|
|
Chris PeBenito |
8a0a99 |
type clamd_etc_t;
|
|
Chris PeBenito |
8a0a99 |
')
|
|
Chris PeBenito |
8a0a99 |
|
|
Chris PeBenito |
8a0a99 |
files_search_etc($1)
|
|
Chris PeBenito |
8a0a99 |
allow $1 clamd_etc_t:file r_file_perms;
|
|
Chris PeBenito |
8a0a99 |
')
|
|
Chris PeBenito |
165b42 |
|
|
Chris PeBenito |
165b42 |
########################################
|
|
Chris PeBenito |
165b42 |
## <summary>
|
|
Chris PeBenito |
165b42 |
## Execute a domain transition to run clamscan.
|
|
Chris PeBenito |
165b42 |
## </summary>
|
|
Chris PeBenito |
165b42 |
## <param name="domain">
|
|
Chris PeBenito |
165b42 |
## <summary>
|
|
Chris PeBenito |
165b42 |
## Domain allowed access.
|
|
Chris PeBenito |
165b42 |
## </summary>
|
|
Chris PeBenito |
165b42 |
## </param>
|
|
Chris PeBenito |
165b42 |
#
|
|
Chris PeBenito |
165b42 |
interface(`clamav_domtrans_clamscan',`
|
|
Chris PeBenito |
165b42 |
gen_require(`
|
|
Chris PeBenito |
165b42 |
type clamscan_t, clamscan_exec_t;
|
|
Chris PeBenito |
165b42 |
')
|
|
Chris PeBenito |
165b42 |
|
|
Chris PeBenito |
165b42 |
domain_auto_trans($1,clamscan_exec_t,clamscan_t)
|
|
Chris PeBenito |
165b42 |
|
|
Chris PeBenito |
165b42 |
allow clamscan_t $1:fd use;
|
|
Chris PeBenito |
165b42 |
allow clamscan_t $1:fifo_file rw_file_perms;
|
|
Chris PeBenito |
165b42 |
allow clamscan_t $1:process sigchld;
|
|
Chris PeBenito |
165b42 |
')
|
|
Chris PeBenito |
165b42 |
|