Chris PeBenito 17de1b
Chris PeBenito 17de1b
policy_module(imaze,1.0.2)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
# Declarations
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type imazesrv_t;
Chris PeBenito 17de1b
type imazesrv_exec_t;
Chris PeBenito 17de1b
init_daemon_domain(imazesrv_t,imazesrv_exec_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type imazesrv_data_t;
Chris PeBenito 17de1b
files_type(imazesrv_data_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type imazesrv_data_labs_t;
Chris PeBenito 17de1b
files_type(imazesrv_data_labs_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type imazesrv_log_t;
Chris PeBenito 17de1b
logging_log_file(imazesrv_log_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type imazesrv_var_run_t;
Chris PeBenito 17de1b
files_pid_file(imazesrv_var_run_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
# Local policy
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
Chris PeBenito 17de1b
dontaudit imazesrv_t self:capability sys_tty_config;
Chris PeBenito 17de1b
allow imazesrv_t self:process ~{ ptrace setcurrent setexec setfscreate setrlimit execmem execstack execheap };
Chris PeBenito 17de1b
allow imazesrv_t self:fd use;
Chris PeBenito 17de1b
allow imazesrv_t self:fifo_file rw_file_perms;
Chris PeBenito 17de1b
allow imazesrv_t self:unix_dgram_socket { create_socket_perms sendto };
Chris PeBenito 17de1b
allow imazesrv_t self:unix_stream_socket { create_stream_socket_perms connectto };
Chris PeBenito 17de1b
allow imazesrv_t self:shm create_shm_perms;
Chris PeBenito 17de1b
allow imazesrv_t self:sem create_sem_perms;
Chris PeBenito 17de1b
allow imazesrv_t self:msgq create_msgq_perms;
Chris PeBenito 17de1b
allow imazesrv_t self:msg { send receive };
Chris PeBenito 17de1b
allow imazesrv_t self:tcp_socket create_stream_socket_perms;
Chris PeBenito 17de1b
allow imazesrv_t self:udp_socket create_socket_perms;
Chris PeBenito 17de1b
Chris PeBenito 17de1b
allow imazesrv_t imazesrv_data_t:dir list_dir_perms;
Chris PeBenito 17de1b
allow imazesrv_t imazesrv_data_t:file read_file_perms;
Chris PeBenito 17de1b
allow imazesrv_t imazesrv_data_t:lnk_file { getattr read };
Chris PeBenito 17de1b
Chris PeBenito 17de1b
allow imazesrv_t imazesrv_log_t:file manage_file_perms;
Chris PeBenito 17de1b
allow imazesrv_t imazesrv_log_t:dir ra_dir_perms;
Chris PeBenito 17de1b
logging_log_filetrans(imazesrv_t,imazesrv_log_t,file)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
allow imazesrv_t imazesrv_var_run_t:file manage_file_perms;
Chris PeBenito 17de1b
allow imazesrv_t imazesrv_var_run_t:dir rw_dir_perms;
Chris PeBenito 17de1b
files_pid_filetrans(imazesrv_t,imazesrv_var_run_t,file)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
kernel_read_kernel_sysctls(imazesrv_t)
Chris PeBenito 17de1b
kernel_list_proc(imazesrv_t)
Chris PeBenito 17de1b
kernel_read_proc_symlinks(imazesrv_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
corenet_non_ipsec_sendrecv(imazesrv_t)
Chris PeBenito 17de1b
corenet_tcp_sendrecv_generic_if(imazesrv_t)
Chris PeBenito 17de1b
corenet_udp_sendrecv_generic_if(imazesrv_t)
Chris PeBenito 17de1b
corenet_tcp_sendrecv_all_nodes(imazesrv_t)
Chris PeBenito 17de1b
corenet_udp_sendrecv_all_nodes(imazesrv_t)
Chris PeBenito 17de1b
corenet_tcp_sendrecv_all_ports(imazesrv_t)
Chris PeBenito 17de1b
corenet_udp_sendrecv_all_ports(imazesrv_t)
Chris PeBenito 17de1b
corenet_tcp_bind_all_nodes(imazesrv_t)
Chris PeBenito 17de1b
corenet_udp_bind_all_nodes(imazesrv_t)
Chris PeBenito 17de1b
corenet_tcp_bind_imaze_port(imazesrv_t)
Chris PeBenito 17de1b
corenet_udp_bind_imaze_port(imazesrv_t)
Chris PeBenito 17de1b
corenet_sendrecv_imaze_server_packets(imazesrv_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
dev_read_sysfs(imazesrv_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
domain_use_interactive_fds(imazesrv_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
files_read_etc_files(imazesrv_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
fs_getattr_all_fs(imazesrv_t)
Chris PeBenito 17de1b
fs_search_auto_mountpoints(imazesrv_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
term_dontaudit_use_console(imazesrv_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
init_use_fds(imazesrv_t)
Chris PeBenito 17de1b
init_use_script_ptys(imazesrv_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
libs_use_ld_so(imazesrv_t)
Chris PeBenito 17de1b
libs_use_shared_libs(imazesrv_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
logging_send_syslog_msg(imazesrv_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
miscfiles_read_localization(imazesrv_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
sysnet_read_config(imazesrv_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
userdom_use_unpriv_users_fds(imazesrv_t)
Chris PeBenito 17de1b
userdom_dontaudit_search_sysadm_home_dirs(imazesrv_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
ifdef(`targeted_policy',`
Chris PeBenito 17de1b
	term_dontaudit_use_unallocated_ttys(imazesrv_t)
Chris PeBenito 17de1b
	term_dontaudit_use_generic_ptys(imazesrv_t)
Chris PeBenito 17de1b
	files_dontaudit_read_root_files(imazesrv_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito 17de1b
	nis_use_ypbind(imazesrv_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito 17de1b
	seutil_sigchld_newrole(imazesrv_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito 17de1b
	udev_read_db(imazesrv_t)
Chris PeBenito 17de1b
')