|
Chris PeBenito |
31b7c0 |
#DESC Scannerdaemon - Virus scanner daemon
|
|
Chris PeBenito |
31b7c0 |
#
|
|
Chris PeBenito |
31b7c0 |
# Author: Brian May <bam@snoopy.apana.org.au>
|
|
Chris PeBenito |
31b7c0 |
# X-Debian-Packages:
|
|
Chris PeBenito |
31b7c0 |
#
|
|
Chris PeBenito |
31b7c0 |
|
|
Chris PeBenito |
31b7c0 |
#################################
|
|
Chris PeBenito |
31b7c0 |
#
|
|
Chris PeBenito |
31b7c0 |
# Rules for the scannerdaemon_t domain.
|
|
Chris PeBenito |
31b7c0 |
#
|
|
Chris PeBenito |
31b7c0 |
type scannerdaemon_etc_t, file_type, sysadmfile;
|
|
Chris PeBenito |
31b7c0 |
|
|
Chris PeBenito |
31b7c0 |
#networking
|
|
Chris PeBenito |
31b7c0 |
daemon_domain(scannerdaemon)
|
|
Chris PeBenito |
31b7c0 |
can_network_server(scannerdaemon_t)
|
|
Chris PeBenito |
31b7c0 |
ifdef(`postfix.te',
|
|
Chris PeBenito |
31b7c0 |
`can_tcp_connect(postfix_bounce_t,scannerdaemon_t);')
|
|
Chris PeBenito |
31b7c0 |
|
|
Chris PeBenito |
31b7c0 |
# for testing
|
|
Chris PeBenito |
31b7c0 |
can_tcp_connect(sysadm_t,scannerdaemon_t)
|
|
Chris PeBenito |
31b7c0 |
|
|
Chris PeBenito |
31b7c0 |
# Can create unix sockets
|
|
Chris PeBenito |
31b7c0 |
allow scannerdaemon_t self:unix_stream_socket create_stream_socket_perms;
|
|
Chris PeBenito |
31b7c0 |
|
|
Chris PeBenito |
31b7c0 |
# Access config files (libc6).
|
|
Chris PeBenito |
31b7c0 |
allow scannerdaemon_t etc_t:file r_file_perms;
|
|
Chris PeBenito |
31b7c0 |
allow scannerdaemon_t etc_t:lnk_file r_file_perms;
|
|
Chris PeBenito |
31b7c0 |
allow scannerdaemon_t proc_t:file r_file_perms;
|
|
Chris PeBenito |
31b7c0 |
allow scannerdaemon_t etc_runtime_t:file r_file_perms;
|
|
Chris PeBenito |
31b7c0 |
|
|
Chris PeBenito |
31b7c0 |
# Access config files (scannerdaemon).
|
|
Chris PeBenito |
31b7c0 |
allow scannerdaemon_t scannerdaemon_etc_t:file r_file_perms;
|
|
Chris PeBenito |
31b7c0 |
|
|
Chris PeBenito |
31b7c0 |
# Access signature files.
|
|
Chris PeBenito |
31b7c0 |
ifdef(`oav-update.te',`
|
|
Chris PeBenito |
31b7c0 |
allow scannerdaemon_t oav_update_var_lib_t:dir r_dir_perms;
|
|
Chris PeBenito |
31b7c0 |
allow scannerdaemon_t oav_update_var_lib_t:file r_file_perms;
|
|
Chris PeBenito |
31b7c0 |
')
|
|
Chris PeBenito |
31b7c0 |
|
|
Chris PeBenito |
31b7c0 |
log_domain(scannerdaemon)
|
|
Chris PeBenito |
31b7c0 |
ifdef(`logrotate.te', `
|
|
Chris PeBenito |
31b7c0 |
allow logrotate_t scannerdaemon_log_t:file create_file_perms;
|
|
Chris PeBenito |
31b7c0 |
')
|
|
Chris PeBenito |
31b7c0 |
|
|
Chris PeBenito |
31b7c0 |
# Can run kaffe
|
|
Chris PeBenito |
31b7c0 |
# Run helper programs.
|
|
Chris PeBenito |
31b7c0 |
can_exec_any(scannerdaemon_t)
|
|
Chris PeBenito |
31b7c0 |
allow scannerdaemon_t var_lib_t:dir search;
|
|
Chris PeBenito |
31b7c0 |
allow scannerdaemon_t { sbin_t bin_t }:dir search;
|
|
Chris PeBenito |
31b7c0 |
allow scannerdaemon_t bin_t:lnk_file read;
|
|
Chris PeBenito |
31b7c0 |
|
|
Chris PeBenito |
31b7c0 |
# unknown stuff
|
|
Chris PeBenito |
31b7c0 |
allow scannerdaemon_t self:fifo_file { read write };
|
|
Chris PeBenito |
31b7c0 |
|
|
Chris PeBenito |
31b7c0 |
# broken stuff
|
|
Chris PeBenito |
31b7c0 |
dontaudit scannerdaemon_t sysadm_home_dir_t:dir search;
|
|
Chris PeBenito |
31b7c0 |
dontaudit scannerdaemon_t devtty_t:chr_file { read write };
|
|
Chris PeBenito |
31b7c0 |
dontaudit scannerdaemon_t shadow_t:file { read getattr };
|