selinux-policy/refpolicy/policy/modules/services/gpm.te

100 lines
2.1 KiB
Plaintext
Raw Normal View History

2005-08-17 21:28:31 +00:00
2006-01-17 20:14:04 +00:00
policy_module(gpm,1.1.0)
2005-08-17 21:28:31 +00:00
########################################
#
# Declarations
#
type gpm_t;
type gpm_exec_t;
init_daemon_domain(gpm_t,gpm_exec_t)
type gpm_conf_t;
files_type(gpm_conf_t)
type gpm_tmp_t;
files_tmp_file(gpm_tmp_t)
type gpm_var_run_t;
files_pid_file(gpm_var_run_t)
type gpmctl_t;
files_type(gpmctl_t)
########################################
#
# Local policy
#
allow gpm_t self:capability { setuid dac_override sys_admin sys_tty_config };
2005-12-13 20:38:19 +00:00
allow gpm_t self:unix_stream_socket create_stream_socket_perms;
2005-08-17 21:28:31 +00:00
allow gpm_t gpm_conf_t:dir r_dir_perms;
allow gpm_t gpm_conf_t:file r_file_perms;
allow gpm_t gpm_conf_t:lnk_file { getattr read };
allow gpm_t gpm_tmp_t:dir create_dir_perms;
allow gpm_t gpm_tmp_t:file create_file_perms;
files_filetrans_tmp(gpm_t, gpm_tmp_t, { file dir })
2005-08-17 21:28:31 +00:00
allow gpm_t gpm_var_run_t:file create_file_perms;
files_filetrans_pid(gpm_t,gpm_var_run_t)
2005-08-17 21:28:31 +00:00
allow gpm_t gpmctl_t:sock_file create_file_perms;
allow gpm_t gpmctl_t:fifo_file create_file_perms;
dev_filetrans_dev(gpm_t,gpmctl_t,{ sock_file fifo_file })
2005-08-17 21:28:31 +00:00
# cjp: this has no effect
allow gpm_t gpmctl_t:unix_stream_socket name_bind;
kernel_read_kernel_sysctls(gpm_t)
2005-08-17 21:28:31 +00:00
kernel_list_proc(gpm_t)
kernel_read_proc_symlinks(gpm_t)
dev_read_sysfs(gpm_t)
# Access the mouse.
dev_read_input(gpm_t)
2005-12-12 18:53:45 +00:00
dev_rw_mouse(gpm_t)
2005-08-17 21:28:31 +00:00
fs_getattr_all_fs(gpm_t)
fs_search_auto_mountpoints(gpm_t)
2006-02-02 21:08:12 +00:00
term_use_unallocated_ttys(gpm_t)
2005-08-17 21:28:31 +00:00
term_dontaudit_use_console(gpm_t)
domain_use_wide_inherit_fd(gpm_t)
init_use_fd(gpm_t)
2006-02-02 21:08:12 +00:00
init_use_script_ptys(gpm_t)
2005-08-17 21:28:31 +00:00
libs_use_ld_so(gpm_t)
libs_use_shared_libs(gpm_t)
logging_send_syslog_msg(gpm_t)
miscfiles_read_localization(gpm_t)
userdom_dontaudit_use_unpriv_user_fd(gpm_t)
userdom_dontaudit_search_sysadm_home_dir(gpm_t)
ifdef(`targeted_policy', `
2006-02-02 21:08:12 +00:00
term_dontaudit_use_unallocated_ttys(gpm_t)
term_dontaudit_use_generic_ptys(gpm_t)
files_dontaudit_read_root_files(gpm_t)
2005-08-17 21:28:31 +00:00
')
optional_policy(`selinuxutil',`
2005-08-17 21:28:31 +00:00
seutil_sigchld_newrole(gpm_t)
')
optional_policy(`udev',`
2005-08-17 21:28:31 +00:00
udev_read_db(gpm_t)
')
ifdef(`TODO',`
# Access the mouse.
# cjp: why write?
2005-12-13 20:38:19 +00:00
allow gpm_t event_device_t:chr_file rw_file_perms;
2005-08-17 21:28:31 +00:00
')