2020-08-18 13:09:10 +00:00
|
|
|
policy_module(lldpad, 1.6.0)
|
2018-06-23 13:00:56 +00:00
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Declarations
|
|
|
|
#
|
|
|
|
|
|
|
|
type lldpad_t;
|
|
|
|
type lldpad_exec_t;
|
|
|
|
init_daemon_domain(lldpad_t, lldpad_exec_t)
|
|
|
|
|
|
|
|
type lldpad_initrc_exec_t;
|
|
|
|
init_script_file(lldpad_initrc_exec_t)
|
|
|
|
|
2019-09-11 00:05:46 +00:00
|
|
|
type lldpad_runtime_t alias lldpad_var_run_t;
|
2020-06-27 21:11:48 +00:00
|
|
|
files_runtime_file(lldpad_runtime_t)
|
2019-09-11 00:05:46 +00:00
|
|
|
|
2018-06-23 13:00:56 +00:00
|
|
|
type lldpad_tmpfs_t;
|
|
|
|
files_tmpfs_file(lldpad_tmpfs_t)
|
|
|
|
|
|
|
|
type lldpad_var_lib_t;
|
|
|
|
files_type(lldpad_var_lib_t)
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Local policy
|
|
|
|
#
|
|
|
|
|
|
|
|
allow lldpad_t self:capability { net_admin net_raw };
|
|
|
|
allow lldpad_t self:shm create_shm_perms;
|
|
|
|
allow lldpad_t self:fifo_file rw_fifo_file_perms;
|
|
|
|
allow lldpad_t self:unix_stream_socket { accept listen };
|
|
|
|
allow lldpad_t self:netlink_route_socket create_netlink_socket_perms;
|
|
|
|
allow lldpad_t self:packet_socket create_socket_perms;
|
|
|
|
allow lldpad_t self:udp_socket create_socket_perms;
|
|
|
|
|
|
|
|
manage_files_pattern(lldpad_t, lldpad_tmpfs_t, lldpad_tmpfs_t)
|
|
|
|
fs_tmpfs_filetrans(lldpad_t, lldpad_tmpfs_t, file)
|
|
|
|
|
|
|
|
manage_dirs_pattern(lldpad_t, lldpad_var_lib_t, lldpad_var_lib_t)
|
|
|
|
manage_files_pattern(lldpad_t, lldpad_var_lib_t, lldpad_var_lib_t)
|
|
|
|
|
2019-09-08 20:55:02 +00:00
|
|
|
manage_dirs_pattern(lldpad_t, lldpad_runtime_t, lldpad_runtime_t)
|
|
|
|
manage_files_pattern(lldpad_t, lldpad_runtime_t, lldpad_runtime_t)
|
|
|
|
manage_sock_files_pattern(lldpad_t, lldpad_runtime_t, lldpad_runtime_t)
|
2020-06-27 21:11:48 +00:00
|
|
|
files_runtime_filetrans(lldpad_t, lldpad_runtime_t, { dir file sock_file })
|
2018-06-23 13:00:56 +00:00
|
|
|
|
|
|
|
kernel_read_all_sysctls(lldpad_t)
|
|
|
|
kernel_read_network_state(lldpad_t)
|
|
|
|
kernel_request_load_module(lldpad_t)
|
|
|
|
|
|
|
|
dev_read_sysfs(lldpad_t)
|
|
|
|
|
|
|
|
files_read_etc_files(lldpad_t)
|
|
|
|
|
|
|
|
logging_send_syslog_msg(lldpad_t)
|
|
|
|
|
|
|
|
miscfiles_read_localization(lldpad_t)
|
|
|
|
|
|
|
|
optional_policy(`
|
|
|
|
fcoe_dgram_send_fcoemon(lldpad_t)
|
|
|
|
')
|