2020-08-18 13:09:10 +00:00
|
|
|
policy_module(gpm, 1.15.0)
|
2018-06-23 13:00:56 +00:00
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Declarations
|
|
|
|
#
|
|
|
|
|
|
|
|
type gpm_t;
|
|
|
|
type gpm_exec_t;
|
|
|
|
init_daemon_domain(gpm_t, gpm_exec_t)
|
|
|
|
|
|
|
|
type gpm_initrc_exec_t;
|
|
|
|
init_script_file(gpm_initrc_exec_t)
|
|
|
|
|
|
|
|
type gpm_conf_t;
|
|
|
|
files_type(gpm_conf_t)
|
|
|
|
|
2019-09-08 20:55:02 +00:00
|
|
|
type gpm_runtime_t alias gpm_var_run_t;
|
2020-06-27 21:11:48 +00:00
|
|
|
files_runtime_file(gpm_runtime_t)
|
2018-06-23 13:00:56 +00:00
|
|
|
|
2019-09-11 00:05:46 +00:00
|
|
|
type gpm_tmp_t;
|
|
|
|
files_tmp_file(gpm_tmp_t)
|
|
|
|
|
2018-06-23 13:00:56 +00:00
|
|
|
type gpmctl_t;
|
|
|
|
files_type(gpmctl_t)
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Local policy
|
|
|
|
#
|
|
|
|
|
|
|
|
allow gpm_t self:capability { dac_override setpcap setuid sys_admin sys_tty_config };
|
|
|
|
allow gpm_t self:process { signal signull getcap setcap };
|
|
|
|
allow gpm_t self:unix_stream_socket { accept listen };
|
|
|
|
|
|
|
|
allow gpm_t gpm_conf_t:dir list_dir_perms;
|
|
|
|
read_files_pattern(gpm_t, gpm_conf_t, gpm_conf_t)
|
|
|
|
read_lnk_files_pattern(gpm_t, gpm_conf_t, gpm_conf_t)
|
|
|
|
|
|
|
|
manage_dirs_pattern(gpm_t, gpm_tmp_t, gpm_tmp_t)
|
|
|
|
manage_files_pattern(gpm_t, gpm_tmp_t, gpm_tmp_t)
|
|
|
|
files_tmp_filetrans(gpm_t, gpm_tmp_t, { file dir })
|
|
|
|
|
2019-09-08 20:55:02 +00:00
|
|
|
allow gpm_t gpm_runtime_t:file manage_file_perms;
|
2020-06-27 21:11:48 +00:00
|
|
|
files_runtime_filetrans(gpm_t, gpm_runtime_t, file)
|
2018-06-23 13:00:56 +00:00
|
|
|
|
|
|
|
allow gpm_t gpmctl_t:sock_file manage_sock_file_perms;
|
|
|
|
allow gpm_t gpmctl_t:fifo_file manage_fifo_file_perms;
|
|
|
|
dev_filetrans(gpm_t, gpmctl_t, { sock_file fifo_file })
|
|
|
|
|
|
|
|
kernel_read_kernel_sysctls(gpm_t)
|
|
|
|
kernel_list_proc(gpm_t)
|
|
|
|
kernel_read_proc_symlinks(gpm_t)
|
|
|
|
|
|
|
|
dev_read_sysfs(gpm_t)
|
|
|
|
# Access the mouse.
|
|
|
|
dev_rw_input_dev(gpm_t)
|
|
|
|
dev_rw_mouse(gpm_t)
|
|
|
|
|
|
|
|
files_read_etc_files(gpm_t)
|
|
|
|
|
|
|
|
fs_getattr_all_fs(gpm_t)
|
|
|
|
fs_search_auto_mountpoints(gpm_t)
|
|
|
|
|
|
|
|
term_use_unallocated_ttys(gpm_t)
|
|
|
|
|
|
|
|
domain_use_interactive_fds(gpm_t)
|
|
|
|
|
|
|
|
logging_send_syslog_msg(gpm_t)
|
|
|
|
|
|
|
|
miscfiles_read_localization(gpm_t)
|
|
|
|
|
|
|
|
userdom_use_user_terminals(gpm_t)
|
|
|
|
userdom_dontaudit_use_unpriv_user_fds(gpm_t)
|
|
|
|
userdom_dontaudit_search_user_home_dirs(gpm_t)
|
|
|
|
|
|
|
|
optional_policy(`
|
|
|
|
seutil_sigchld_newrole(gpm_t)
|
|
|
|
')
|
|
|
|
|