Chris PeBenito b4cd15
########################################
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
# terminal_use_console(domain,[`optional'])
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
define(`terminal_use_console',`
Chris PeBenito b4cd15
requires_block_template(terminal_use_console_depend,$2)
Chris PeBenito b4cd15
devices_list_device_nodes($1,optional)
Chris PeBenito b4cd15
allow $1 console_device_t:chr_file { read write };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
define(`terminal_use_console_depend',`
Chris PeBenito b4cd15
type console_device_t;
Chris PeBenito b4cd15
class chr_file { read write };
Chris PeBenito b4cd15
devices_list_device_nodes_depend
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
########################################
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
# terminal_use_controlling_terminal(domain,[`optional'])
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
define(`terminal_use_controlling_terminal',`
Chris PeBenito b4cd15
requires_block_template(terminal_use_controlling_terminal_depend,$2)
Chris PeBenito b4cd15
devices_list_device_nodes($1,optional)
Chris PeBenito b4cd15
allow $1 devtty_t:chr_file { read write };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
define(`terminal_use_controlling_terminal_depend',`
Chris PeBenito b4cd15
type devtty_t;
Chris PeBenito b4cd15
class chr_file { read write };
Chris PeBenito b4cd15
devices_list_device_nodes_depend
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
########################################
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
# terminal_make_pty(domain,ptytype,[`optional'])
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
define(`terminal_make_pty',`
Chris PeBenito b4cd15
requires_block_template(terminal_make_pty_depend,$3)
Chris PeBenito b4cd15
devices_list_device_nodes($1,optional)
Chris PeBenito b4cd15
allow $1 ptmx_t:chr_file { getattr read write };
Chris PeBenito b4cd15
allow $1 devpts_t:dir { getattr search read };
Chris PeBenito b4cd15
allow $1 devpts_t:filesystem getattr;
Chris PeBenito b4cd15
allow $2 devpts_t:filesystem associate;
Chris PeBenito b4cd15
type_transition $1 devpts_t:chr_file $2;
Chris PeBenito b4cd15
typeattribute $2 ptynode;
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
define(`terminal_make_pty_depend',`
Chris PeBenito b4cd15
attribute ptynode;
Chris PeBenito b4cd15
type ptmx_t, devpts_t;
Chris PeBenito b4cd15
class filesystem { getattr associate };
Chris PeBenito b4cd15
class dir { getattr search read };
Chris PeBenito b4cd15
class chr_file { getattr read write };
Chris PeBenito b4cd15
devices_list_device_nodes_depend
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
########################################
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
# terminal_use_all_terminals(domain,[`optional'])
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
define(`terminal_use_all_terminals',`
Chris PeBenito b4cd15
requires_block_template(terminal_use_all_terminals_depend,$2)
Chris PeBenito b4cd15
devices_list_device_nodes($1,optional)
Chris PeBenito b4cd15
allow $1 devpts_t:dir { getattr read search };
Chris PeBenito b4cd15
allow $1 { console_device_t devtty_t ttynode ptynode }:chr_file { read write };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
define(`terminal_use_all_terminals_depend',`
Chris PeBenito b4cd15
attribute ttynode, ptynode;
Chris PeBenito b4cd15
type console_device_t, devtty_t, devpts_t;
Chris PeBenito b4cd15
class chr_file { read write };
Chris PeBenito b4cd15
devices_list_device_nodes_depend
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
########################################
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
# terminal_reset_labels(domain,[`optional'])
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
define(`terminal_reset_labels',`
Chris PeBenito b4cd15
requires_block_template(terminal_reset_labels_depend,$2)
Chris PeBenito b4cd15
devices_list_device_nodes($1,optional)
Chris PeBenito b4cd15
kernel_relabeling_privilege($1,optional)
Chris PeBenito b4cd15
allow $1 ttynode:chr_file relabelfrom;
Chris PeBenito b4cd15
allow $1 tty_device_t:chr_file relabelto;
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
define(`terminal_reset_labels_depend',`
Chris PeBenito b4cd15
attribute ttynode;
Chris PeBenito b4cd15
type tty_device_t;
Chris PeBenito b4cd15
class chr_file { relabelfrom relabelto };
Chris PeBenito b4cd15
devices_list_device_nodes_depend
Chris PeBenito b4cd15
kernel_relabeling_privilege_depend
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
########################################
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
# terminal_ignore_list_ptys(domain,[`optional'])
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
define(`terminal_ignore_list_ptys',`
Chris PeBenito b4cd15
requires_block_template(terminal_ignore_list_ptys_depend,$2)
Chris PeBenito b4cd15
allow $1 console_device_t:chr_file { read write };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
define(`terminal_ignore_list_ptys_depend',`
Chris PeBenito b4cd15
type devpts_t;
Chris PeBenito b4cd15
class dir { getattr search read };
Chris PeBenito b4cd15
')