Chris PeBenito e3e37e
Chris PeBenito 141cff
policy_module(ntop,1.0.1)
Chris PeBenito e3e37e
Chris PeBenito e3e37e
########################################
Chris PeBenito e3e37e
#
Chris PeBenito e3e37e
# Declarations
Chris PeBenito e3e37e
#
Chris PeBenito e3e37e
Chris PeBenito e3e37e
type ntop_t;
Chris PeBenito e3e37e
type ntop_exec_t;
Chris PeBenito e3e37e
init_daemon_domain(ntop_t,ntop_exec_t)
Chris PeBenito e3e37e
Chris PeBenito e3e37e
type ntop_etc_t;
Chris PeBenito e3e37e
files_config_file(ntop_etc_t)
Chris PeBenito e3e37e
Chris PeBenito e3e37e
type ntop_http_content_t;
Chris PeBenito e3e37e
files_type(ntop_http_content_t)
Chris PeBenito e3e37e
Chris PeBenito e3e37e
type ntop_tmp_t;
Chris PeBenito e3e37e
files_tmp_file(ntop_tmp_t)
Chris PeBenito e3e37e
Chris PeBenito e3e37e
type ntop_var_lib_t;
Chris PeBenito e3e37e
files_type(ntop_var_lib_t)
Chris PeBenito e3e37e
Chris PeBenito e3e37e
type ntop_var_run_t;
Chris PeBenito e3e37e
files_pid_file(ntop_var_run_t)
Chris PeBenito e3e37e
Chris PeBenito e3e37e
########################################
Chris PeBenito e3e37e
#
Chris PeBenito e3e37e
# Local Policy
Chris PeBenito e3e37e
#
Chris PeBenito e3e37e
Chris PeBenito e3e37e
allow ntop_t self:capability { net_raw setgid setuid sys_admin net_admin };
Chris PeBenito e3e37e
dontaudit ntop_t self:capability sys_tty_config;
Chris PeBenito e3e37e
allow ntop_t self:process signal_perms;
Chris PeBenito e3e37e
allow ntop_t self:fifo_file { read write };
Chris PeBenito e3e37e
allow ntop_t self:tcp_socket create_stream_socket_perms;
Chris PeBenito e3e37e
allow ntop_t self:udp_socket create_socket_perms;
Chris PeBenito e3e37e
allow ntop_t self:packet_socket create_socket_perms;
Chris PeBenito e3e37e
Chris PeBenito e3e37e
allow ntop_t ntop_etc_t:file r_file_perms;
Chris PeBenito e3e37e
allow ntop_t ntop_etc_t:dir r_dir_perms;
Chris PeBenito e3e37e
allow ntop_t ntop_etc_t:lnk_file { getattr read };
Chris PeBenito e3e37e
Chris PeBenito e3e37e
allow ntop_t ntop_http_content_t:file r_file_perms;
Chris PeBenito e3e37e
allow ntop_t ntop_http_content_t:dir r_dir_perms;
Chris PeBenito e3e37e
Chris PeBenito e3e37e
allow ntop_t ntop_tmp_t:dir create_dir_perms;
Chris PeBenito e3e37e
allow ntop_t ntop_tmp_t:file create_file_perms;
Chris PeBenito e3e37e
files_tmp_filetrans(ntop_t, ntop_tmp_t, { file dir })
Chris PeBenito e3e37e
Chris PeBenito e3e37e
allow ntop_t ntop_var_lib_t:file create_file_perms;
Chris PeBenito e3e37e
allow ntop_t ntop_var_lib_t:dir { create rw_dir_perms };
Chris PeBenito e3e37e
files_var_lib_filetrans(ntop_t,ntop_var_lib_t,file)
Chris PeBenito e3e37e
Chris PeBenito e3e37e
allow ntop_t ntop_var_run_t:file manage_file_perms;
Chris PeBenito e3e37e
allow ntop_t ntop_var_run_t:dir rw_dir_perms;
Chris PeBenito e3e37e
files_pid_filetrans(ntop_t,ntop_var_run_t,file)
Chris PeBenito e3e37e
Chris PeBenito e3e37e
kernel_read_network_state(ntop_t)
Chris PeBenito e3e37e
kernel_read_kernel_sysctls(ntop_t)
Chris PeBenito e3e37e
kernel_list_proc(ntop_t)
Chris PeBenito e3e37e
kernel_read_proc_symlinks(ntop_t)
Chris PeBenito e3e37e
Chris PeBenito 141cff
corenet_non_ipsec_sendrecv(ntop_t)
Chris PeBenito e3e37e
corenet_tcp_sendrecv_generic_if(ntop_t)
Chris PeBenito e3e37e
corenet_udp_sendrecv_generic_if(ntop_t)
Chris PeBenito e3e37e
corenet_raw_sendrecv_generic_if(ntop_t)
Chris PeBenito e3e37e
corenet_tcp_sendrecv_all_nodes(ntop_t)
Chris PeBenito e3e37e
corenet_udp_sendrecv_all_nodes(ntop_t)
Chris PeBenito e3e37e
corenet_raw_sendrecv_all_nodes(ntop_t)
Chris PeBenito e3e37e
corenet_tcp_sendrecv_all_ports(ntop_t)
Chris PeBenito e3e37e
corenet_udp_sendrecv_all_ports(ntop_t)
Chris PeBenito e3e37e
Chris PeBenito e3e37e
dev_read_sysfs(ntop_t)
Chris PeBenito e3e37e
Chris PeBenito e3e37e
domain_use_interactive_fds(ntop_t)
Chris PeBenito e3e37e
Chris PeBenito e3e37e
files_read_etc_files(ntop_t)
Chris PeBenito e3e37e
Chris PeBenito e3e37e
fs_getattr_all_fs(ntop_t)
Chris PeBenito e3e37e
fs_search_auto_mountpoints(ntop_t)
Chris PeBenito e3e37e
Chris PeBenito e3e37e
term_dontaudit_use_console(ntop_t)
Chris PeBenito e3e37e
Chris PeBenito e3e37e
init_use_fds(ntop_t)
Chris PeBenito e3e37e
init_use_script_ptys(ntop_t)
Chris PeBenito e3e37e
Chris PeBenito e3e37e
libs_use_ld_so(ntop_t)
Chris PeBenito e3e37e
libs_use_shared_libs(ntop_t)
Chris PeBenito e3e37e
Chris PeBenito e3e37e
logging_send_syslog_msg(ntop_t)
Chris PeBenito e3e37e
Chris PeBenito e3e37e
miscfiles_read_localization(ntop_t)
Chris PeBenito e3e37e
Chris PeBenito e3e37e
sysnet_read_config(ntop_t)
Chris PeBenito e3e37e
Chris PeBenito e3e37e
userdom_dontaudit_use_unpriv_user_fds(ntop_t)
Chris PeBenito e3e37e
userdom_dontaudit_search_sysadm_home_dirs(ntop_t)
Chris PeBenito e3e37e
Chris PeBenito e3e37e
ifdef(`targeted_policy',`
Chris PeBenito e3e37e
	term_dontaudit_use_unallocated_ttys(ntop_t)
Chris PeBenito e3e37e
	term_dontaudit_use_generic_ptys(ntop_t)
Chris PeBenito e3e37e
	files_dontaudit_read_root_files(ntop_t)
Chris PeBenito e3e37e
')
Chris PeBenito e3e37e
Chris PeBenito e3e37e
optional_policy(`
Chris PeBenito e3e37e
	seutil_sigchld_newrole(ntop_t)
Chris PeBenito e3e37e
')
Chris PeBenito e3e37e
Chris PeBenito e3e37e
optional_policy(`
Chris PeBenito e3e37e
	udev_read_db(ntop_t)
Chris PeBenito e3e37e
')