Chris PeBenito 8d9352
Chris PeBenito 8d9352
policy_module(inn,1.0)
Chris PeBenito 8d9352
Chris PeBenito 8d9352
########################################
Chris PeBenito 8d9352
#
Chris PeBenito 8d9352
# Declarations
Chris PeBenito 8d9352
#
Chris PeBenito 8d9352
type innd_t;
Chris PeBenito 8d9352
type innd_exec_t;
Chris PeBenito 8d9352
init_daemon_domain(innd_t,innd_exec_t)
Chris PeBenito 8d9352
Chris PeBenito 8d9352
type innd_etc_t; #, usercanread;
Chris PeBenito 8d9352
files_type(innd_etc_t)
Chris PeBenito 8d9352
Chris PeBenito 8d9352
type innd_log_t;
Chris PeBenito 8d9352
logging_log_file(innd_log_t)
Chris PeBenito 8d9352
Chris PeBenito 8d9352
type innd_var_lib_t;
Chris PeBenito 8d9352
files_type(innd_var_lib_t)
Chris PeBenito 8d9352
Chris PeBenito 8d9352
type innd_var_run_t;
Chris PeBenito 8d9352
files_pid_file(innd_var_run_t)
Chris PeBenito 8d9352
Chris PeBenito 8d9352
type news_spool_t;
Chris PeBenito 8d9352
files_type(news_spool_t)
Chris PeBenito 8d9352
Chris PeBenito 8d9352
########################################
Chris PeBenito 8d9352
#
Chris PeBenito 8d9352
# Local policy
Chris PeBenito 8d9352
#
Chris PeBenito 8d9352
allow innd_t self:capability { dac_override kill setgid setuid };
Chris PeBenito 8d9352
dontaudit innd_t self:capability sys_tty_config;
Chris PeBenito 8d9352
allow innd_t self:process setsched;
Chris PeBenito 8d9352
allow innd_t self:fifo_file rw_file_perms;
Chris PeBenito 8d9352
allow innd_t self:tcp_socket create_stream_socket_perms;
Chris PeBenito 8d9352
allow innd_t self:udp_socket create_socket_perms;
Chris PeBenito 8d9352
allow innd_t self:unix_dgram_socket create_socket_perms;
Chris PeBenito 8d9352
allow innd_t self:unix_stream_socket { connectto create_stream_socket_perms };
Chris PeBenito 8d9352
Chris PeBenito 8d9352
allow innd_t innd_etc_t:file r_file_perms;
Chris PeBenito 8d9352
allow innd_t innd_etc_t:dir r_dir_perms;
Chris PeBenito 8d9352
allow innd_t innd_etc_t:lnk_file { getattr read };
Chris PeBenito 8d9352
Chris PeBenito 8d9352
can_exec(innd_t, innd_exec_t)
Chris PeBenito 8d9352
Chris PeBenito 8d9352
allow innd_t innd_log_t:file  { create ra_file_perms };
Chris PeBenito 8d9352
allow innd_t innd_log_t:dir { setattr ra_dir_perms };
Chris PeBenito 8d9352
logging_create_log(innd_t,innd_log_t)
Chris PeBenito 8d9352
Chris PeBenito 8d9352
allow innd_t innd_var_lib_t:dir create_dir_perms;
Chris PeBenito 8d9352
allow innd_t innd_var_lib_t:file create_file_perms;
Chris PeBenito 8d9352
files_create_var_lib(innd_t,innd_var_lib_t)
Chris PeBenito 8d9352
Chris PeBenito 8d9352
allow innd_t innd_var_run_t:dir create_dir_perms;
Chris PeBenito 8d9352
allow innd_t innd_var_run_t:file create_file_perms;
Chris PeBenito 8d9352
allow innd_t innd_var_run_t:sock_file create_file_perms;
Chris PeBenito 8d9352
files_create_pid(innd_t,innd_var_run_t)
Chris PeBenito 8d9352
Chris PeBenito 8d9352
allow innd_t news_spool_t:dir create_dir_perms;
Chris PeBenito 8d9352
allow innd_t news_spool_t:file create_file_perms;
Chris PeBenito 8d9352
allow innd_t news_spool_t:lnk_file create_lnk_perms;
Chris PeBenito 8d9352
Chris PeBenito 8d9352
kernel_read_kernel_sysctl(innd_t)
Chris PeBenito 8d9352
kernel_read_system_state(innd_t)
Chris PeBenito 8d9352
Chris PeBenito 8d9352
corenet_raw_sendrecv_all_if(innd_t)
Chris PeBenito 8d9352
corenet_tcp_sendrecv_all_if(innd_t)
Chris PeBenito 8d9352
corenet_udp_sendrecv_all_if(innd_t)
Chris PeBenito 8d9352
corenet_raw_sendrecv_all_nodes(innd_t)
Chris PeBenito 8d9352
corenet_tcp_sendrecv_all_nodes(innd_t)
Chris PeBenito 8d9352
corenet_udp_sendrecv_all_nodes(innd_t)
Chris PeBenito 8d9352
corenet_tcp_sendrecv_all_ports(innd_t)
Chris PeBenito 8d9352
corenet_udp_sendrecv_all_ports(innd_t)
Chris PeBenito 8d9352
corenet_tcp_bind_all_nodes(innd_t)
Chris PeBenito 8d9352
corenet_udp_bind_all_nodes(innd_t)
Chris PeBenito 8d9352
corenet_tcp_bind_innd_port(innd_t)
Chris PeBenito 8d9352
Chris PeBenito 8d9352
dev_read_sysfs(innd_t)
Chris PeBenito 8d9352
dev_read_urand(innd_t)
Chris PeBenito 8d9352
Chris PeBenito 8d9352
fs_getattr_all_fs(innd_t)
Chris PeBenito 8d9352
fs_search_auto_mountpoints(innd_t)
Chris PeBenito 8d9352
Chris PeBenito 8d9352
term_dontaudit_use_console(innd_t)
Chris PeBenito 8d9352
Chris PeBenito 8d9352
corecmd_exec_bin(innd_t)
Chris PeBenito 8d9352
corecmd_exec_shell(innd_t)
Chris PeBenito 8d9352
Chris PeBenito 8d9352
domain_use_wide_inherit_fd(innd_t)
Chris PeBenito 8d9352
Chris PeBenito 8d9352
files_list_spool(innd_t)
Chris PeBenito 8d9352
files_read_etc_files(innd_t)
Chris PeBenito 8d9352
files_read_etc_runtime_files(innd_t)
Chris PeBenito 8d9352
files_read_usr_files(innd_t)
Chris PeBenito 8d9352
Chris PeBenito 8d9352
init_use_fd(innd_t)
Chris PeBenito 8d9352
init_use_script_pty(innd_t)
Chris PeBenito 8d9352
Chris PeBenito 8d9352
libs_use_ld_so(innd_t)
Chris PeBenito 8d9352
libs_use_shared_libs(innd_t)
Chris PeBenito 8d9352
Chris PeBenito 8d9352
logging_send_syslog_msg(innd_t)
Chris PeBenito 8d9352
Chris PeBenito 8d9352
miscfiles_read_localization(innd_t)
Chris PeBenito 8d9352
Chris PeBenito 8d9352
seutil_dontaudit_search_config(innd_t)
Chris PeBenito 8d9352
Chris PeBenito 8d9352
sysnet_read_config(innd_t)
Chris PeBenito 8d9352
Chris PeBenito 8d9352
userdom_dontaudit_use_unpriv_user_fd(innd_t)
Chris PeBenito 8d9352
userdom_dontaudit_search_sysadm_home_dir(innd_t)
Chris PeBenito 8d9352
Chris PeBenito 8d9352
mta_send_mail(innd_t)
Chris PeBenito 8d9352
Chris PeBenito 8d9352
ifdef(`targeted_policy',`
Chris PeBenito 8d9352
	term_dontaudit_use_unallocated_tty(innd_t)
Chris PeBenito 8d9352
	term_dontaudit_use_generic_pty(innd_t)
Chris PeBenito 8d9352
	files_dontaudit_read_root_file(innd_t)
Chris PeBenito 8d9352
')
Chris PeBenito 8d9352
Chris PeBenito 8d9352
optional_policy(`cron.te',`
Chris PeBenito 8d9352
	cron_system_entry(innd_t, innd_exec_t)
Chris PeBenito 8d9352
')
Chris PeBenito 8d9352
Chris PeBenito 8d9352
optional_policy(`hostname.te',`
Chris PeBenito 8d9352
	hostname_exec(innd_t)
Chris PeBenito 8d9352
')
Chris PeBenito 8d9352
Chris PeBenito 8d9352
optional_policy(`mount.te',`
Chris PeBenito 8d9352
	mount_send_nfs_client_request(innd_t)
Chris PeBenito 8d9352
')
Chris PeBenito 8d9352
Chris PeBenito 8d9352
optional_policy(`nis.te',`
Chris PeBenito 8d9352
	nis_use_ypbind(innd_t)
Chris PeBenito 8d9352
')
Chris PeBenito 8d9352
Chris PeBenito 8d9352
optional_policy(`selinuxutil.te',`
Chris PeBenito 8d9352
	seutil_sigchld_newrole(innd_t)
Chris PeBenito 8d9352
')
Chris PeBenito 8d9352
Chris PeBenito 8d9352
optional_policy(`udev.te',`
Chris PeBenito 8d9352
	udev_read_db(innd_t)
Chris PeBenito 8d9352
')
Chris PeBenito 8d9352
Chris PeBenito 8d9352
ifdef(`TODO',`
Chris PeBenito 8d9352
optional_policy(`rhgb.te',`
Chris PeBenito 8d9352
	rhgb_domain(innd_t)
Chris PeBenito 8d9352
')
Chris PeBenito 8d9352
allow innd_t sysadm_t:unix_dgram_socket sendto;
Chris PeBenito 8d9352
')