Dominick Grift 327ed88
policy_module(ntop, 1.9.2)
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
########################################
Chris PeBenito 9401ae1
#
Chris PeBenito 9401ae1
# Declarations
Chris PeBenito 9401ae1
#
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
type ntop_t;
Chris PeBenito 9401ae1
type ntop_exec_t;
Chris PeBenito 9401ae1
init_daemon_domain(ntop_t, ntop_exec_t)
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
type ntop_initrc_exec_t;
Chris PeBenito 9401ae1
init_script_file(ntop_initrc_exec_t)
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
type ntop_etc_t;
Chris PeBenito 9401ae1
files_config_file(ntop_etc_t)
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
type ntop_tmp_t;
Chris PeBenito 9401ae1
files_tmp_file(ntop_tmp_t)
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
type ntop_var_lib_t;
Chris PeBenito 9401ae1
files_type(ntop_var_lib_t)
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
type ntop_var_run_t;
Chris PeBenito 9401ae1
files_pid_file(ntop_var_run_t)
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
########################################
Chris PeBenito 9401ae1
#
Chris PeBenito 9401ae1
# Local Policy
Chris PeBenito 9401ae1
#
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
allow ntop_t self:capability { net_raw setgid setuid sys_admin net_admin };
Chris PeBenito 9401ae1
dontaudit ntop_t self:capability sys_tty_config;
Chris PeBenito 9401ae1
allow ntop_t self:process signal_perms;
Chris PeBenito 9401ae1
allow ntop_t self:fifo_file rw_fifo_file_perms;
Dominick Grift 327ed88
allow ntop_t self:tcp_socket { accept listen };
Dominick Grift 327ed88
allow ntop_t self:unix_stream_socket { accept listen };
Chris PeBenito 9401ae1
allow ntop_t self:packet_socket create_socket_perms;
Chris PeBenito 9401ae1
allow ntop_t self:socket create_socket_perms;
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
allow ntop_t ntop_etc_t:dir list_dir_perms;
Dominick Grift 327ed88
allow ntop_t ntop_etc_t:file read_file_perms;
Dominick Grift 327ed88
allow ntop_t ntop_etc_t:lnk_file read_lnk_file_perms;
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
manage_dirs_pattern(ntop_t, ntop_tmp_t, ntop_tmp_t)
Chris PeBenito 9401ae1
manage_files_pattern(ntop_t, ntop_tmp_t, ntop_tmp_t)
Chris PeBenito 9401ae1
files_tmp_filetrans(ntop_t, ntop_tmp_t, { file dir })
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
manage_dirs_pattern(ntop_t, ntop_var_lib_t, ntop_var_lib_t)
Chris PeBenito 9401ae1
manage_files_pattern(ntop_t, ntop_var_lib_t, ntop_var_lib_t)
Chris PeBenito 9401ae1
files_var_lib_filetrans(ntop_t, ntop_var_lib_t, { file dir } )
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
manage_files_pattern(ntop_t, ntop_var_run_t, ntop_var_run_t)
Chris PeBenito 9401ae1
files_pid_filetrans(ntop_t, ntop_var_run_t, file)
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
kernel_request_load_module(ntop_t)
Chris PeBenito 9401ae1
kernel_read_system_state(ntop_t)
Chris PeBenito 9401ae1
kernel_read_network_state(ntop_t)
Chris PeBenito 9401ae1
kernel_read_kernel_sysctls(ntop_t)
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
corenet_all_recvfrom_unlabeled(ntop_t)
Chris PeBenito 9401ae1
corenet_all_recvfrom_netlabel(ntop_t)
Chris PeBenito 9401ae1
corenet_tcp_sendrecv_generic_if(ntop_t)
Chris PeBenito 9401ae1
corenet_raw_sendrecv_generic_if(ntop_t)
Chris PeBenito 9401ae1
corenet_tcp_sendrecv_generic_node(ntop_t)
Chris PeBenito 9401ae1
corenet_raw_sendrecv_generic_node(ntop_t)
Dominick Grift 327ed88
corenet_tcp_bind_generic_node(ntop_t)
Dominick Grift 327ed88
Dominick Grift 327ed88
corenet_sendrecv_ntop_server_packets(ntop_t)
Chris PeBenito 9401ae1
corenet_tcp_bind_ntop_port(ntop_t)
Dominick Grift 327ed88
corenet_sendrecv_ntop_client_packets(ntop_t)
Chris PeBenito 9401ae1
corenet_tcp_connect_ntop_port(ntop_t)
Dominick Grift 327ed88
corenet_tcp_sendrecv_ntop_port(ntop_t)
Dominick Grift 327ed88
Chris PeBenito 9401ae1
corenet_sendrecv_http_client_packets(ntop_t)
Dominick Grift 327ed88
corenet_tcp_connect_http_port(ntop_t)
Dominick Grift 327ed88
corenet_tcp_sendrecv_http_port(ntop_t)
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
dev_read_sysfs(ntop_t)
Chris PeBenito 9401ae1
dev_rw_generic_usb_dev(ntop_t)
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
domain_use_interactive_fds(ntop_t)
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
files_read_usr_files(ntop_t)
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
fs_getattr_all_fs(ntop_t)
Chris PeBenito 9401ae1
fs_search_auto_mountpoints(ntop_t)
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
auth_use_nsswitch(ntop_t)
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
logging_send_syslog_msg(ntop_t)
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
miscfiles_read_fonts(ntop_t)
Dominick Grift 327ed88
miscfiles_read_localization(ntop_t)
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
userdom_dontaudit_use_unpriv_user_fds(ntop_t)
Chris PeBenito 9401ae1
userdom_dontaudit_search_user_home_dirs(ntop_t)
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
optional_policy(`
Chris PeBenito 9401ae1
	apache_read_sys_content(ntop_t)
Chris PeBenito 9401ae1
')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
optional_policy(`
Chris PeBenito 9401ae1
	seutil_sigchld_newrole(ntop_t)
Chris PeBenito 9401ae1
')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
optional_policy(`
Chris PeBenito 9401ae1
	udev_read_db(ntop_t)
Chris PeBenito 9401ae1
')