selinux-policy/refpolicy/policy/modules/services/gatekeeper.te

131 lines
3.5 KiB
Plaintext
Raw Normal View History

2006-04-18 20:35:09 +00:00
policy_module(gatekeeper,1.0.0)
########################################
#
# Declarations
#
type gatekeeper_t;
type gatekeeper_exec_t;
init_daemon_domain(gatekeeper_t,gatekeeper_exec_t)
type gatekeeper_etc_t;
files_config_file(gatekeeper_etc_t)
type gatekeeper_log_t;
logging_log_file(gatekeeper_log_t)
# for stupid symlinks
type gatekeeper_tmp_t;
files_tmp_file(gatekeeper_tmp_t)
type gatekeeper_var_run_t;
files_pid_file(gatekeeper_var_run_t)
########################################
#
# Local policy
#
dontaudit gatekeeper_t self:capability sys_tty_config;
allow gatekeeper_t self:process { setsched signal_perms };
allow gatekeeper_t self:fifo_file rw_file_perms;
allow gatekeeper_t self:tcp_socket create_stream_socket_perms;
allow gatekeeper_t self:udp_socket create_socket_perms;
allow gatekeeper_t gatekeeper_etc_t:lnk_file { getattr read };
allow gatekeeper_t gatekeeper_etc_t:file { getattr read };
files_search_etc(gatekeeper_t)
allow gatekeeper_t gatekeeper_log_t:file create_file_perms;
allow gatekeeper_t gatekeeper_log_t:dir rw_dir_perms;
logging_log_filetrans(gatekeeper_t,gatekeeper_log_t,{ file dir })
allow gatekeeper_t gatekeeper_tmp_t:dir create_dir_perms;
allow gatekeeper_t gatekeeper_tmp_t:file create_file_perms;
files_tmp_filetrans(gatekeeper_t, gatekeeper_tmp_t, { file dir })
allow gatekeeper_t gatekeeper_var_run_t:file create_file_perms;
allow gatekeeper_t gatekeeper_var_run_t:dir rw_dir_perms;
files_pid_filetrans(gatekeeper_t,gatekeeper_var_run_t,file)
kernel_read_system_state(gatekeeper_t)
kernel_read_kernel_sysctls(gatekeeper_t)
corecmd_list_sbin(gatekeeper_t)
corenet_non_ipsec_sendrecv(gatekeeper_t)
corenet_tcp_sendrecv_generic_if(gatekeeper_t)
corenet_udp_sendrecv_generic_if(gatekeeper_t)
corenet_raw_sendrecv_generic_if(gatekeeper_t)
corenet_tcp_sendrecv_all_nodes(gatekeeper_t)
corenet_udp_sendrecv_all_nodes(gatekeeper_t)
corenet_raw_sendrecv_all_nodes(gatekeeper_t)
corenet_tcp_sendrecv_all_ports(gatekeeper_t)
corenet_udp_sendrecv_all_ports(gatekeeper_t)
corenet_tcp_bind_all_nodes(gatekeeper_t)
corenet_udp_bind_all_nodes(gatekeeper_t)
corenet_tcp_bind_gatekeeper_port(gatekeeper_t)
corenet_udp_bind_gatekeeper_port(gatekeeper_t)
dev_read_sysfs(gatekeeper_t)
# for SSP
dev_read_urand(gatekeeper_t)
domain_use_interactive_fds(gatekeeper_t)
files_read_etc_files(gatekeeper_t)
fs_getattr_all_fs(gatekeeper_t)
fs_search_auto_mountpoints(gatekeeper_t)
term_dontaudit_use_console(gatekeeper_t)
init_use_fds(gatekeeper_t)
init_use_script_ptys(gatekeeper_t)
libs_use_ld_so(gatekeeper_t)
libs_use_shared_libs(gatekeeper_t)
logging_send_syslog_msg(gatekeeper_t)
miscfiles_read_localization(gatekeeper_t)
sysnet_read_config(gatekeeper_t)
userdom_dontaudit_use_unpriv_user_fds(gatekeeper_t)
userdom_dontaudit_search_sysadm_home_dirs(gatekeeper_t)
ifdef(`targeted_policy',`
term_dontaudit_use_unallocated_ttys(gatekeeper_t)
term_dontaudit_use_generic_ptys(gatekeeper_t)
files_dontaudit_read_root_files(gatekeeper_t)
')
optional_policy(`
nis_use_ypbind(gatekeeper_t)
')
optional_policy(`
seutil_sigchld_newrole(gatekeeper_t)
')
optional_policy(`
udev_read_db(gatekeeper_t)
')
ifdef(`TODO',`
# for local users to run VOIP software
allow userdomain gatekeeper_t:udp_socket sendto;
allow gatekeeper_t userdomain:udp_socket recvfrom;
allow gatekeeper_t userdomain:udp_socket sendto;
allow userdomain gatekeeper_t:udp_socket recvfrom;
allow gatekeeper_t userdomain:tcp_socket { connectto recvfrom };
allow userdomain gatekeeper_t:tcp_socket { acceptfrom recvfrom };
kernel_tcp_recvfrom(gatekeeper_t)
kernel_tcp_recvfrom(userdomain)
')