Chris PeBenito 31b7c0
#DESC Oav - Anti-virus update program
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
type oav_update_var_lib_t, file_type, sysadmfile;
Chris PeBenito 31b7c0
type oav_update_exec_t, file_type, sysadmfile, exec_type;
Chris PeBenito 31b7c0
type oav_update_etc_t, file_type, sysadmfile;
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
# Derived domain based on the calling user domain and the program.
Chris PeBenito 31b7c0
type oav_update_t, domain, privlog;
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
# Transition from the sysadm domain to the derived domain.
Chris PeBenito 31b7c0
role sysadm_r types oav_update_t;
Chris PeBenito 31b7c0
domain_auto_trans(sysadm_t, oav_update_exec_t, oav_update_t)
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
# Transition from the sysadm domain to the derived domain.
Chris PeBenito 31b7c0
role system_r types oav_update_t;
Chris PeBenito 31b7c0
system_crond_entry(oav_update_exec_t, oav_update_t)
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
# Uses shared librarys
Chris PeBenito 31b7c0
uses_shlib(oav_update_t)
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
# Run helper programs.
Chris PeBenito 31b7c0
can_exec_any(oav_update_t,bin_t)
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
# Can read /etc/oav-update/* files
Chris PeBenito 31b7c0
allow oav_update_t oav_update_etc_t:dir r_dir_perms;
Chris PeBenito 31b7c0
allow oav_update_t oav_update_etc_t:file r_file_perms;
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
# Can read /var/lib/oav-update/current
Chris PeBenito 31b7c0
allow oav_update_t oav_update_var_lib_t:dir create_dir_perms;
Chris PeBenito 31b7c0
allow oav_update_t oav_update_var_lib_t:file create_file_perms;
Chris PeBenito 31b7c0
allow oav_update_t oav_update_var_lib_t:lnk_file r_file_perms;
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
# Can download via network
Chris PeBenito 31b7c0
can_network_server(oav_update_t)