Blame mls/domains/program/webalizer.te
|
Chris PeBenito |
31b7c0 |
# DESC webalizer - webalizer
|
|
Chris PeBenito |
31b7c0 |
#
|
|
Chris PeBenito |
31b7c0 |
# Author: Yuichi Nakamura (ynakam @ selinux.gr.jp)
|
|
Chris PeBenito |
31b7c0 |
#
|
|
Chris PeBenito |
31b7c0 |
# Depends: apache.te
|
|
Chris PeBenito |
31b7c0 |
|
|
Chris PeBenito |
31b7c0 |
application_domain(webalizer, `, nscd_client_domain')
|
|
Chris PeBenito |
31b7c0 |
# to use from cron
|
|
Chris PeBenito |
31b7c0 |
system_crond_entry(webalizer_exec_t,webalizer_t)
|
|
Chris PeBenito |
31b7c0 |
role system_r types webalizer_t;
|
|
Chris PeBenito |
31b7c0 |
|
|
Chris PeBenito |
31b7c0 |
##type definision
|
|
Chris PeBenito |
31b7c0 |
# type for usage file
|
|
Chris PeBenito |
31b7c0 |
type webalizer_usage_t,file_type,sysadmfile;
|
|
Chris PeBenito |
31b7c0 |
# type for /var/lib/webalizer
|
|
Chris PeBenito |
31b7c0 |
type webalizer_write_t,file_type,sysadmfile;
|
|
Chris PeBenito |
31b7c0 |
# type for webalizer.conf
|
|
Chris PeBenito |
31b7c0 |
etc_domain(webalizer)
|
|
Chris PeBenito |
31b7c0 |
|
|
Chris PeBenito |
31b7c0 |
#read apache log
|
|
Chris PeBenito |
31b7c0 |
allow webalizer_t var_log_t:dir r_dir_perms;
|
|
Chris PeBenito |
31b7c0 |
r_dir_file(webalizer_t, httpd_log_t)
|
|
Chris PeBenito |
31b7c0 |
ifdef(`ftpd.te', `
|
|
Chris PeBenito |
31b7c0 |
allow webalizer_t xferlog_t:file { getattr read };
|
|
Chris PeBenito |
31b7c0 |
')
|
|
Chris PeBenito |
31b7c0 |
|
|
Chris PeBenito |
31b7c0 |
#r/w /var/lib/webalizer
|
|
Chris PeBenito |
31b7c0 |
var_lib_domain(webalizer)
|
|
Chris PeBenito |
31b7c0 |
|
|
Chris PeBenito |
31b7c0 |
#read /var/www/usage
|
|
Chris PeBenito |
31b7c0 |
create_dir_file(webalizer_t, httpd_sys_content_t)
|
|
Chris PeBenito |
31b7c0 |
|
|
Chris PeBenito |
31b7c0 |
#read system files under /etc
|
|
Chris PeBenito |
31b7c0 |
allow webalizer_t { etc_t etc_runtime_t }:file { getattr read };
|
|
Chris PeBenito |
31b7c0 |
read_locale(webalizer_t)
|
|
Chris PeBenito |
31b7c0 |
|
|
Chris PeBenito |
31b7c0 |
# can use tmp file
|
|
Chris PeBenito |
31b7c0 |
tmp_domain(webalizer)
|
|
Chris PeBenito |
31b7c0 |
|
|
Chris PeBenito |
31b7c0 |
# can read /proc
|
|
Chris PeBenito |
31b7c0 |
read_sysctl(webalizer_t)
|
|
Chris PeBenito |
31b7c0 |
allow webalizer_t proc_t:dir search;
|
|
Chris PeBenito |
31b7c0 |
allow webalizer_t proc_t:file r_file_perms;
|
|
Chris PeBenito |
31b7c0 |
|
|
Chris PeBenito |
31b7c0 |
# network
|
|
Chris PeBenito |
31b7c0 |
can_network_server(webalizer_t)
|
|
Chris PeBenito |
31b7c0 |
|
|
Chris PeBenito |
31b7c0 |
#process communication inside webalizer itself
|
|
Chris PeBenito |
31b7c0 |
general_domain_access(webalizer_t)
|
|
Chris PeBenito |
31b7c0 |
|
|
Chris PeBenito |
31b7c0 |
allow webalizer_t self:capability dac_override;
|