2009-09-02 12:58:52 +00:00
|
|
|
|
2010-02-19 16:53:19 +00:00
|
|
|
policy_module(shorewall, 1.0.1)
|
2009-09-02 12:58:52 +00:00
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Declarations
|
|
|
|
#
|
|
|
|
|
|
|
|
type shorewall_t;
|
|
|
|
type shorewall_exec_t;
|
|
|
|
init_daemon_domain(shorewall_t, shorewall_exec_t)
|
|
|
|
|
|
|
|
type shorewall_initrc_exec_t;
|
|
|
|
init_script_file(shorewall_initrc_exec_t)
|
|
|
|
|
|
|
|
# etc files
|
|
|
|
type shorewall_etc_t;
|
|
|
|
files_config_file(shorewall_etc_t)
|
|
|
|
|
|
|
|
# lock files
|
|
|
|
type shorewall_lock_t;
|
|
|
|
files_lock_file(shorewall_lock_t)
|
|
|
|
|
|
|
|
# tmp files
|
|
|
|
type shorewall_tmp_t;
|
|
|
|
files_tmp_file(shorewall_tmp_t)
|
|
|
|
|
|
|
|
# var/lib files
|
|
|
|
type shorewall_var_lib_t;
|
|
|
|
files_type(shorewall_var_lib_t)
|
|
|
|
|
2010-03-05 20:15:05 +00:00
|
|
|
type shorewall_log_t;
|
|
|
|
logging_log_file(shorewall_log_t)
|
|
|
|
|
2009-09-02 12:58:52 +00:00
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# shorewall local policy
|
|
|
|
#
|
|
|
|
|
|
|
|
allow shorewall_t self:capability { dac_override net_admin net_raw setuid setgid sys_nice sys_ptrace };
|
|
|
|
dontaudit shorewall_t self:capability sys_tty_config;
|
|
|
|
allow shorewall_t self:fifo_file rw_fifo_file_perms;
|
|
|
|
|
|
|
|
read_files_pattern(shorewall_t, shorewall_etc_t, shorewall_etc_t)
|
|
|
|
list_dirs_pattern(shorewall_t, shorewall_etc_t, shorewall_etc_t)
|
|
|
|
|
|
|
|
manage_files_pattern(shorewall_t, shorewall_lock_t, shorewall_lock_t)
|
|
|
|
files_lock_filetrans(shorewall_t, shorewall_lock_t, file)
|
|
|
|
|
2010-03-05 20:15:05 +00:00
|
|
|
manage_files_pattern(shorewall_t, shorewall_log_t, shorewall_log_t)
|
|
|
|
manage_dirs_pattern(shorewall_t, shorewall_log_t, shorewall_log_t)
|
|
|
|
logging_log_filetrans(shorewall_t, shorewall_log_t, { file dir })
|
|
|
|
|
2009-09-02 12:58:52 +00:00
|
|
|
manage_dirs_pattern(shorewall_t, shorewall_tmp_t, shorewall_tmp_t)
|
|
|
|
manage_files_pattern(shorewall_t, shorewall_tmp_t, shorewall_tmp_t)
|
|
|
|
files_tmp_filetrans(shorewall_t, shorewall_tmp_t, { file dir })
|
|
|
|
|
2010-03-08 15:00:55 +00:00
|
|
|
exec_files_pattern(shorewall_t, shorewall_var_lib_t, shorewall_var_lib_t)
|
|
|
|
manage_dirs_pattern(shorewall_t, shorewall_var_lib_t, shorewall_var_lib_t)
|
|
|
|
manage_files_pattern(shorewall_t, shorewall_var_lib_t, shorewall_var_lib_t)
|
|
|
|
files_var_lib_filetrans(shorewall_t, shorewall_var_lib_t, { dir file })
|
|
|
|
|
2009-09-02 12:58:52 +00:00
|
|
|
kernel_read_kernel_sysctls(shorewall_t)
|
|
|
|
kernel_read_network_state(shorewall_t)
|
|
|
|
kernel_read_system_state(shorewall_t)
|
|
|
|
kernel_rw_net_sysctls(shorewall_t)
|
|
|
|
|
|
|
|
corecmd_exec_bin(shorewall_t)
|
|
|
|
corecmd_exec_shell(shorewall_t)
|
|
|
|
|
|
|
|
dev_read_urand(shorewall_t)
|
|
|
|
|
|
|
|
domain_read_all_domains_state(shorewall_t)
|
|
|
|
|
|
|
|
files_getattr_kernel_modules(shorewall_t)
|
|
|
|
files_read_etc_files(shorewall_t)
|
|
|
|
files_read_usr_files(shorewall_t)
|
|
|
|
files_search_kernel_modules(shorewall_t)
|
|
|
|
|
|
|
|
fs_getattr_all_fs(shorewall_t)
|
|
|
|
|
|
|
|
init_rw_utmp(shorewall_t)
|
|
|
|
|
|
|
|
logging_send_syslog_msg(shorewall_t)
|
|
|
|
|
|
|
|
miscfiles_read_localization(shorewall_t)
|
|
|
|
|
|
|
|
sysnet_domtrans_ifconfig(shorewall_t)
|
|
|
|
|
2010-02-19 16:53:19 +00:00
|
|
|
userdom_dontaudit_list_user_home_dirs(shorewall_t)
|
|
|
|
|
2009-09-02 12:58:52 +00:00
|
|
|
optional_policy(`
|
|
|
|
iptables_domtrans(shorewall_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
optional_policy(`
|
|
|
|
modutils_domtrans_insmod(shorewall_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
optional_policy(`
|
|
|
|
ulogd_search_log(shorewall_t)
|
|
|
|
')
|