Blob Blame History Raw
policy_module(fcoemon, 1.0.0)

########################################
#
# Declarations
#

type fcoemon_t;
type fcoemon_exec_t;
init_daemon_domain(fcoemon_t, fcoemon_exec_t)

type fcoemon_var_run_t;
files_pid_file(fcoemon_var_run_t)

########################################
#
# fcoemon local policy
#

# dac_override
# /var/rnn/fcm/fcm_clif socket is owned by root
allow fcoemon_t self:capability { net_admin dac_override };
allow fcoemon_t self:capability { kill };

allow fcoemon_t self:fifo_file rw_fifo_file_perms;
allow fcoemon_t self:unix_stream_socket create_stream_socket_perms;
allow fcoemon_t self:netlink_socket create_socket_perms;
allow fcoemon_t self:netlink_route_socket create_netlink_socket_perms;

manage_dirs_pattern(fcoemon_t, fcoemon_var_run_t, fcoemon_var_run_t)
manage_files_pattern(fcoemon_t, fcoemon_var_run_t, fcoemon_var_run_t)
manage_sock_files_pattern(fcoemon_t, fcoemon_var_run_t, fcoemon_var_run_t)
files_pid_filetrans(fcoemon_t, fcoemon_var_run_t, { dir file sock_file })

files_read_etc_files(fcoemon_t)

dev_read_sysfs(fcoemon_t)

logging_send_syslog_msg(fcoemon_t)

optional_policy(`
	lldpad_dgram_send(fcoemon_t)
')