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

64 lines
1.2 KiB
Plaintext
Raw Normal View History

## <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;
')
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;
')
########################################
## <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_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;
')
########################################
## <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 r_file_perms;
')