Chris PeBenito b9be5c
policy_module(shorewall, 1.1.1)
Chris PeBenito 625be1
Chris PeBenito 625be1
########################################
Chris PeBenito 625be1
#
Chris PeBenito 625be1
# Declarations
Chris PeBenito 625be1
#
Chris PeBenito 625be1
Chris PeBenito 625be1
type shorewall_t;
Chris PeBenito 625be1
type shorewall_exec_t;
Chris PeBenito 625be1
init_daemon_domain(shorewall_t, shorewall_exec_t)
Chris PeBenito 625be1
Chris PeBenito 625be1
type shorewall_initrc_exec_t;
Chris PeBenito 625be1
init_script_file(shorewall_initrc_exec_t)
Chris PeBenito 625be1
Chris PeBenito 625be1
# etc files
Chris PeBenito 625be1
type shorewall_etc_t;
Chris PeBenito 625be1
files_config_file(shorewall_etc_t)
Chris PeBenito 625be1
Chris PeBenito 625be1
# lock files
Chris PeBenito 625be1
type shorewall_lock_t;
Chris PeBenito 625be1
files_lock_file(shorewall_lock_t)
Chris PeBenito 625be1
Chris PeBenito 625be1
# tmp files
Chris PeBenito 625be1
type shorewall_tmp_t;
Chris PeBenito 625be1
files_tmp_file(shorewall_tmp_t)
Chris PeBenito 625be1
Chris PeBenito 625be1
# var/lib files
Chris PeBenito 625be1
type shorewall_var_lib_t;
Chris PeBenito 625be1
files_type(shorewall_var_lib_t)
Chris PeBenito 625be1
Jeremy Solt 3fcdc3
type shorewall_log_t;
Jeremy Solt 3fcdc3
logging_log_file(shorewall_log_t)
Jeremy Solt 3fcdc3
Chris PeBenito 625be1
########################################
Chris PeBenito 625be1
#
Chris PeBenito 625be1
# shorewall local policy
Chris PeBenito 625be1
#
Chris PeBenito 625be1
Chris PeBenito 625be1
allow shorewall_t self:capability { dac_override net_admin net_raw setuid setgid sys_nice sys_ptrace };
Chris PeBenito 625be1
dontaudit shorewall_t self:capability sys_tty_config;
Chris PeBenito 625be1
allow shorewall_t self:fifo_file rw_fifo_file_perms;
Chris PeBenito 625be1
Chris PeBenito 625be1
read_files_pattern(shorewall_t, shorewall_etc_t, shorewall_etc_t)
Chris PeBenito 625be1
list_dirs_pattern(shorewall_t, shorewall_etc_t, shorewall_etc_t)
Chris PeBenito 625be1
Chris PeBenito 625be1
manage_files_pattern(shorewall_t, shorewall_lock_t, shorewall_lock_t)
Chris PeBenito 625be1
files_lock_filetrans(shorewall_t, shorewall_lock_t, file)
Chris PeBenito 625be1
Jeremy Solt 3fcdc3
manage_files_pattern(shorewall_t, shorewall_log_t, shorewall_log_t)
Jeremy Solt 3fcdc3
manage_dirs_pattern(shorewall_t, shorewall_log_t, shorewall_log_t)
Jeremy Solt 3fcdc3
logging_log_filetrans(shorewall_t, shorewall_log_t, { file dir })
Jeremy Solt 3fcdc3
Chris PeBenito 625be1
manage_dirs_pattern(shorewall_t, shorewall_tmp_t, shorewall_tmp_t)
Chris PeBenito 625be1
manage_files_pattern(shorewall_t, shorewall_tmp_t, shorewall_tmp_t)
Chris PeBenito 625be1
files_tmp_filetrans(shorewall_t, shorewall_tmp_t, { file dir })
Chris PeBenito 625be1
Chris PeBenito e2e1b6
exec_files_pattern(shorewall_t, shorewall_var_lib_t, shorewall_var_lib_t)
Chris PeBenito e2e1b6
manage_dirs_pattern(shorewall_t, shorewall_var_lib_t, shorewall_var_lib_t)
Chris PeBenito e2e1b6
manage_files_pattern(shorewall_t, shorewall_var_lib_t, shorewall_var_lib_t)
Chris PeBenito e2e1b6
files_var_lib_filetrans(shorewall_t, shorewall_var_lib_t, { dir file })
Dan Walsh 3eaa99
allow shorewall_t shorewall_var_lib_t:file entrypoint;
Dan Walsh 3eaa99
Dan Walsh 3eaa99
allow shorewall_t shorewall_initrc_exec_t:file read_file_perms;
Chris PeBenito e2e1b6
Chris PeBenito 625be1
kernel_read_kernel_sysctls(shorewall_t)
Chris PeBenito 625be1
kernel_read_network_state(shorewall_t)
Chris PeBenito 625be1
kernel_read_system_state(shorewall_t)
Chris PeBenito 625be1
kernel_rw_net_sysctls(shorewall_t)
Chris PeBenito 625be1
Chris PeBenito 625be1
corecmd_exec_bin(shorewall_t)
Chris PeBenito 625be1
corecmd_exec_shell(shorewall_t)
Chris PeBenito 625be1
Chris PeBenito 625be1
dev_read_urand(shorewall_t)
Chris PeBenito 625be1
Chris PeBenito 625be1
domain_read_all_domains_state(shorewall_t)
Chris PeBenito 625be1
Chris PeBenito 625be1
files_getattr_kernel_modules(shorewall_t)
Chris PeBenito 625be1
files_read_etc_files(shorewall_t)
Chris PeBenito 625be1
files_read_usr_files(shorewall_t)
Chris PeBenito 625be1
files_search_kernel_modules(shorewall_t)
Chris PeBenito 625be1
Chris PeBenito 625be1
fs_getattr_all_fs(shorewall_t)
Chris PeBenito 625be1
Chris PeBenito 625be1
init_rw_utmp(shorewall_t)
Chris PeBenito 625be1
Dan Walsh 3eaa99
logging_read_generic_logs(shorewall_t)
Chris PeBenito 625be1
logging_send_syslog_msg(shorewall_t)
Chris PeBenito 625be1
Chris PeBenito 625be1
miscfiles_read_localization(shorewall_t)
Chris PeBenito 625be1
Chris PeBenito 625be1
sysnet_domtrans_ifconfig(shorewall_t)
Chris PeBenito 625be1
Dan Walsh 3eaa99
userdom_dontaudit_list_admin_dir(shorewall_t)
Dan Walsh 3eaa99
Dan Walsh 3eaa99
optional_policy(`
Dan Walsh 3eaa99
        brctl_domtrans(shorewall_t)
Dan Walsh 3eaa99
')
Chris PeBenito fa03ec
Chris PeBenito 625be1
optional_policy(`
Chris PeBenito b9be5c
	hostname_exec(shorewall_t)
Chris PeBenito b9be5c
')
Chris PeBenito b9be5c
Chris PeBenito b9be5c
optional_policy(`
Chris PeBenito 625be1
	iptables_domtrans(shorewall_t)
Chris PeBenito 625be1
')
Chris PeBenito 625be1
Chris PeBenito 625be1
optional_policy(`
Chris PeBenito 625be1
	modutils_domtrans_insmod(shorewall_t)
Chris PeBenito 625be1
')
Chris PeBenito 625be1
Chris PeBenito 625be1
optional_policy(`
Chris PeBenito 625be1
	ulogd_search_log(shorewall_t)
Chris PeBenito 625be1
')