## Intel LLDP Agent.
#######################################
##
## Transition to lldpad.
##
##
##
## Domain allowed to transition.
##
##
#
interface(`lldpad_domtrans',`
gen_require(`
type lldpad_t, lldpad_exec_t;
')
corecmd_search_bin($1)
domtrans_pattern($1, lldpad_exec_t, lldpad_t)
')
#######################################
##
## Send to lldpad with a unix dgram socket.
##
##
##
## Domain allowed access.
##
##
#
interface(`lldpad_dgram_send',`
gen_require(`
type lldpad_t, lldpad_var_run_t;
')
files_search_pids($1)
dgram_send_pattern($1, lldpad_var_run_t, lldpad_var_run_t, lldpad_t)
')
########################################
##
## All of the rules required to
## administrate an lldpad environment.
##
##
##
## Domain allowed access.
##
##
##
##
## Role allowed access.
##
##
##
#
interface(`lldpad_admin',`
gen_require(`
type lldpad_t, lldpad_initrc_exec_t, lldpad_var_lib_t;
type lldpad_var_run_t;
')
allow $1 lldpad_t:process { signal_perms };
ps_process_pattern($1, lldpad_t)
tunable_policy(`deny_ptrace',`',`
allow $1 lldpad_t:process ptrace;
')
init_labeled_script_domtrans($1, lldpad_initrc_exec_t)
domain_system_change_exemption($1)
role_transition $2 lldpad_initrc_exec_t system_r;
allow $2 system_r;
files_search_var_lib($1)
admin_pattern($1, lldpad_var_lib_t)
files_search_pids($1)
admin_pattern($1, lldpad_var_run_t)
')
########################################
##
## Allow relabel lldpad_tmpfs_t
##
##
##
## Domain allowed access.
##
##
#
interface(`lldpad_relabel_tmpfs',`
gen_require(`
type lldpad_tmpfs_t;
')
allow $1 lldpad_tmpfs_t:file relabelfrom;
allow $1 lldpad_tmpfs_t:file relabelto;
')