|
Dominick Grift |
5812422 |
policy_module(awstats, 1.4.4)
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
########################################
|
|
|
1ec3d1a |
#
|
|
|
1ec3d1a |
# Declarations
|
|
|
1ec3d1a |
#
|
|
|
1ec3d1a |
|
|
|
6e8d52d |
## <desc>
|
|
Dominick Grift |
5812422 |
##
|
|
Dominick Grift |
5812422 |
## Determine whether awstats can
|
|
Dominick Grift |
5812422 |
## purge httpd log files.
|
|
Dominick Grift |
5812422 |
##
|
|
|
6e8d52d |
## </desc>
|
|
Dominick Grift |
5812422 |
gen_tunable(awstats_purge_apache_log_files, false)
|
|
|
6e8d52d |
|
|
|
1ec3d1a |
type awstats_t;
|
|
|
1ec3d1a |
type awstats_exec_t;
|
|
|
1ec3d1a |
domain_type(awstats_t)
|
|
|
1ec3d1a |
domain_entry_file(awstats_t, awstats_exec_t)
|
|
|
1ec3d1a |
role system_r types awstats_t;
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
type awstats_tmp_t;
|
|
|
1ec3d1a |
files_tmp_file(awstats_tmp_t)
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
type awstats_var_lib_t;
|
|
|
1ec3d1a |
files_type(awstats_var_lib_t)
|
|
|
1ec3d1a |
|
|
|
1f86dac |
apache_content_template(awstats)
|
|
|
1f86dac |
|
|
|
1ec3d1a |
########################################
|
|
|
1ec3d1a |
#
|
|
Dominick Grift |
78008b1 |
# Local policy
|
|
|
1ec3d1a |
#
|
|
|
1ec3d1a |
|
|
Dominick Grift |
78008b1 |
allow awstats_t self:fifo_file rw_fifo_file_perms;
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
manage_dirs_pattern(awstats_t, awstats_tmp_t, awstats_tmp_t)
|
|
|
1ec3d1a |
manage_files_pattern(awstats_t, awstats_tmp_t, awstats_tmp_t)
|
|
|
1ec3d1a |
files_tmp_filetrans(awstats_t, awstats_tmp_t, { dir file })
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
manage_files_pattern(awstats_t, awstats_var_lib_t, awstats_var_lib_t)
|
|
|
1ec3d1a |
|
|
Dominick Grift |
78008b1 |
allow awstats_t { httpd_awstats_content_t httpd_awstats_script_exec_t }:dir search_dir_perms;
|
|
Dominick Grift |
78008b1 |
|
|
Dominick Grift |
78008b1 |
can_exec(awstats_t, { awstats_exec_t httpd_awstats_script_exec_t })
|
|
Dominick Grift |
78008b1 |
|
|
|
1ec3d1a |
kernel_dontaudit_read_system_state(awstats_t)
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
corecmd_exec_bin(awstats_t)
|
|
|
1ec3d1a |
corecmd_exec_shell(awstats_t)
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
dev_read_urand(awstats_t)
|
|
|
1ec3d1a |
|
|
Dominick Grift |
78008b1 |
files_dontaudit_search_all_mountpoints(awstats_t)
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
fs_list_inotifyfs(awstats_t)
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
libs_read_lib_files(awstats_t)
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
logging_read_generic_logs(awstats_t)
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
sysnet_dns_name_resolve(awstats_t)
|
|
|
1ec3d1a |
|
|
Dominick Grift |
5812422 |
tunable_policy(`awstats_purge_apache_log_files',`
|
|
Dominick Grift |
5812422 |
apache_write_log(awstats_t)
|
|
|
6e8d52d |
')
|
|
|
6e8d52d |
|
|
|
6e8d52d |
optional_policy(`
|
|
|
6e8d52d |
apache_read_log(awstats_t)
|
|
|
6e8d52d |
')
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
optional_policy(`
|
|
|
1ec3d1a |
cron_system_entry(awstats_t, awstats_exec_t)
|
|
|
1ec3d1a |
')
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
optional_policy(`
|
|
|
1ec3d1a |
nscd_dontaudit_search_pid(awstats_t)
|
|
|
1ec3d1a |
')
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
optional_policy(`
|
|
|
1ec3d1a |
squid_read_log(awstats_t)
|
|
|
1ec3d1a |
')
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
########################################
|
|
|
1ec3d1a |
#
|
|
Dominick Grift |
78008b1 |
# CGI local policy
|
|
|
1ec3d1a |
#
|
|
|
1cbf235 |
|
|
|
1f86dac |
apache_read_log(httpd_awstats_script_t)
|
|
|
835c61e |
|
|
|
1f86dac |
manage_dirs_pattern(httpd_awstats_script_t, awstats_tmp_t, awstats_tmp_t)
|
|
|
1f86dac |
manage_files_pattern(httpd_awstats_script_t, awstats_tmp_t, awstats_tmp_t)
|
|
|
1f86dac |
files_tmp_filetrans(httpd_awstats_script_t, awstats_tmp_t, { dir file })
|
|
|
1ec3d1a |
|
|
|
1f86dac |
allow httpd_awstats_script_t awstats_var_lib_t:dir list_dir_perms;
|
|
|
1ec3d1a |
|
|
|
1f86dac |
read_files_pattern(httpd_awstats_script_t, awstats_var_lib_t, awstats_var_lib_t)
|
|
|
1f86dac |
files_search_var_lib(httpd_awstats_script_t)
|