|
Chris PeBenito |
0fbfa5 |
#DESC Gpm - General Purpose Mouse driver
|
|
Chris PeBenito |
0fbfa5 |
#
|
|
Chris PeBenito |
0fbfa5 |
# Authors: Stephen Smalley <sds@epoch.ncsc.mil> and Timothy Fraser
|
|
Chris PeBenito |
0fbfa5 |
# X-Debian-Packages: gpm
|
|
Chris PeBenito |
0fbfa5 |
#
|
|
Chris PeBenito |
0fbfa5 |
|
|
Chris PeBenito |
0fbfa5 |
#################################
|
|
Chris PeBenito |
0fbfa5 |
#
|
|
Chris PeBenito |
0fbfa5 |
# Rules for the gpm_t domain.
|
|
Chris PeBenito |
0fbfa5 |
#
|
|
Chris PeBenito |
0fbfa5 |
# gpm_t is the domain of the console mouse server.
|
|
Chris PeBenito |
0fbfa5 |
# gpm_exec_t is the type of the console mouse server program.
|
|
Chris PeBenito |
0fbfa5 |
# gpmctl_t is the type of the Unix domain socket or pipe created
|
|
Chris PeBenito |
0fbfa5 |
# by the console mouse server.
|
|
Chris PeBenito |
0fbfa5 |
#
|
|
Chris PeBenito |
0fbfa5 |
daemon_domain(gpm)
|
|
Chris PeBenito |
0fbfa5 |
|
|
Chris PeBenito |
0fbfa5 |
type gpmctl_t, file_type, sysadmfile, dev_fs;
|
|
Chris PeBenito |
0fbfa5 |
|
|
Chris PeBenito |
0fbfa5 |
tmp_domain(gpm)
|
|
Chris PeBenito |
0fbfa5 |
|
|
Chris PeBenito |
0fbfa5 |
# Allow to read the /etc/gpm/ conf files
|
|
Chris PeBenito |
0fbfa5 |
type gpm_conf_t, file_type, sysadmfile;
|
|
Chris PeBenito |
0fbfa5 |
r_dir_file(gpm_t, gpm_conf_t)
|
|
Chris PeBenito |
0fbfa5 |
|
|
Chris PeBenito |
0fbfa5 |
# Use capabilities.
|
|
Chris PeBenito |
0fbfa5 |
allow gpm_t self:capability { setuid dac_override sys_admin sys_tty_config };
|
|
Chris PeBenito |
0fbfa5 |
|
|
Chris PeBenito |
0fbfa5 |
# Create and bind to /dev/gpmctl.
|
|
Chris PeBenito |
0fbfa5 |
file_type_auto_trans(gpm_t, device_t, gpmctl_t, { sock_file fifo_file })
|
|
Chris PeBenito |
0fbfa5 |
allow gpm_t gpmctl_t:unix_stream_socket name_bind;
|
|
Chris PeBenito |
0fbfa5 |
allow gpm_t self:unix_dgram_socket create_socket_perms;
|
|
Chris PeBenito |
0fbfa5 |
allow gpm_t self:unix_stream_socket create_stream_socket_perms;
|
|
Chris PeBenito |
0fbfa5 |
|
|
Chris PeBenito |
0fbfa5 |
# Read and write ttys.
|
|
Chris PeBenito |
0fbfa5 |
allow gpm_t tty_device_t:chr_file rw_file_perms;
|
|
Chris PeBenito |
0fbfa5 |
|
|
Chris PeBenito |
0fbfa5 |
# Access the mouse.
|
|
Chris PeBenito |
0fbfa5 |
allow gpm_t { event_device_t mouse_device_t }:chr_file rw_file_perms;
|
|
Chris PeBenito |
0fbfa5 |
allow gpm_t device_t:lnk_file { getattr read };
|
|
Chris PeBenito |
0fbfa5 |
|
|
Chris PeBenito |
0fbfa5 |
read_locale(gpm_t)
|
|
Chris PeBenito |
0fbfa5 |
|
|
Chris PeBenito |
0fbfa5 |
allow initrc_t gpmctl_t:sock_file setattr;
|
|
Chris PeBenito |
0fbfa5 |
|