Chris PeBenito f862c3
Chris PeBenito 8cfa5a
policy_module(gpm,1.1.2)
Chris PeBenito f862c3
Chris PeBenito f862c3
########################################
Chris PeBenito f862c3
#
Chris PeBenito f862c3
# Declarations
Chris PeBenito f862c3
#
Chris PeBenito f862c3
Chris PeBenito f862c3
type gpm_t;
Chris PeBenito f862c3
type gpm_exec_t;
Chris PeBenito f862c3
init_daemon_domain(gpm_t,gpm_exec_t)
Chris PeBenito f862c3
Chris PeBenito f862c3
type gpm_conf_t;
Chris PeBenito f862c3
files_type(gpm_conf_t)
Chris PeBenito f862c3
Chris PeBenito f862c3
type gpm_tmp_t;
Chris PeBenito f862c3
files_tmp_file(gpm_tmp_t)
Chris PeBenito f862c3
Chris PeBenito f862c3
type gpm_var_run_t;
Chris PeBenito f862c3
files_pid_file(gpm_var_run_t)
Chris PeBenito f862c3
Chris PeBenito f862c3
type gpmctl_t;
Chris PeBenito f862c3
files_type(gpmctl_t)
Chris PeBenito f862c3
Chris PeBenito f862c3
########################################
Chris PeBenito f862c3
#
Chris PeBenito f862c3
# Local policy
Chris PeBenito f862c3
#
Chris PeBenito f862c3
Chris PeBenito f862c3
allow gpm_t self:capability { setuid dac_override sys_admin sys_tty_config };
Chris PeBenito 9cca1c
allow gpm_t self:unix_stream_socket create_stream_socket_perms;
Chris PeBenito f862c3
Chris PeBenito f862c3
allow gpm_t gpm_conf_t:dir r_dir_perms;
Chris PeBenito f862c3
allow gpm_t gpm_conf_t:file r_file_perms;
Chris PeBenito f862c3
allow gpm_t gpm_conf_t:lnk_file { getattr read };
Chris PeBenito f862c3
Chris PeBenito f862c3
allow gpm_t gpm_tmp_t:dir create_dir_perms;
Chris PeBenito f862c3
allow gpm_t gpm_tmp_t:file create_file_perms;
Chris PeBenito 103fe2
files_tmp_filetrans(gpm_t, gpm_tmp_t, { file dir })
Chris PeBenito f862c3
Chris PeBenito f862c3
allow gpm_t gpm_var_run_t:file create_file_perms;
Chris PeBenito 1c1ac6
files_pid_filetrans(gpm_t,gpm_var_run_t,file)
Chris PeBenito f862c3
Chris PeBenito f862c3
allow gpm_t gpmctl_t:sock_file create_file_perms;
Chris PeBenito f862c3
allow gpm_t gpmctl_t:fifo_file create_file_perms;
Chris PeBenito 103fe2
dev_filetrans(gpm_t,gpmctl_t,{ sock_file fifo_file })
Chris PeBenito f862c3
Chris PeBenito f862c3
# cjp: this has no effect
Chris PeBenito f862c3
allow gpm_t gpmctl_t:unix_stream_socket name_bind;
Chris PeBenito f862c3
Chris PeBenito 445522
kernel_read_kernel_sysctls(gpm_t)
Chris PeBenito f862c3
kernel_list_proc(gpm_t)
Chris PeBenito f862c3
kernel_read_proc_symlinks(gpm_t)
Chris PeBenito f862c3
Chris PeBenito f862c3
dev_read_sysfs(gpm_t)
Chris PeBenito f862c3
# Access the mouse.
Chris PeBenito 8cfa5a
dev_rw_input_dev(gpm_t)
Chris PeBenito 4ac451
dev_rw_mouse(gpm_t)
Chris PeBenito f862c3
Chris PeBenito f862c3
fs_getattr_all_fs(gpm_t)
Chris PeBenito f862c3
fs_search_auto_mountpoints(gpm_t)
Chris PeBenito f862c3
Chris PeBenito 1815ba
term_use_unallocated_ttys(gpm_t)
Chris PeBenito f862c3
term_dontaudit_use_console(gpm_t)
Chris PeBenito f862c3
Chris PeBenito 15722e
domain_use_interactive_fds(gpm_t)
Chris PeBenito f862c3
Chris PeBenito 1c1ac6
init_use_fds(gpm_t)
Chris PeBenito 1815ba
init_use_script_ptys(gpm_t)
Chris PeBenito f862c3
Chris PeBenito f862c3
libs_use_ld_so(gpm_t)
Chris PeBenito f862c3
libs_use_shared_libs(gpm_t)
Chris PeBenito f862c3
Chris PeBenito f862c3
logging_send_syslog_msg(gpm_t)
Chris PeBenito f862c3
Chris PeBenito f862c3
miscfiles_read_localization(gpm_t)
Chris PeBenito f862c3
Chris PeBenito 15722e
userdom_dontaudit_use_unpriv_user_fds(gpm_t)
Chris PeBenito 103fe2
userdom_dontaudit_search_sysadm_home_dirs(gpm_t)
Chris PeBenito f862c3
Chris PeBenito f862c3
ifdef(`targeted_policy', `
Chris PeBenito 1815ba
	term_dontaudit_use_unallocated_ttys(gpm_t)
Chris PeBenito 1815ba
	term_dontaudit_use_generic_ptys(gpm_t)
Chris PeBenito 9e04f5
	files_dontaudit_read_root_files(gpm_t)
Chris PeBenito f862c3
')
Chris PeBenito f862c3
Chris PeBenito bb7170
optional_policy(`
Chris PeBenito f862c3
	seutil_sigchld_newrole(gpm_t)
Chris PeBenito f862c3
')
Chris PeBenito f862c3
Chris PeBenito bb7170
optional_policy(`
Chris PeBenito f862c3
	udev_read_db(gpm_t)
Chris PeBenito f862c3
')