Chris PeBenito 4bf4ed
## <module name="terminal" layer="kernel">
Chris PeBenito 4bf4ed
## <summary>Policy for terminals.</summary>
Chris PeBenito e181fe
Chris PeBenito b4cd15
########################################
Chris PeBenito b4cd15
#
Chris PeBenito b16c6b
# terminal_make_pseudoterminal(type)
Chris PeBenito 8a0da1
#
Chris PeBenito 8a0da1
define(`terminal_make_pseudoterminal',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito b16c6b
allow $1 devpts_t:filesystem associate;
Chris PeBenito b16c6b
typeattribute $1 ptynode;
Chris PeBenito b16c6b
')
Chris PeBenito b16c6b
Chris PeBenito b16c6b
define(`terminal_make_pseudoterminal_depend',`
Chris PeBenito b16c6b
attribute ptynode;
Chris PeBenito b16c6b
type devpts_t;
Chris PeBenito b16c6b
class filesystem associate;
Chris PeBenito b16c6b
')
Chris PeBenito b16c6b
Chris PeBenito b16c6b
########################################
Chris PeBenito b16c6b
#
Chris PeBenito b16c6b
# terminal_make_user_pseudoterminal(domain,type)
Chris PeBenito b16c6b
#
Chris PeBenito b16c6b
define(`terminal_make_user_pseudoterminal',`
Chris PeBenito b16c6b
requires_block_template(`$0'_depend)
Chris PeBenito b16c6b
terminal_make_pseudoterminal($1)
Chris PeBenito b16c6b
type_change $1 server_ptynode:chr_file $2;
Chris PeBenito b16c6b
')
Chris PeBenito b16c6b
Chris PeBenito b16c6b
define(`terminal_make_user_pseudoterminal_depend',`
Chris PeBenito b16c6b
attribute server_ptynode;
Chris PeBenito b16c6b
')
Chris PeBenito b16c6b
Chris PeBenito b16c6b
########################################
Chris PeBenito b16c6b
#
Chris PeBenito b16c6b
# terminal_make_service_pseudoterminal(type)
Chris PeBenito b16c6b
#
Chris PeBenito b16c6b
define(`terminal_make_service_pseudoterminal',`
Chris PeBenito b16c6b
requires_block_template(`$0'_depend)
Chris PeBenito b16c6b
terminal_make_pseudoterminal($1)
Chris PeBenito b16c6b
typeattribute $1 server_ptynode;
Chris PeBenito b16c6b
')
Chris PeBenito b16c6b
Chris PeBenito b16c6b
define(`terminal_make_service_pseudoterminal_depend',`
Chris PeBenito b16c6b
attribute server_ptynode;
Chris PeBenito b16c6b
')
Chris PeBenito b16c6b
Chris PeBenito b16c6b
########################################
Chris PeBenito b16c6b
#
Chris PeBenito b16c6b
# terminal_make_physical_terminal(domain,type)
Chris PeBenito b16c6b
#
Chris PeBenito b16c6b
define(`terminal_make_physical_terminal',`
Chris PeBenito b16c6b
requires_block_template(`$0'_depend)
Chris PeBenito b16c6b
typeattribute $2 ttynode;
Chris PeBenito b16c6b
type_change $1 tty_device_t:chr_file $2;
Chris PeBenito b16c6b
# Debian login is from shadow utils and does not allow resetting the perms.
Chris PeBenito b16c6b
# have to fix this!
Chris PeBenito b16c6b
tunable_policy(`distro_debian',`
Chris PeBenito b16c6b
type_change $1 ttyfile:chr_file $2;
Chris PeBenito b16c6b
')
Chris PeBenito f5c42b
tunable_policy(`distro_redhat',`
Chris PeBenito 08eb9d
filesystem_tmpfs_associate($2)
Chris PeBenito f5c42b
')
Chris PeBenito b16c6b
')
Chris PeBenito b16c6b
Chris PeBenito b16c6b
define(`terminal_make_physical_terminal_depend',`
Chris PeBenito b16c6b
attribute ttynode;
Chris PeBenito b16c6b
type tty_device_t;
Chris PeBenito b16c6b
')
Chris PeBenito b16c6b
Chris PeBenito b16c6b
########################################
Chris PeBenito b16c6b
#
Chris PeBenito b16c6b
# terminal_create_private_pseudoterminal(domain,ptytype)
Chris PeBenito b16c6b
#
Chris PeBenito b16c6b
define(`terminal_create_private_pseudoterminal',`
Chris PeBenito b16c6b
requires_block_template(`$0'_depend)
Chris PeBenito b16c6b
devices_list_device_nodes($1)
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 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
')
Chris PeBenito 8a0da1
Chris PeBenito b16c6b
define(`terminal_create_pseudoterminal_depend',`
Chris PeBenito 8a0da1
type ptmx_t, devpts_t;
Chris PeBenito b16c6b
class filesystem getattr;
Chris PeBenito 8a0da1
class dir { getattr search read };
Chris PeBenito 8a0da1
class chr_file { getattr read write };
Chris PeBenito 8a0da1
')
Chris PeBenito 8a0da1
Chris PeBenito 8a0da1
########################################
Chris PeBenito 8a0da1
#
Chris PeBenito 3ce6cb
# terminal_use_all_terminals(domain)
Chris PeBenito de2cee
#
Chris PeBenito de2cee
define(`terminal_use_all_terminals',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito 3ce6cb
devices_list_device_nodes($1)
Chris PeBenito 3b857e
allow $1 devpts_t:dir r_dir_perms;
Chris PeBenito 3b857e
allow $1 { console_device_t tty_device_t ttynode ptynode }:chr_file rw_file_perms;
Chris PeBenito de2cee
')
Chris PeBenito de2cee
Chris PeBenito de2cee
define(`terminal_use_all_terminals_depend',`
Chris PeBenito de2cee
attribute ttynode, ptynode;
Chris PeBenito f5c42b
type console_device_t, devpts_t, tty_device_t;
Chris PeBenito 3b857e
class dir r_dir_perms;
Chris PeBenito 3b857e
class chr_file rw_file_perms;
Chris PeBenito 3b857e
')
Chris PeBenito 3b857e
Chris PeBenito 3b857e
########################################
Chris PeBenito 3b857e
## <interface name="terminal_write_console">
Chris PeBenito 3b857e
##	<description>
Chris PeBenito 3b857e
##		Write to the console.
Chris PeBenito 3b857e
##	</description>
Chris PeBenito 3b857e
##	<parameter name="domain">
Chris PeBenito 3b857e
##		The type of the process performing this action.
Chris PeBenito 3b857e
##	</parameter>
Chris PeBenito 3b857e
##	<infoflow type="write" weight="10"/>
Chris PeBenito 3b857e
## </interface>
Chris PeBenito 3b857e
#
Chris PeBenito 3b857e
define(`terminal_write_console',`
Chris PeBenito 3b857e
	requires_block_template(`$0'_depend)
Chris PeBenito 3b857e
Chris PeBenito 3b857e
	devices_list_device_nodes($1)
Chris PeBenito 3b857e
	allow $1 console_device_t:chr_file write;
Chris PeBenito 3b857e
')
Chris PeBenito 3b857e
Chris PeBenito 3b857e
define(`terminal_use_console_depend',`
Chris PeBenito 3b857e
	type console_device_t;
Chris PeBenito 3b857e
	class chr_file write;
Chris PeBenito 3ce6cb
')
Chris PeBenito 3ce6cb
Chris PeBenito 3ce6cb
########################################
Chris PeBenito daa0e0
## <interface name="terminal_use_console">
Chris PeBenito daa0e0
##	<description>
Chris PeBenito daa0e0
##		Read from and write to the console.
Chris PeBenito daa0e0
##	</description>
Chris PeBenito daa0e0
##	<parameter name="domain">
Chris PeBenito daa0e0
##		The type of the process performing this action.
Chris PeBenito daa0e0
##	</parameter>
Chris PeBenito daa0e0
##	<infoflow type="both" weight="10"/>
Chris PeBenito daa0e0
## </interface>
Chris PeBenito 3ce6cb
#
Chris PeBenito 7bba9d
define(`terminal_use_console',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito daa0e0
devices_list_device_nodes($1)
Chris PeBenito 3b857e
allow $1 console_device_t:chr_file rw_file_perms;
Chris PeBenito 3ce6cb
')
Chris PeBenito 3ce6cb
Chris PeBenito 7bba9d
define(`terminal_use_console_depend',`
Chris PeBenito 7bba9d
type console_device_t;
Chris PeBenito 3b857e
class chr_file rw_file_perms;
Chris PeBenito 3ce6cb
')
Chris PeBenito 3ce6cb
Chris PeBenito 3ce6cb
########################################
Chris PeBenito daa0e0
## <interface name="terminal_ignore_use_console">
Chris PeBenito daa0e0
##	<description>
Chris PeBenito daa0e0
##		Do not audit read from or write to the console.
Chris PeBenito daa0e0
##	</description>
Chris PeBenito daa0e0
##	<parameter name="domain">
Chris PeBenito daa0e0
##		The type of the process performing this action.
Chris PeBenito daa0e0
##	</parameter>
Chris PeBenito daa0e0
##	<infoflow type="both" weight="10"/>
Chris PeBenito daa0e0
## </interface>
Chris PeBenito 3ce6cb
#
Chris PeBenito 7bba9d
define(`terminal_ignore_use_console',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito 7bba9d
dontaudit $1 console_device_t:chr_file { read write };
Chris PeBenito 3ce6cb
')
Chris PeBenito 3ce6cb
Chris PeBenito 7bba9d
define(`terminal_ignore_use_console_depend',`
Chris PeBenito 7bba9d
type console_device_t;
Chris PeBenito 3ce6cb
class chr_file { read write };
Chris PeBenito 3ce6cb
')
Chris PeBenito 3ce6cb
Chris PeBenito 3ce6cb
########################################
Chris PeBenito 3ce6cb
#
Chris PeBenito 7bba9d
# terminal_set_console_attributes(domain)
Chris PeBenito 3ce6cb
#
Chris PeBenito 7bba9d
define(`terminal_set_console_attributes',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito 7bba9d
devices_list_device_nodes($1,optional)
Chris PeBenito 7bba9d
allow $1 console_device_t:chr_file setattr;
Chris PeBenito 3ce6cb
')
Chris PeBenito 3ce6cb
Chris PeBenito 7bba9d
define(`terminal_set_console_attributes_depend',`
Chris PeBenito 7bba9d
type console_device_t;
Chris PeBenito 7bba9d
class chr_file setattr;
Chris PeBenito 7bba9d
devices_list_device_nodes_depend
Chris PeBenito 3ce6cb
')
Chris PeBenito 3ce6cb
Chris PeBenito 3ce6cb
########################################
Chris PeBenito 3ce6cb
#
Chris PeBenito 7bba9d
# terminal_list_pseudoterminals(domain)
Chris PeBenito 3ce6cb
#
Chris PeBenito 7bba9d
define(`terminal_list_pseudoterminals',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito daa0e0
devices_list_device_nodes($1)
Chris PeBenito 3ce6cb
allow $1 devpts_t:dir { getattr search read };
Chris PeBenito 3ce6cb
')
Chris PeBenito 3ce6cb
Chris PeBenito 7bba9d
define(`terminal_list_pseudoterminals_depend',`
Chris PeBenito 7bba9d
type devpts_t;
Chris PeBenito 3ce6cb
class dir { getattr search read };
Chris PeBenito 7bba9d
devices_list_device_nodes_depend
Chris PeBenito 3ce6cb
')
Chris PeBenito 3ce6cb
Chris PeBenito 3ce6cb
########################################
Chris PeBenito 3ce6cb
#
Chris PeBenito 7bba9d
# terminal_ignore_list_pseudoterminals(domain)
Chris PeBenito 3ce6cb
#
Chris PeBenito 7bba9d
define(`terminal_ignore_list_pseudoterminals',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito 7bba9d
dontaudit $1 devpts_t:dir { getattr search read };
Chris PeBenito 3ce6cb
')
Chris PeBenito 3ce6cb
Chris PeBenito 7bba9d
define(`terminal_ignore_list_pseudoterminals_depend',`
Chris PeBenito 7bba9d
type devpts_t;
Chris PeBenito 3ce6cb
class dir { getattr search read };
Chris PeBenito 3ce6cb
')
Chris PeBenito 3ce6cb
Chris PeBenito 3ce6cb
########################################
Chris PeBenito 3ce6cb
#
Chris PeBenito 7bba9d
# terminal_use_general_pseudoterminal(domain)
Chris PeBenito 3ce6cb
#
Chris PeBenito 7bba9d
define(`terminal_use_general_pseudoterminal',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito 7bba9d
devices_list_device_nodes($1)
Chris PeBenito 7bba9d
allow $1 devpts_t:chr_file { read write };
Chris PeBenito 3ce6cb
')
Chris PeBenito 3ce6cb
Chris PeBenito 7bba9d
define(`terminal_use_general_pseudoterminal_depend',`
Chris PeBenito 7bba9d
type devpts_t;
Chris PeBenito de2cee
class chr_file { read write };
Chris PeBenito de2cee
')
Chris PeBenito de2cee
Chris PeBenito de2cee
########################################
Chris PeBenito de2cee
#
Chris PeBenito 7bba9d
# terminal_ignore_use_general_pseudoterminal(domain)
Chris PeBenito b4cd15
#
Chris PeBenito 7bba9d
define(`terminal_ignore_use_general_pseudoterminal',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito 7bba9d
dontaudit $1 devpts_t:chr_file { read write };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito 7bba9d
define(`terminal_ignore_use_general_pseudoterminal_depend',`
Chris PeBenito 7bba9d
type devpts_t;
Chris PeBenito b4cd15
class chr_file { read write };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
########################################
Chris PeBenito b4cd15
#
Chris PeBenito 7bba9d
# terminal_use_controlling_terminal(domain)
Chris PeBenito 811985
#
Chris PeBenito 7bba9d
define(`terminal_use_controlling_terminal',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito 7bba9d
devices_list_device_nodes($1)
Chris PeBenito d490eb
allow $1 devtty_t:chr_file { getattr read write ioctl };
Chris PeBenito 811985
')
Chris PeBenito 811985
Chris PeBenito 7bba9d
define(`terminal_use_controlling_terminal_depend',`
Chris PeBenito 7bba9d
type devtty_t;
Chris PeBenito d490eb
class chr_file { getattr read write ioctl };
Chris PeBenito 811985
')
Chris PeBenito 811985
Chris PeBenito 811985
########################################
Chris PeBenito 811985
#
Chris PeBenito 7bba9d
# terminal_ignore_use_pseudoterminal_multiplexer(domain)
Chris PeBenito 55a46d
#
Chris PeBenito 7bba9d
define(`terminal_ignore_use_pseudoterminal_multiplexer',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito 7bba9d
dontaudit $1 ptmx_t:chr_file { getattr read write };
Chris PeBenito 55a46d
')
Chris PeBenito 55a46d
Chris PeBenito 7bba9d
define(`terminal_ignore_use_pseudoterminal_multiplexer_depend',`
Chris PeBenito 7bba9d
type ptmx_t;
Chris PeBenito 7bba9d
class chr_file { getattr read write };
Chris PeBenito 55a46d
')
Chris PeBenito 55a46d
Chris PeBenito 55a46d
########################################
Chris PeBenito 55a46d
#
Chris PeBenito b16c6b
# terminal_get_all_private_pseudoterminal_attributes(domain)
Chris PeBenito b4cd15
#
Chris PeBenito b16c6b
define(`terminal_get_all_private_pseudoterminal_attributes',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito d0eddb
devices_list_device_nodes($1)
Chris PeBenito 7bba9d
allow $1 devpts_t:dir { getattr search read };
Chris PeBenito 7bba9d
allow $1 ptynode:chr_file getattr;
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b16c6b
define(`terminal_get_all_private_pseudoterminal_attributes_depend',`
Chris PeBenito 7bba9d
attribute ptynode;
Chris PeBenito 7bba9d
class dir { getattr search read };
Chris PeBenito 7bba9d
class chr_file getattr;
Chris PeBenito 7bba9d
')
Chris PeBenito 7bba9d
Chris PeBenito 7bba9d
########################################
Chris PeBenito 7bba9d
#
Chris PeBenito b16c6b
# terminal_use_all_private_pseudoterminals(domain)
Chris PeBenito 7bba9d
#
Chris PeBenito b16c6b
define(`terminal_use_all_private_pseudoterminals',`
Chris PeBenito 7bba9d
requires_block_template(`$0'_depend)
Chris PeBenito 7bba9d
devices_list_device_nodes($1)
Chris PeBenito 7bba9d
allow $1 devpts_t:dir { getattr read search };
Chris PeBenito 4bf4ed
allow $1 ptynode:chr_file { getattr read write ioctl };
Chris PeBenito 7bba9d
')
Chris PeBenito 7bba9d
Chris PeBenito b16c6b
define(`terminal_use_all_private_pseudoterminals_depend',`
Chris PeBenito 7bba9d
attribute ptynode;
Chris PeBenito 7bba9d
class dir { getattr search read };
Chris PeBenito 4bf4ed
class chr_file { getattr read write ioctl };
Chris PeBenito d0eddb
')
Chris PeBenito d0eddb
Chris PeBenito d0eddb
########################################
Chris PeBenito d0eddb
#
Chris PeBenito b16c6b
# terminal_ignore_use_all_private_pseudoterminals(domain)
Chris PeBenito d0eddb
#
Chris PeBenito b16c6b
define(`terminal_ignore_use_all_private_pseudoterminals',`
Chris PeBenito d0eddb
requires_block_template(`$0'_depend)
Chris PeBenito 7bba9d
dontaudit $1 ptynode:chr_file { read write };
Chris PeBenito d0eddb
')
Chris PeBenito d0eddb
Chris PeBenito b16c6b
define(`terminal_ignore_use_all_private_pseudoterminals_depend',`
Chris PeBenito 7bba9d
attribute ptynode;
Chris PeBenito d0eddb
class chr_file { read write };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
########################################
Chris PeBenito b4cd15
#
Chris PeBenito 7bba9d
# terminal_get_general_physical_terminal_attributes(domain)
Chris PeBenito 7bba9d
#
Chris PeBenito 7bba9d
define(`terminal_get_general_physical_terminal_attributes',`
Chris PeBenito 7bba9d
requires_block_template(`$0'_depend)
Chris PeBenito 7bba9d
devices_list_device_nodes($1)
Chris PeBenito 7bba9d
allow $1 tty_device_t:chr_file getattr;
Chris PeBenito 7bba9d
')
Chris PeBenito 7bba9d
Chris PeBenito 7bba9d
define(`terminal_get_general_physical_terminal_attributes_depend',`
Chris PeBenito 7bba9d
type tty_device_t;
Chris PeBenito 7bba9d
class chr_file getattr;
Chris PeBenito 7bba9d
')
Chris PeBenito 7bba9d
Chris PeBenito 7bba9d
########################################
Chris PeBenito 7bba9d
#
Chris PeBenito 7bba9d
# terminal_set_general_physical_terminal_attributes(domain)
Chris PeBenito 7bba9d
#
Chris PeBenito 7bba9d
define(`terminal_set_general_physical_terminal_attributes',`
Chris PeBenito 7bba9d
requires_block_template(`$0'_depend)
Chris PeBenito 7bba9d
devices_list_device_nodes($1)
Chris PeBenito 7bba9d
allow $1 tty_device_t:chr_file setattr;
Chris PeBenito 7bba9d
')
Chris PeBenito 7bba9d
Chris PeBenito 7bba9d
define(`terminal_set_general_physical_terminal_attributes_depend',`
Chris PeBenito 7bba9d
type tty_device_t;
Chris PeBenito 7bba9d
class chr_file setattr;
Chris PeBenito 7bba9d
')
Chris PeBenito 7bba9d
Chris PeBenito 7bba9d
########################################
Chris PeBenito 7bba9d
#
Chris PeBenito 4bf4ed
# terminal_relabel_general_physical_terminal(domain)
Chris PeBenito 4bf4ed
#
Chris PeBenito 4bf4ed
define(`terminal_relabel_general_physical_terminal',`
Chris PeBenito 4bf4ed
requires_block_template(`$0'_depend)
Chris PeBenito 4bf4ed
devices_list_device_nodes($1)
Chris PeBenito 4bf4ed
allow $1 tty_device_t:chr_file { relabelfrom relabelto };
Chris PeBenito 4bf4ed
')
Chris PeBenito 4bf4ed
Chris PeBenito 4bf4ed
define(`terminal_relabel_general_physical_terminal_depend',`
Chris PeBenito 4bf4ed
type tty_device_t;
Chris PeBenito 4bf4ed
class chr_file { relabelfrom relabelto };
Chris PeBenito 4bf4ed
')
Chris PeBenito 4bf4ed
Chris PeBenito 4bf4ed
########################################
Chris PeBenito 4bf4ed
#
Chris PeBenito de2cee
# terminal_reset_physical_terminal_labels(domain)
Chris PeBenito b4cd15
#
Chris PeBenito de2cee
define(`terminal_reset_physical_terminal_labels',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito de2cee
devices_list_device_nodes($1)
Chris PeBenito de2cee
allow $1 ttynode:chr_file relabelfrom;
Chris PeBenito de2cee
allow $1 tty_device_t:chr_file relabelto;
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito de2cee
define(`terminal_reset_physical_terminal_labels_depend',`
Chris PeBenito de2cee
attribute ttynode;
Chris PeBenito de2cee
type tty_device_t;
Chris PeBenito de2cee
class chr_file { relabelfrom relabelto };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
########################################
Chris PeBenito daa0e0
## <interface name="terminal_write_general_physical_terminal">
Chris PeBenito daa0e0
##	<description>
Chris PeBenito daa0e0
##		Write to general ttys.  Has a backchannel of
Chris PeBenito daa0e0
##		getting all tty attributes.
Chris PeBenito daa0e0
##	</description>
Chris PeBenito daa0e0
##	<parameter name="domain">
Chris PeBenito daa0e0
##		The type of the process performing this action.
Chris PeBenito daa0e0
##	</parameter>
Chris PeBenito daa0e0
##	<infoflow type="write" weight="10"/>
Chris PeBenito daa0e0
## </interface>
Chris PeBenito daa0e0
#
Chris PeBenito daa0e0
define(`terminal_write_general_physical_terminal',`
Chris PeBenito daa0e0
requires_block_template(`$0'_depend)
Chris PeBenito daa0e0
devices_list_device_nodes($1)
Chris PeBenito daa0e0
allow $1 tty_device_t:chr_file { getattr write };
Chris PeBenito daa0e0
')
Chris PeBenito daa0e0
Chris PeBenito daa0e0
define(`terminal_write_general_physical_terminal_depend',`
Chris PeBenito daa0e0
type tty_device_t;
Chris PeBenito daa0e0
class chr_file { read write };
Chris PeBenito daa0e0
')
Chris PeBenito daa0e0
Chris PeBenito daa0e0
########################################
Chris PeBenito b4cd15
#
Chris PeBenito de2cee
# terminal_use_general_physical_terminal(domain)
Chris PeBenito de2cee
#
Chris PeBenito de2cee
define(`terminal_use_general_physical_terminal',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito de2cee
devices_list_device_nodes($1)
Chris PeBenito 4bf4ed
allow $1 tty_device_t:chr_file { getattr read write ioctl };
Chris PeBenito de2cee
')
Chris PeBenito de2cee
Chris PeBenito de2cee
define(`terminal_use_general_physical_terminal_depend',`
Chris PeBenito de2cee
type tty_device_t;
Chris PeBenito 4bf4ed
class chr_file { getattr read write ioctl };
Chris PeBenito de2cee
')
Chris PeBenito de2cee
Chris PeBenito de2cee
########################################
Chris PeBenito b4cd15
#
Chris PeBenito de2cee
# terminal_ignore_use_general_physical_terminal(domain)
Chris PeBenito de2cee
#
Chris PeBenito de2cee
define(`terminal_ignore_use_general_physical_terminal',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito de2cee
dontaudit $1 tty_device_t:chr_file { read write };
Chris PeBenito de2cee
')
Chris PeBenito de2cee
Chris PeBenito de2cee
define(`terminal_ignore_use_general_physical_terminal_depend',`
Chris PeBenito de2cee
type tty_device_t;
Chris PeBenito de2cee
class chr_file { read write };
Chris PeBenito de2cee
')
Chris PeBenito de2cee
Chris PeBenito de2cee
########################################
Chris PeBenito de2cee
#
Chris PeBenito b16c6b
# terminal_get_all_private_physical_terminal_attributes(domain)
Chris PeBenito ee5772
#
Chris PeBenito b16c6b
define(`terminal_get_all_private_physical_terminal_attributes',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito 7bba9d
devices_list_device_nodes($1)
Chris PeBenito 7bba9d
allow $1 ttynode:chr_file getattr;
Chris PeBenito ee5772
')
Chris PeBenito ee5772
Chris PeBenito b16c6b
define(`terminal_get_all_private_physical_terminal_attributes_depend',`
Chris PeBenito 7bba9d
attribute ttynode;
Chris PeBenito 7bba9d
class chr_file getattr;
Chris PeBenito ee5772
')
Chris PeBenito ee5772
Chris PeBenito ee5772
########################################
Chris PeBenito ee5772
#
Chris PeBenito 4bf4ed
# terminal_set_all_private_physical_terminal_attributes(domain)
Chris PeBenito 4bf4ed
#
Chris PeBenito 4bf4ed
define(`terminal_set_all_private_physical_terminal_attributes',`
Chris PeBenito 4bf4ed
requires_block_template(`$0'_depend)
Chris PeBenito 4bf4ed
devices_list_device_nodes($1)
Chris PeBenito 4bf4ed
allow $1 ttynode:chr_file setattr;
Chris PeBenito 4bf4ed
')
Chris PeBenito 4bf4ed
Chris PeBenito 4bf4ed
define(`terminal_set_all_private_physical_terminal_attributes_depend',`
Chris PeBenito 4bf4ed
attribute ttynode;
Chris PeBenito 4bf4ed
class chr_file setattr;
Chris PeBenito 4bf4ed
')
Chris PeBenito 4bf4ed
Chris PeBenito 4bf4ed
########################################
Chris PeBenito 4bf4ed
#
Chris PeBenito b16c6b
# terminal_ignore_get_all_private_physical_terminal_attributes(domain)
Chris PeBenito b4cd15
#
Chris PeBenito b16c6b
define(`terminal_ignore_get_all_private_physical_terminal_attributes',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito 7bba9d
dontaudit $1 ttynode:chr_file getattr;
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b16c6b
define(`terminal_ignore_get_all_private_physical_terminal_attributes_depend',`
Chris PeBenito 7bba9d
attribute ttynode;
Chris PeBenito 7bba9d
class chr_file getattr;
Chris PeBenito b4cd15
')
Chris PeBenito a2d824
Chris PeBenito a2d824
########################################
Chris PeBenito 4bf4ed
#
Chris PeBenito 4bf4ed
# terminal_relabel_all_private_physical_terminals(domain)
Chris PeBenito 4bf4ed
#
Chris PeBenito 4bf4ed
define(`terminal_relabel_all_private_physical_terminals',`
Chris PeBenito 4bf4ed
requires_block_template(`$0'_depend)
Chris PeBenito 4bf4ed
devices_list_device_nodes($1)
Chris PeBenito 4bf4ed
allow $1 ttynode:chr_file { relabelfrom relabelto };
Chris PeBenito 4bf4ed
')
Chris PeBenito 4bf4ed
Chris PeBenito 4bf4ed
define(`terminal_relabel_all_private_physical_terminals_depend',`
Chris PeBenito 4bf4ed
attribute ttynode;
Chris PeBenito 4bf4ed
class chr_file { relabelfrom relabelto };
Chris PeBenito 4bf4ed
')
Chris PeBenito 4bf4ed
Chris PeBenito 4bf4ed
########################################
Chris PeBenito daa0e0
## <interface name="terminal_write_all_private_physical_terminals">
Chris PeBenito daa0e0
##	<description>
Chris PeBenito daa0e0
##		Write to all private ttys.  Has a backchannel of
Chris PeBenito daa0e0
##		getting all private tty attributes.
Chris PeBenito daa0e0
##	</description>
Chris PeBenito daa0e0
##	<parameter name="domain">
Chris PeBenito daa0e0
##		The type of the process performing this action.
Chris PeBenito daa0e0
##	</parameter>
Chris PeBenito daa0e0
##	<infoflow type="write" weight="10"/>
Chris PeBenito daa0e0
## </interface>
Chris PeBenito daa0e0
#
Chris PeBenito daa0e0
define(`terminal_write_all_private_physical_terminals',`
Chris PeBenito daa0e0
requires_block_template(`$0'_depend)
Chris PeBenito daa0e0
devices_list_device_nodes($1)
Chris PeBenito daa0e0
allow $1 ttynode:chr_file { getattr write };
Chris PeBenito daa0e0
')
Chris PeBenito daa0e0
Chris PeBenito daa0e0
define(`terminal_write_all_private_physical_terminals_depend',`
Chris PeBenito daa0e0
attribute ttynode;
Chris PeBenito daa0e0
class chr_file { getattr write };
Chris PeBenito daa0e0
')
Chris PeBenito daa0e0
Chris PeBenito daa0e0
########################################
Chris PeBenito a2d824
#
Chris PeBenito b16c6b
# terminal_use_all_private_physical_terminals(domain)
Chris PeBenito a2d824
#
Chris PeBenito b16c6b
define(`terminal_use_all_private_physical_terminals',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito de2cee
devices_list_device_nodes($1)
Chris PeBenito 4bf4ed
allow $1 ttynode:chr_file { getattr read write ioctl };
Chris PeBenito a2d824
')
Chris PeBenito a2d824
Chris PeBenito b16c6b
define(`terminal_use_all_private_physical_terminals_depend',`
Chris PeBenito 7bba9d
attribute ttynode;
Chris PeBenito 4bf4ed
class chr_file { getattr read write ioctl };
Chris PeBenito de2cee
')
Chris PeBenito de2cee
Chris PeBenito de2cee
########################################
Chris PeBenito de2cee
#
Chris PeBenito b16c6b
# terminal_ignore_use_all_private_physical_terminals(domain)
Chris PeBenito de2cee
#
Chris PeBenito b16c6b
define(`terminal_ignore_use_all_private_physical_terminals',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito 7bba9d
dontaudit $1 ttynode:chr_file { read write };
Chris PeBenito de2cee
')
Chris PeBenito de2cee
Chris PeBenito b16c6b
define(`terminal_ignore_use_all_private_physical_terminals_depend',`
Chris PeBenito 7bba9d
attribute ttynode;
Chris PeBenito de2cee
class chr_file { read write };
Chris PeBenito a2d824
')
Chris PeBenito 4bf4ed
Chris PeBenito 4bf4ed
## </module>