Chris PeBenito e181fe
# Copyright (C) 2005 Tresys Technology, LLC
Chris PeBenito e181fe
Chris PeBenito b4cd15
########################################
Chris PeBenito b4cd15
#
Chris PeBenito 8a0da1
# terminal_make_pseudoterminal(domain,ptytype,[`optional'])
Chris PeBenito 8a0da1
#
Chris PeBenito 8a0da1
define(`terminal_make_pseudoterminal',`
Chris PeBenito 8a0da1
requires_block_template(terminal_make_pseudoterminal_depend,$3)
Chris PeBenito 8a0da1
devices_list_device_nodes($1,optional)
Chris PeBenito 8a0da1
allow $1 ptmx_t:chr_file { getattr read write };
Chris PeBenito 8a0da1
allow $1 devpts_t:dir { getattr search read };
Chris PeBenito 8a0da1
allow $1 devpts_t:filesystem getattr;
Chris PeBenito 8a0da1
allow $2 devpts_t:filesystem associate;
Chris PeBenito 960373
dontaudit $1 bsdpty_device_t:chr_file { getattr read write };
Chris PeBenito 8a0da1
type_transition $1 devpts_t:chr_file $2;
Chris PeBenito 8a0da1
typeattribute $2 ptynode;
Chris PeBenito 8a0da1
')
Chris PeBenito 8a0da1
Chris PeBenito 8a0da1
define(`terminal_make_pseudoterminal_depend',`
Chris PeBenito 8a0da1
attribute ptynode;
Chris PeBenito 8a0da1
type ptmx_t, devpts_t;
Chris PeBenito 8a0da1
class filesystem { getattr associate };
Chris PeBenito 8a0da1
class dir { getattr search read };
Chris PeBenito 8a0da1
class chr_file { getattr read write };
Chris PeBenito 8a0da1
devices_list_device_nodes_depend
Chris PeBenito 8a0da1
')
Chris PeBenito 8a0da1
Chris PeBenito 8a0da1
########################################
Chris PeBenito 8a0da1
#
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_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
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 8a0da1
# terminal_ignore_list_pseudoterminals(domain,[`optional'])
Chris PeBenito b4cd15
#
Chris PeBenito 8a0da1
define(`terminal_ignore_list_pseudoterminals',`
Chris PeBenito 8a0da1
requires_block_template(terminal_ignore_list_pseudoterminals_depend,$2)
Chris PeBenito 8a0da1
dontaudit $1 devpts_t:dir { getattr search read };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito 8a0da1
define(`terminal_ignore_list_pseudoterminals_depend',`
Chris PeBenito b4cd15
type devpts_t;
Chris PeBenito b4cd15
class dir { getattr search read };
Chris PeBenito b4cd15
')