## General Purpose Mouse driver.
########################################
##
## Connect to GPM over a unix domain
## stream socket.
##
##
##
## Domain allowed access.
##
##
#
interface(`gpm_stream_connect',`
gen_require(`
type gpmctl_t, gpm_t;
')
dev_list_all_dev_nodes($1)
stream_connect_pattern($1, gpmctl_t, gpmctl_t, gpm_t)
')
########################################
##
## Get attributes of gpm control
## channel named sock files.
##
##
##
## Domain allowed access.
##
##
#
interface(`gpm_getattr_gpmctl',`
gen_require(`
type gpmctl_t;
')
dev_list_all_dev_nodes($1)
allow $1 gpmctl_t:sock_file getattr_sock_file_perms;
')
########################################
##
## Do not audit attempts to get
## attributes of gpm control channel
## named sock files.
##
##
##
## Domain to not audit.
##
##
#
interface(`gpm_dontaudit_getattr_gpmctl',`
gen_require(`
type gpmctl_t;
')
dontaudit $1 gpmctl_t:sock_file getattr_sock_file_perms;
')
########################################
##
## Set attributes of gpm control
## channel named sock files.
##
##
##
## Domain allowed access.
##
##
#
interface(`gpm_setattr_gpmctl',`
gen_require(`
type gpmctl_t;
')
dev_list_all_dev_nodes($1)
allow $1 gpmctl_t:sock_file setattr_sock_file_perms;
')
########################################
##
## All of the rules required to
## administrate an gpm environment.
##
##
##
## Domain allowed access.
##
##
##
##
## Role allowed access.
##
##
##
#
interface(`gpm_admin',`
gen_require(`
type gpm_t, gpm_conf_t, gpm_initrc_exec_t;
type gpm_var_run_t, gpmctl_t;
')
allow $1 gpm_t:process { ptrace signal_perms };
ps_process_pattern($1, gpm_t)
init_labeled_script_domtrans($1, gpm_initrc_exec_t)
domain_system_change_exemption($1)
role_transition $2 gpm_initrc_exec_t system_r;
allow $2 system_r;
files_search_etc($1)
admin_pattern($1, gpm_conf_t)
dev_list_all_dev_nodes($1)
admin_pattern($1, gpmctl_t)
files_search_pids($1)
admin_pattern($1, gpm_var_run_t)
')