2005-10-10 18:50:08 +00:00
|
|
|
|
2007-09-28 13:58:24 +00:00
|
|
|
policy_module(webalizer,1.6.0)
|
2005-10-10 18:50:08 +00:00
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Declarations
|
|
|
|
#
|
2006-12-12 20:08:08 +00:00
|
|
|
|
2005-10-10 18:50:08 +00:00
|
|
|
type webalizer_t;
|
|
|
|
type webalizer_exec_t;
|
2007-07-19 18:57:48 +00:00
|
|
|
application_domain(webalizer_t,webalizer_exec_t)
|
2005-10-10 18:50:08 +00:00
|
|
|
role system_r types webalizer_t;
|
|
|
|
|
2005-10-24 18:40:24 +00:00
|
|
|
type webalizer_etc_t;
|
|
|
|
files_config_file(webalizer_etc_t)
|
2005-10-10 18:50:08 +00:00
|
|
|
|
|
|
|
type webalizer_usage_t;
|
|
|
|
files_type(webalizer_usage_t)
|
|
|
|
|
|
|
|
type webalizer_tmp_t;
|
|
|
|
files_tmp_file(webalizer_tmp_t)
|
|
|
|
|
|
|
|
type webalizer_var_lib_t;
|
|
|
|
files_type(webalizer_var_lib_t)
|
|
|
|
|
|
|
|
type webalizer_write_t;
|
|
|
|
files_type(webalizer_write_t)
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Local policy
|
|
|
|
#
|
2006-12-12 20:08:08 +00:00
|
|
|
|
2005-10-10 18:50:08 +00:00
|
|
|
allow webalizer_t self:capability dac_override;
|
|
|
|
allow webalizer_t self:process ~{ ptrace setcurrent setexec setfscreate setrlimit execmem execstack execheap };
|
|
|
|
allow webalizer_t self:fd use;
|
2006-12-12 20:08:08 +00:00
|
|
|
allow webalizer_t self:fifo_file rw_fifo_file_perms;
|
|
|
|
allow webalizer_t self:sock_file read_sock_file_perms;
|
2005-10-10 18:50:08 +00:00
|
|
|
allow webalizer_t self:shm create_shm_perms;
|
|
|
|
allow webalizer_t self:sem create_sem_perms;
|
|
|
|
allow webalizer_t self:msgq create_msgq_perms;
|
|
|
|
allow webalizer_t self:msg { send receive };
|
|
|
|
allow webalizer_t self:unix_dgram_socket create_socket_perms;
|
|
|
|
allow webalizer_t self:unix_stream_socket create_stream_socket_perms;
|
|
|
|
allow webalizer_t self:unix_dgram_socket sendto;
|
|
|
|
allow webalizer_t self:unix_stream_socket connectto;
|
|
|
|
allow webalizer_t self:tcp_socket connected_stream_socket_perms;
|
2006-06-12 21:36:38 +00:00
|
|
|
allow webalizer_t self:udp_socket { connect connected_socket_perms };
|
2006-06-07 17:43:10 +00:00
|
|
|
allow webalizer_t self:netlink_route_socket r_netlink_socket_perms;
|
2005-10-10 18:50:08 +00:00
|
|
|
|
|
|
|
allow webalizer_t webalizer_etc_t:file { getattr read };
|
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
manage_dirs_pattern(webalizer_t,webalizer_tmp_t,webalizer_tmp_t)
|
|
|
|
manage_files_pattern(webalizer_t,webalizer_tmp_t,webalizer_tmp_t)
|
2006-02-21 18:40:44 +00:00
|
|
|
files_tmp_filetrans(webalizer_t, webalizer_tmp_t, { file dir })
|
2005-10-10 18:50:08 +00:00
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
manage_files_pattern(webalizer_t,webalizer_var_lib_t,webalizer_var_lib_t)
|
2006-03-02 23:41:11 +00:00
|
|
|
files_var_lib_filetrans(webalizer_t,webalizer_var_lib_t,file)
|
2005-10-10 18:50:08 +00:00
|
|
|
|
2006-01-31 16:49:43 +00:00
|
|
|
kernel_read_kernel_sysctls(webalizer_t)
|
2005-10-10 18:50:08 +00:00
|
|
|
kernel_read_system_state(webalizer_t)
|
|
|
|
|
2007-06-27 15:23:21 +00:00
|
|
|
corenet_all_recvfrom_unlabeled(webalizer_t)
|
|
|
|
corenet_all_recvfrom_netlabel(webalizer_t)
|
2005-10-10 18:50:08 +00:00
|
|
|
corenet_tcp_sendrecv_all_if(webalizer_t)
|
|
|
|
corenet_tcp_sendrecv_all_nodes(webalizer_t)
|
|
|
|
corenet_tcp_sendrecv_all_ports(webalizer_t)
|
|
|
|
|
|
|
|
fs_search_auto_mountpoints(webalizer_t)
|
2007-02-16 23:01:42 +00:00
|
|
|
fs_getattr_xattr_fs(webalizer_t)
|
2005-10-10 18:50:08 +00:00
|
|
|
|
|
|
|
files_read_etc_files(webalizer_t)
|
|
|
|
files_read_etc_runtime_files(webalizer_t)
|
|
|
|
|
|
|
|
libs_use_ld_so(webalizer_t)
|
|
|
|
libs_use_shared_libs(webalizer_t)
|
|
|
|
|
|
|
|
logging_list_logs(webalizer_t)
|
|
|
|
logging_send_syslog_msg(webalizer_t)
|
|
|
|
|
|
|
|
miscfiles_read_localization(webalizer_t)
|
|
|
|
|
2006-05-29 18:25:58 +00:00
|
|
|
sysnet_dns_name_resolve(webalizer_t)
|
2005-10-10 18:50:08 +00:00
|
|
|
sysnet_read_config(webalizer_t)
|
|
|
|
|
2006-02-21 18:40:44 +00:00
|
|
|
userdom_use_unpriv_users_fds(webalizer_t)
|
|
|
|
userdom_dontaudit_search_all_users_home_content(webalizer_t)
|
2005-10-10 18:50:08 +00:00
|
|
|
|
2005-10-12 17:22:25 +00:00
|
|
|
apache_read_log(webalizer_t)
|
|
|
|
apache_manage_sys_content(webalizer_t)
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2006-12-12 20:08:08 +00:00
|
|
|
cron_system_entry(webalizer_t,webalizer_exec_t)
|
2005-10-13 20:59:36 +00:00
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2006-12-12 20:08:08 +00:00
|
|
|
ftp_read_log(webalizer_t)
|
2005-10-10 18:50:08 +00:00
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2006-12-12 20:08:08 +00:00
|
|
|
nis_use_ypbind(webalizer_t)
|
2005-10-10 18:50:08 +00:00
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2006-12-12 20:08:08 +00:00
|
|
|
nscd_socket_use(webalizer_t)
|
2005-10-10 18:50:08 +00:00
|
|
|
')
|