selinux-refpolicy/policy/modules/services/clamav.if

94 lines
1.7 KiB
Plaintext

## <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;
')
domtrans_pattern($1,clamd_exec_t,clamd_t)
')
########################################
## <summary>
## Connect to run clamd.
## </summary>
## <param name="domain">
## <summary>
## Domain allowed to connect.
## </summary>
## </param>
#
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)
')
########################################
## <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)
allow $1 clamd_etc_t:file read_file_perms;
')
########################################
## <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;
')
########################################
## <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;
')
domtrans_pattern($1,clamscan_exec_t,clamscan_t)
')