Chris PeBenito 0fbfa5
#DESC Sysstat - Sar and similar programs
Chris PeBenito 0fbfa5
#
Chris PeBenito 0fbfa5
# Authors:  Russell Coker <russell@coker.com.au>
Chris PeBenito 0fbfa5
# X-Debian-Packages: sysstat
Chris PeBenito 0fbfa5
#
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
#################################
Chris PeBenito 0fbfa5
#
Chris PeBenito 0fbfa5
# Rules for the sysstat_t domain.
Chris PeBenito 0fbfa5
#
Chris PeBenito 0fbfa5
# sysstat_exec_t is the type of the sysstat executable.
Chris PeBenito 0fbfa5
#
Chris PeBenito 0fbfa5
type sysstat_t, domain, privlog;
Chris PeBenito 0fbfa5
type sysstat_exec_t, file_type, sysadmfile, exec_type;
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
role system_r types sysstat_t;
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
allow sysstat_t device_t:dir search;
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
allow sysstat_t self:process { sigchld fork };
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
#for date
Chris PeBenito 0fbfa5
can_exec(sysstat_t, { sysstat_exec_t bin_t })
Chris PeBenito 0fbfa5
allow sysstat_t bin_t:dir r_dir_perms;
Chris PeBenito 0fbfa5
dontaudit sysstat_t sbin_t:dir search;
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
dontaudit sysstat_t self:capability sys_admin;
Chris PeBenito 0fbfa5
allow sysstat_t self:capability sys_resource;
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
allow sysstat_t devtty_t:chr_file rw_file_perms;
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
allow sysstat_t urandom_device_t:chr_file read;
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
# for mtab
Chris PeBenito 0fbfa5
allow sysstat_t etc_runtime_t:file { read getattr };
Chris PeBenito 0fbfa5
# for fstab
Chris PeBenito 0fbfa5
allow sysstat_t etc_t:file { read getattr };
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
dontaudit sysstat_t sysadm_home_dir_t:dir r_dir_perms;
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
allow sysstat_t self:fifo_file rw_file_perms;
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
# Type for files created during execution of sysstatd.
Chris PeBenito 0fbfa5
logdir_domain(sysstat)
Chris PeBenito 0fbfa5
allow sysstat_t var_t:dir search;
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
allow sysstat_t etc_t:dir r_dir_perms;
Chris PeBenito 0fbfa5
read_locale(sysstat_t)
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
allow sysstat_t fs_t:filesystem getattr;
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
# get info from /proc
Chris PeBenito 0fbfa5
allow sysstat_t { proc_t proc_net_t sysctl_kernel_t sysctl_t sysctl_fs_t sysctl_rpc_t }:dir r_dir_perms;
Chris PeBenito 0fbfa5
allow sysstat_t { proc_t proc_net_t sysctl_kernel_t sysctl_t sysctl_fs_t sysctl_rpc_t }:file { read getattr };
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
domain_auto_trans(initrc_t, sysstat_exec_t, sysstat_t)
Chris PeBenito 0fbfa5
allow sysstat_t init_t:fd use;
Chris PeBenito 0fbfa5
allow sysstat_t console_device_t:chr_file { read write };
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
uses_shlib(sysstat_t)
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
system_crond_entry(sysstat_exec_t, sysstat_t)
Chris PeBenito 0fbfa5
allow system_crond_t sysstat_log_t:dir { write remove_name add_name };
Chris PeBenito 0fbfa5
allow system_crond_t sysstat_log_t:file create_file_perms;
Chris PeBenito 0fbfa5
allow sysstat_t initrc_devpts_t:chr_file { read write };