|
Chris PeBenito |
0fbfa5 |
#DESC games
|
|
Chris PeBenito |
0fbfa5 |
#
|
|
Chris PeBenito |
0fbfa5 |
# Macros for games
|
|
Chris PeBenito |
0fbfa5 |
#
|
|
Chris PeBenito |
0fbfa5 |
#
|
|
Chris PeBenito |
0fbfa5 |
# Authors: Dan Walsh <dwalsh@redhat.com>
|
|
Chris PeBenito |
0fbfa5 |
#
|
|
Chris PeBenito |
0fbfa5 |
#
|
|
Chris PeBenito |
0fbfa5 |
# games_domain(domain_prefix)
|
|
Chris PeBenito |
0fbfa5 |
#
|
|
Chris PeBenito |
0fbfa5 |
#
|
|
Chris PeBenito |
0fbfa5 |
define(`games_domain', `
|
|
Chris PeBenito |
0fbfa5 |
|
|
Chris PeBenito |
5493c2 |
type $1_games_t, domain, nscd_client_domain;
|
|
Chris PeBenito |
5493c2 |
|
|
Chris PeBenito |
5493c2 |
# Type transition
|
|
Chris PeBenito |
5493c2 |
if (! disable_games_trans) {
|
|
Chris PeBenito |
5493c2 |
domain_auto_trans($1_t, games_exec_t, $1_games_t)
|
|
Chris PeBenito |
5493c2 |
}
|
|
Chris PeBenito |
5493c2 |
can_exec($1_games_t, games_exec_t)
|
|
Chris PeBenito |
5493c2 |
role $1_r types $1_games_t;
|
|
Chris PeBenito |
5493c2 |
|
|
Chris PeBenito |
5493c2 |
can_create_pty($1_games)
|
|
Chris PeBenito |
5493c2 |
|
|
Chris PeBenito |
5493c2 |
# X access, GNOME, /tmp files
|
|
Chris PeBenito |
5493c2 |
x_client_domain($1_games, $1)
|
|
Chris PeBenito |
5493c2 |
tmp_domain($1_games, `', { dir notdevfile_class_set })
|
|
Chris PeBenito |
5493c2 |
gnome_application($1_games, $1)
|
|
Chris PeBenito |
5493c2 |
gnome_file_dialog($1_games, $1)
|
|
Chris PeBenito |
5493c2 |
|
|
Chris PeBenito |
5493c2 |
# Games seem to need this
|
|
Chris PeBenito |
5493c2 |
if (allow_execmem) {
|
|
Chris PeBenito |
5493c2 |
allow $1_games_t self:process execmem;
|
|
Chris PeBenito |
5493c2 |
}
|
|
Chris PeBenito |
5493c2 |
|
|
Chris PeBenito |
5493c2 |
allow $1_games_t texrel_shlib_t:file execmod;
|
|
Chris PeBenito |
0fbfa5 |
allow $1_games_t var_t:dir { search getattr };
|
|
Chris PeBenito |
0fbfa5 |
rw_dir_create_file($1_games_t, games_data_t)
|
|
Chris PeBenito |
0fbfa5 |
allow $1_games_t sound_device_t:chr_file rw_file_perms;
|
|
Chris PeBenito |
0fbfa5 |
can_udp_send($1_games_t, $1_games_t)
|
|
Chris PeBenito |
0fbfa5 |
can_tcp_connect($1_games_t, $1_games_t)
|
|
Chris PeBenito |
0fbfa5 |
|
|
Chris PeBenito |
0fbfa5 |
# Access /home/user/.gnome2
|
|
Chris PeBenito |
5493c2 |
# FIXME: Change to use per app types
|
|
Chris PeBenito |
5493c2 |
create_dir_file($1_games_t, $1_gnome_settings_t)
|
|
Chris PeBenito |
0fbfa5 |
|
|
Chris PeBenito |
5493c2 |
# FIXME: why is this necessary - ORBit?
|
|
Chris PeBenito |
5493c2 |
# ORBit works differently now
|
|
Chris PeBenito |
0fbfa5 |
create_dir_file($1_games_t, $1_tmp_t)
|
|
Chris PeBenito |
0fbfa5 |
allow $1_games_t $1_tmp_t:sock_file create_file_perms;
|
|
Chris PeBenito |
5493c2 |
can_unix_connect($1_t, $1_games_t)
|
|
Chris PeBenito |
5493c2 |
can_unix_connect($1_games_t, $1_t)
|
|
Chris PeBenito |
0fbfa5 |
|
|
Chris PeBenito |
0fbfa5 |
ifdef(`xdm.te', `
|
|
Chris PeBenito |
0fbfa5 |
allow $1_games_t xdm_tmp_t:dir rw_dir_perms;
|
|
Chris PeBenito |
0fbfa5 |
allow $1_games_t xdm_tmp_t:sock_file create_file_perms;
|
|
Chris PeBenito |
0fbfa5 |
allow $1_games_t xdm_var_lib_t:file { getattr read };
|
|
Chris PeBenito |
0fbfa5 |
')dnl end if xdm.te
|
|
Chris PeBenito |
0fbfa5 |
|
|
Chris PeBenito |
0fbfa5 |
allow $1_games_t var_lib_t:dir search;
|
|
Chris PeBenito |
0fbfa5 |
r_dir_file($1_games_t, man_t)
|
|
Chris PeBenito |
5493c2 |
allow $1_games_t { proc_t self }:dir search;
|
|
Chris PeBenito |
5493c2 |
allow $1_games_t { proc_t self }:{ file lnk_file } { read getattr };
|
|
Chris PeBenito |
0fbfa5 |
ifdef(`mozilla.te', `
|
|
Chris PeBenito |
0fbfa5 |
dontaudit $1_games_t $1_mozilla_t:unix_stream_socket connectto;
|
|
Chris PeBenito |
0fbfa5 |
')
|
|
Chris PeBenito |
0fbfa5 |
allow $1_games_t event_device_t:chr_file getattr;
|
|
Chris PeBenito |
0fbfa5 |
allow $1_games_t mouse_device_t:chr_file getattr;
|
|
Chris PeBenito |
5493c2 |
|
|
Chris PeBenito |
0fbfa5 |
allow $1_games_t self:file { getattr read };
|
|
Chris PeBenito |
5493c2 |
allow $1_games_t self:sem create_sem_perms;
|
|
Chris PeBenito |
5493c2 |
|
|
Chris PeBenito |
5493c2 |
allow $1_games_t { bin_t sbin_t }:dir { getattr search };
|
|
Chris PeBenito |
5493c2 |
can_exec($1_games_t, { shell_exec_t bin_t utempter_exec_t })
|
|
Chris PeBenito |
5493c2 |
allow $1_games_t bin_t:lnk_file read;
|
|
Chris PeBenito |
0fbfa5 |
|
|
Chris PeBenito |
0fbfa5 |
dontaudit $1_games_t var_run_t:dir search;
|
|
Chris PeBenito |
5493c2 |
dontaudit $1_games_t initrc_var_run_t:file { read write };
|
|
Chris PeBenito |
5493c2 |
dontaudit $1_games_t var_log_t:dir search;
|
|
Chris PeBenito |
5493c2 |
|
|
Chris PeBenito |
5493c2 |
can_network($1_games_t)
|
|
Chris PeBenito |
5493c2 |
allow $1_games_t port_t:tcp_socket name_bind;
|
|
Chris PeBenito |
5493c2 |
allow $1_games_t port_t:tcp_socket name_connect;
|
|
Chris PeBenito |
5493c2 |
|
|
Chris PeBenito |
5493c2 |
# Suppress .icons denial until properly implemented
|
|
Chris PeBenito |
5493c2 |
dontaudit $1_games_t $1_home_t:dir read;
|
|
Chris PeBenito |
0fbfa5 |
|
|
Chris PeBenito |
0fbfa5 |
')dnl end macro definition
|
|
Chris PeBenito |
0fbfa5 |
|