Chris PeBenito 17de1b
Chris PeBenito 0251df
policy_module(webalizer,1.4.0)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
# Declarations
Chris PeBenito 17de1b
#
Chris PeBenito c0868a
Chris PeBenito 17de1b
type webalizer_t;
Chris PeBenito 17de1b
type webalizer_exec_t;
Chris PeBenito 17de1b
domain_type(webalizer_t)
Chris PeBenito 17de1b
domain_entry_file(webalizer_t,webalizer_exec_t)
Chris PeBenito 17de1b
role system_r types webalizer_t;
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type webalizer_etc_t;
Chris PeBenito 17de1b
files_config_file(webalizer_etc_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type webalizer_usage_t;
Chris PeBenito 17de1b
files_type(webalizer_usage_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type webalizer_tmp_t;
Chris PeBenito 17de1b
files_tmp_file(webalizer_tmp_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type webalizer_var_lib_t;
Chris PeBenito 17de1b
files_type(webalizer_var_lib_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type webalizer_write_t;
Chris PeBenito 17de1b
files_type(webalizer_write_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
# Local policy
Chris PeBenito 17de1b
#
Chris PeBenito c0868a
Chris PeBenito 17de1b
allow webalizer_t self:capability dac_override;
Chris PeBenito 17de1b
allow webalizer_t self:process ~{ ptrace setcurrent setexec setfscreate setrlimit execmem execstack execheap };
Chris PeBenito 17de1b
allow webalizer_t self:fd use;
Chris PeBenito c0868a
allow webalizer_t self:fifo_file rw_fifo_file_perms;
Chris PeBenito c0868a
allow webalizer_t self:sock_file read_sock_file_perms;
Chris PeBenito 17de1b
allow webalizer_t self:shm create_shm_perms;
Chris PeBenito 17de1b
allow webalizer_t self:sem create_sem_perms;
Chris PeBenito 17de1b
allow webalizer_t self:msgq create_msgq_perms;
Chris PeBenito 17de1b
allow webalizer_t self:msg { send receive };
Chris PeBenito 17de1b
allow webalizer_t self:unix_dgram_socket create_socket_perms;
Chris PeBenito 17de1b
allow webalizer_t self:unix_stream_socket create_stream_socket_perms;
Chris PeBenito 17de1b
allow webalizer_t self:unix_dgram_socket sendto;
Chris PeBenito 17de1b
allow webalizer_t self:unix_stream_socket connectto;
Chris PeBenito 17de1b
allow webalizer_t self:tcp_socket connected_stream_socket_perms;
Chris PeBenito 17de1b
allow webalizer_t self:udp_socket { connect connected_socket_perms };
Chris PeBenito 17de1b
allow webalizer_t self:netlink_route_socket r_netlink_socket_perms;
Chris PeBenito 17de1b
Chris PeBenito 17de1b
allow webalizer_t webalizer_etc_t:file { getattr read };
Chris PeBenito 17de1b
Chris PeBenito c0868a
manage_dirs_pattern(webalizer_t,webalizer_tmp_t,webalizer_tmp_t)
Chris PeBenito c0868a
manage_files_pattern(webalizer_t,webalizer_tmp_t,webalizer_tmp_t)
Chris PeBenito 17de1b
files_tmp_filetrans(webalizer_t, webalizer_tmp_t, { file dir })
Chris PeBenito 17de1b
Chris PeBenito c0868a
manage_files_pattern(webalizer_t,webalizer_var_lib_t,webalizer_var_lib_t)
Chris PeBenito 17de1b
files_var_lib_filetrans(webalizer_t,webalizer_var_lib_t,file)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
kernel_read_kernel_sysctls(webalizer_t)
Chris PeBenito 17de1b
kernel_read_system_state(webalizer_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
corenet_non_ipsec_sendrecv(webalizer_t)
Chris PeBenito 17de1b
corenet_tcp_sendrecv_all_if(webalizer_t)
Chris PeBenito 17de1b
corenet_tcp_sendrecv_all_nodes(webalizer_t)
Chris PeBenito 17de1b
corenet_tcp_sendrecv_all_ports(webalizer_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
fs_search_auto_mountpoints(webalizer_t)
Chris PeBenito 6b19be
fs_getattr_xattr_fs(webalizer_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
files_read_etc_files(webalizer_t)
Chris PeBenito 17de1b
files_read_etc_runtime_files(webalizer_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
libs_use_ld_so(webalizer_t)
Chris PeBenito 17de1b
libs_use_shared_libs(webalizer_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
logging_list_logs(webalizer_t)
Chris PeBenito 17de1b
logging_send_syslog_msg(webalizer_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
miscfiles_read_localization(webalizer_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
sysnet_dns_name_resolve(webalizer_t)
Chris PeBenito 17de1b
sysnet_read_config(webalizer_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
userdom_use_unpriv_users_fds(webalizer_t)
Chris PeBenito 17de1b
userdom_dontaudit_search_all_users_home_content(webalizer_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
apache_read_log(webalizer_t)
Chris PeBenito 17de1b
apache_manage_sys_content(webalizer_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
ifdef(`targeted_policy',`
Chris PeBenito 17de1b
	term_use_generic_ptys(webalizer_t)
Chris PeBenito 17de1b
	term_use_unallocated_ttys(webalizer_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito c0868a
	cron_system_entry(webalizer_t,webalizer_exec_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito c0868a
	ftp_read_log(webalizer_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito c0868a
	nis_use_ypbind(webalizer_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito c0868a
	nscd_socket_use(webalizer_t)
Chris PeBenito 17de1b
')