2020-08-18 13:09:10 +00:00
|
|
|
policy_module(lircd, 1.7.0)
|
2018-06-23 13:00:56 +00:00
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Declarations
|
|
|
|
#
|
|
|
|
|
|
|
|
type lircd_t;
|
|
|
|
type lircd_exec_t;
|
|
|
|
init_daemon_domain(lircd_t, lircd_exec_t)
|
|
|
|
|
|
|
|
type lircd_initrc_exec_t;
|
|
|
|
init_script_file(lircd_initrc_exec_t)
|
|
|
|
|
|
|
|
type lircd_etc_t;
|
|
|
|
files_type(lircd_etc_t)
|
|
|
|
|
2019-09-08 20:55:02 +00:00
|
|
|
type lircd_runtime_t alias lircd_var_run_t;
|
2020-06-27 21:11:48 +00:00
|
|
|
files_runtime_file(lircd_runtime_t)
|
2018-06-23 13:00:56 +00:00
|
|
|
|
2019-09-11 00:05:46 +00:00
|
|
|
type lircd_unit_t;
|
|
|
|
init_unit_file(lircd_unit_t)
|
|
|
|
|
2018-06-23 13:00:56 +00:00
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Local policy
|
|
|
|
#
|
|
|
|
|
|
|
|
allow lircd_t self:capability { chown kill sys_admin };
|
|
|
|
allow lircd_t self:process signal;
|
|
|
|
allow lircd_t self:fifo_file rw_fifo_file_perms;
|
|
|
|
allow lircd_t self:tcp_socket { accept listen };
|
|
|
|
|
|
|
|
read_files_pattern(lircd_t, lircd_etc_t, lircd_etc_t)
|
|
|
|
|
2019-09-08 20:55:02 +00:00
|
|
|
manage_dirs_pattern(lircd_t, lircd_runtime_t, lircd_runtime_t)
|
|
|
|
manage_files_pattern(lircd_t, lircd_runtime_t, lircd_runtime_t)
|
|
|
|
manage_sock_files_pattern(lircd_t, lircd_runtime_t, lircd_runtime_t)
|
2020-06-27 21:11:48 +00:00
|
|
|
files_runtime_filetrans(lircd_t, lircd_runtime_t, { dir file })
|
2018-06-23 13:00:56 +00:00
|
|
|
|
2019-09-08 20:55:02 +00:00
|
|
|
dev_filetrans(lircd_t, lircd_runtime_t, sock_file)
|
2018-06-23 13:00:56 +00:00
|
|
|
|
|
|
|
kernel_request_load_module(lircd_t)
|
|
|
|
|
|
|
|
corenet_all_recvfrom_netlabel(lircd_t)
|
|
|
|
corenet_tcp_sendrecv_generic_if(lircd_t)
|
|
|
|
corenet_tcp_sendrecv_generic_node(lircd_t)
|
|
|
|
corenet_tcp_bind_generic_node(lircd_t)
|
|
|
|
|
|
|
|
corenet_sendrecv_lirc_server_packets(lircd_t)
|
|
|
|
corenet_tcp_bind_lirc_port(lircd_t)
|
|
|
|
corenet_sendrecv_lirc_client_packets(lircd_t)
|
|
|
|
corenet_tcp_connect_lirc_port(lircd_t)
|
|
|
|
|
|
|
|
dev_rw_generic_usb_dev(lircd_t)
|
|
|
|
dev_read_mouse(lircd_t)
|
|
|
|
dev_filetrans_lirc(lircd_t)
|
|
|
|
dev_rw_lirc(lircd_t)
|
|
|
|
dev_rw_input_dev(lircd_t)
|
|
|
|
dev_read_sysfs(lircd_t)
|
|
|
|
|
|
|
|
files_read_config_files(lircd_t)
|
|
|
|
files_list_var(lircd_t)
|
|
|
|
files_manage_generic_locks(lircd_t)
|
|
|
|
files_read_all_locks(lircd_t)
|
|
|
|
|
|
|
|
term_use_ptmx(lircd_t)
|
|
|
|
|
|
|
|
logging_send_syslog_msg(lircd_t)
|
|
|
|
|
|
|
|
miscfiles_read_localization(lircd_t)
|
|
|
|
|
|
|
|
sysnet_dns_name_resolve(lircd_t)
|