selinux-policy/refpolicy/policy/modules/system/iptables.te

127 lines
3.2 KiB
Plaintext
Raw Normal View History

2005-04-29 20:16:38 +00:00
2005-05-02 18:36:51 +00:00
policy_module(iptables, 1.0)
2005-04-29 20:16:38 +00:00
########################################
#
# Declarations
#
type iptables_t;
type iptables_exec_t;
init_make_system_domain(iptables_t,iptables_exec_t)
2005-05-04 17:01:46 +00:00
role system_r types iptables_t;
2005-04-29 20:16:38 +00:00
type iptables_tmp_t;
files_make_temporary_file(iptables_tmp_t)
2005-04-29 20:16:38 +00:00
type iptables_var_run_t;
files_make_daemon_runtime_file(iptables_var_run_t)
2005-04-29 20:16:38 +00:00
########################################
#
# Iptables local policy
#
allow iptables_t self:capability { net_admin net_raw };
2005-05-04 17:01:46 +00:00
dontaudit iptables_t self:capability sys_tty_config;
allow iptables_t self:process { sigchld sigkill sigstop signull signal };
2005-04-29 20:16:38 +00:00
2005-06-09 14:50:48 +00:00
allow iptables_t iptables_var_run_t:dir rw_dir_perms;
2005-05-04 17:01:46 +00:00
files_create_daemon_runtime_data(iptables_t,iptables_var_run_t)
2005-04-29 20:16:38 +00:00
2005-06-09 14:50:48 +00:00
can_exec(iptables_t,iptables_exec_t)
2005-04-29 20:16:38 +00:00
2005-06-09 14:50:48 +00:00
allow iptables_t iptables_tmp_t:dir create_dir_perms;
allow iptables_t iptables_tmp_t:file create_file_perms;
2005-04-29 20:16:38 +00:00
files_create_private_tmp_data(iptables_t, iptables_tmp_t, { file dir })
2005-06-09 14:50:48 +00:00
allow iptables_t self:rawip_socket create_socket_perms;
2005-04-29 20:16:38 +00:00
kernel_read_system_state(iptables_t)
kernel_read_network_state(iptables_t)
2005-05-04 17:01:46 +00:00
kernel_read_hardware_state(iptables_t)
kernel_read_kernel_sysctl(iptables_t)
kernel_read_modprobe_sysctl(iptables_t)
kernel_use_file_descriptors(iptables_t)
2005-04-29 20:16:38 +00:00
2005-06-08 13:12:00 +00:00
fs_get_persistent_fs_attributes(iptables_t)
2005-04-29 20:16:38 +00:00
2005-05-04 17:01:46 +00:00
terminal_ignore_use_console(iptables_t)
domain_use_widely_inheritable_file_descriptors(iptables_t)
2005-04-29 20:16:38 +00:00
files_read_general_system_config(iptables_t)
init_use_file_descriptors(iptables_t)
init_script_use_pseudoterminal(iptables_t)
# to allow rules to be saved on reboot:
init_script_modify_temporary_data(iptables_t)
2005-05-04 17:01:46 +00:00
libraries_use_dynamic_loader(iptables_t)
libraries_use_shared_libraries(iptables_t)
2005-05-04 17:01:46 +00:00
2005-04-29 20:16:38 +00:00
logging_send_system_log_message(iptables_t)
# system-config-network appends to /var/log
#logging_append_system_logs(iptables_t)
miscfiles_read_localization(iptables_t)
2005-05-04 17:01:46 +00:00
sysnetwork_ifconfig_transition(iptables_t)
userdomain_use_all_users_file_descriptors(iptables_t)
tunable_policy(`use_dns',`
2005-06-09 14:50:48 +00:00
allow iptables_t self:udp_socket create_socket_perms;
2005-05-31 23:02:11 +00:00
corenetwork_sendrecv_udp_on_all_interfaces(iptables_t)
corenetwork_sendrecv_raw_on_all_interfaces(iptables_t)
corenetwork_sendrecv_udp_on_all_nodes(iptables_t)
corenetwork_sendrecv_raw_on_all_nodes(iptables_t)
2005-05-31 23:02:11 +00:00
corenetwork_bind_udp_on_all_nodes(iptables_t)
corenetwork_sendrecv_udp_on_dns_port(iptables_t)
2005-05-31 23:02:11 +00:00
sysnetwork_read_network_config(iptables_t)
')
2005-04-29 20:16:38 +00:00
optional_policy(`modutils.te', `
2005-05-31 23:02:11 +00:00
corecommands_search_system_programs_directory(iptables_t)
modutils_insmod_transition(iptables_t)
2005-04-29 20:16:38 +00:00
')
2005-05-04 17:01:46 +00:00
optional_policy(`selinux.te',`
2005-05-31 23:02:11 +00:00
selinux_newrole_sigchld(iptables_t)
2005-05-04 17:01:46 +00:00
')
optional_policy(`udev.te', `
2005-05-31 23:02:11 +00:00
udev_read_database(iptables_t)
2005-05-04 17:01:46 +00:00
')
ifdef(`targeted_policy', `
2005-05-31 23:02:11 +00:00
terminal_ignore_use_general_physical_terminal(iptables_t)
terminal_ignore_use_general_pseudoterminal(iptables_t)
files_ignore_read_rootfs_file(iptables_t)
2005-05-04 17:01:46 +00:00
')
2005-04-29 20:16:38 +00:00
ifdef(`TODO',`
2005-05-04 17:01:46 +00:00
optional_policy(`rhgb.te', `
allow iptables_t rhgb_t:process sigchld;
allow iptables_t rhgb_t:fd use;
2005-06-09 14:50:48 +00:00
allow iptables_t rhgb_t:fifo_file rw_file_perms;
2005-05-04 17:01:46 +00:00
')
2005-04-29 20:16:38 +00:00
allow iptables_t autofs_t:dir { search getattr };
2005-04-29 20:16:38 +00:00
# for iptables -L
can_ypbind(iptables_t)
optional_policy(`gnome-pty-helper.te',`
allow iptables_t sysadm_gph_t:fd use;
')
2005-04-29 20:16:38 +00:00
optional_policy(`firstboot.te', `
allow iptables_t firstboot_t:fifo_file write;
2005-04-29 20:16:38 +00:00
')
') dnl ifdef TODO