selinux-policy/strict/domains/program/gpm.te
2005-04-29 17:45:15 +00:00

46 lines
1.2 KiB
Plaintext

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