|
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 |
x_client_domain($1, `games', `, transitionbool')
|
|
Chris PeBenito |
0fbfa5 |
|
|
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 |
r_dir_file($1_games_t, usr_t)
|
|
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 |
0fbfa5 |
create_dir_file($1_games_t, $1_home_t)
|
|
Chris PeBenito |
0fbfa5 |
allow $1_games_t $1_home_dir_t:dir search;
|
|
Chris PeBenito |
0fbfa5 |
allow $1_games_t $1_home_t:dir { read getattr };
|
|
Chris PeBenito |
0fbfa5 |
|
|
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 |
0fbfa5 |
|
|
Chris PeBenito |
0fbfa5 |
dontaudit $1_games_t sysctl_t:dir search;
|
|
Chris PeBenito |
0fbfa5 |
|
|
Chris PeBenito |
0fbfa5 |
tmp_domain($1_games)
|
|
Chris PeBenito |
0fbfa5 |
allow $1_games_t urandom_device_t:chr_file { getattr ioctl read };
|
|
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 |
can_unix_connect($1_t, $1_games_t)
|
|
Chris PeBenito |
0fbfa5 |
can_unix_connect($1_games_t, $1_t)
|
|
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 |
0fbfa5 |
allow $1_games_t proc_t: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 |
0fbfa5 |
allow $1_games_t self:file { getattr read };
|
|
Chris PeBenito |
0fbfa5 |
|
|
Chris PeBenito |
0fbfa5 |
# kpat spews errors
|
|
Chris PeBenito |
0fbfa5 |
dontaudit $1_games_t bin_t:dir getattr;
|
|
Chris PeBenito |
0fbfa5 |
dontaudit $1_games_t var_run_t:dir search;
|
|
Chris PeBenito |
0fbfa5 |
|
|
Chris PeBenito |
0fbfa5 |
')dnl end macro definition
|
|
Chris PeBenito |
0fbfa5 |
|