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 0c73cd
	requires_block_template(`$0'_depend)
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	allow $1 devpts_t:filesystem associate;
Chris PeBenito 0c73cd
	typeattribute $1 ptynode;
Chris PeBenito b16c6b
')
Chris PeBenito b16c6b
Chris PeBenito b16c6b
define(`terminal_make_pseudoterminal_depend',`
Chris PeBenito 0c73cd
	attribute ptynode;
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	type devpts_t;
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	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 0c73cd
	requires_block_template(`$0'_depend)
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	terminal_make_pseudoterminal($1)
Chris PeBenito 0c73cd
	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 0c73cd
	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 0c73cd
	requires_block_template(`$0'_depend)
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	terminal_make_pseudoterminal($1)
Chris PeBenito 0c73cd
	typeattribute $1 server_ptynode;
Chris PeBenito b16c6b
')
Chris PeBenito b16c6b
Chris PeBenito b16c6b
define(`terminal_make_service_pseudoterminal_depend',`
Chris PeBenito 0c73cd
	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 0c73cd
	requires_block_template(`$0'_depend)
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	typeattribute $2 ttynode;
Chris PeBenito 0c73cd
	type_change $1 tty_device_t:chr_file $2;
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	# Debian login is from shadow utils and does not allow resetting the perms.
Chris PeBenito 0c73cd
	# have to fix this!
Chris PeBenito 254bbc
	ifdef(`distro_debian',`
Chris PeBenito 0c73cd
		type_change $1 ttyfile:chr_file $2;
Chris PeBenito 0c73cd
	')
Chris PeBenito 0c73cd
Chris PeBenito 254bbc
	ifdef(`distro_redhat',`
Chris PeBenito 763c44
		fs_tmpfs_associate($2)
Chris PeBenito 0c73cd
	')
Chris PeBenito b16c6b
')
Chris PeBenito b16c6b
Chris PeBenito b16c6b
define(`terminal_make_physical_terminal_depend',`
Chris PeBenito 0c73cd
	attribute ttynode;
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	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 0c73cd
	requires_block_template(`$0'_depend)
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	devices_list_device_nodes($1)
Chris PeBenito 0c73cd
	allow $1 ptmx_t:chr_file { getattr read write };
Chris PeBenito 0c73cd
	allow $1 devpts_t:dir r_dir_perms;
Chris PeBenito 0c73cd
	allow $1 devpts_t:filesystem getattr;
Chris PeBenito 0c73cd
	dontaudit $1 bsdpty_device_t:chr_file { getattr read write };
Chris PeBenito 0c73cd
	type_transition $1 devpts_t:chr_file $2;
Chris PeBenito 8a0da1
')
Chris PeBenito 8a0da1
Chris PeBenito b16c6b
define(`terminal_create_pseudoterminal_depend',`
Chris PeBenito 0c73cd
	type ptmx_t, devpts_t;
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	class filesystem getattr;
Chris PeBenito 0c73cd
	class dir r_dir_perms;
Chris PeBenito 0c73cd
	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 0c73cd
	requires_block_template(`$0'_depend)
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	devices_list_device_nodes($1)
Chris PeBenito 0c73cd
	allow $1 devpts_t:dir r_dir_perms;
Chris PeBenito 0c73cd
	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 0c73cd
	attribute ttynode, ptynode;
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	type console_device_t, devpts_t, tty_device_t;
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	class dir r_dir_perms;
Chris PeBenito 0c73cd
	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 0c73cd
	requires_block_template(`$0'_depend)
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	devices_list_device_nodes($1)
Chris PeBenito 0c73cd
	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 0c73cd
	type console_device_t;
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	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 0c73cd
	requires_block_template(`$0'_depend)
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	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 0c73cd
	type console_device_t;
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	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 0c73cd
	requires_block_template(`$0'_depend)
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	devices_list_device_nodes($1)
Chris PeBenito 0c73cd
	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 0c73cd
	type console_device_t;
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	class chr_file setattr;
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 0c73cd
	requires_block_template(`$0'_depend)
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	devices_list_device_nodes($1)
Chris PeBenito 0c73cd
	allow $1 devpts_t:dir r_dir_perms;
Chris PeBenito 3ce6cb
')
Chris PeBenito 3ce6cb
Chris PeBenito 7bba9d
define(`terminal_list_pseudoterminals_depend',`
Chris PeBenito 0c73cd
	type devpts_t;
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	class dir r_dir_perms;
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 0c73cd
	requires_block_template(`$0'_depend)
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	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 0c73cd
	type devpts_t;
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	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 0c73cd
	requires_block_template(`$0'_depend)
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	devices_list_device_nodes($1)
Chris PeBenito 0c73cd
	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 0c73cd
	type devpts_t;
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	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 0c73cd
	requires_block_template(`$0'_depend)
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	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 0c73cd
	type devpts_t;
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	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 0c73cd
	requires_block_template(`$0'_depend)
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	devices_list_device_nodes($1)
Chris PeBenito 0c73cd
	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 0c73cd
	type devtty_t;
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	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 0c73cd
	requires_block_template(`$0'_depend)
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	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 0c73cd
	type ptmx_t;
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	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 0c73cd
	requires_block_template(`$0'_depend)
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	devices_list_device_nodes($1)
Chris PeBenito 0c73cd
	allow $1 devpts_t:dir r_dir_perms;
Chris PeBenito 0c73cd
	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 0c73cd
	attribute ptynode;
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	class dir r_dir_perms;
Chris PeBenito 0c73cd
	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 0c73cd
	requires_block_template(`$0'_depend)
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	devices_list_device_nodes($1)
Chris PeBenito 0c73cd
	allow $1 devpts_t:dir r_dir_perms;
Chris PeBenito 0c73cd
	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 0c73cd
	attribute ptynode;
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	class dir r_dir_perms;
Chris PeBenito 0c73cd
	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 0c73cd
	requires_block_template(`$0'_depend)
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	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 0c73cd
	attribute ptynode;
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	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 0c73cd
	requires_block_template(`$0'_depend)
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	devices_list_device_nodes($1)
Chris PeBenito 0c73cd
	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 0c73cd
	type tty_device_t;
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	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 0c73cd
	requires_block_template(`$0'_depend)
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	devices_list_device_nodes($1)
Chris PeBenito 0c73cd
	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 0c73cd
	type tty_device_t;
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	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 0c73cd
	requires_block_template(`$0'_depend)
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	devices_list_device_nodes($1)
Chris PeBenito 0c73cd
	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 0c73cd
	type tty_device_t;
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	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 0c73cd
	requires_block_template(`$0'_depend)
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	devices_list_device_nodes($1)
Chris PeBenito 0c73cd
	allow $1 ttynode:chr_file relabelfrom;
Chris PeBenito 0c73cd
	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 0c73cd
	attribute ttynode;
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	type tty_device_t;
Chris PeBenito 0c73cd
	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 0c73cd
	requires_block_template(`$0'_depend)
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	devices_list_device_nodes($1)
Chris PeBenito 0c73cd
	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 0c73cd
	type tty_device_t;
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	class chr_file { getattr 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 0c73cd
	requires_block_template(`$0'_depend)
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	devices_list_device_nodes($1)
Chris PeBenito 0c73cd
	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 0c73cd
	type tty_device_t;
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	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 0c73cd
	requires_block_template(`$0'_depend)
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	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 0c73cd
	type tty_device_t;
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	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 0c73cd
	requires_block_template(`$0'_depend)
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	devices_list_device_nodes($1)
Chris PeBenito 0c73cd
	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 0c73cd
	attribute ttynode;
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	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 0c73cd
	requires_block_template(`$0'_depend)
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	devices_list_device_nodes($1)
Chris PeBenito 0c73cd
	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 0c73cd
	attribute ttynode;
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	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 0c73cd
	requires_block_template(`$0'_depend)
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	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 0c73cd
	attribute ttynode;
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	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 0c73cd
	requires_block_template(`$0'_depend)
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	devices_list_device_nodes($1)
Chris PeBenito 0c73cd
	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 0c73cd
	attribute ttynode;
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	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 0c73cd
	requires_block_template(`$0'_depend)
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	devices_list_device_nodes($1)
Chris PeBenito 0c73cd
	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 0c73cd
	attribute ttynode;
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	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 0c73cd
	requires_block_template(`$0'_depend)
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	devices_list_device_nodes($1)
Chris PeBenito 0c73cd
	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 0c73cd
	attribute ttynode;
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	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 0c73cd
	requires_block_template(`$0'_depend)
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	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 0c73cd
	attribute ttynode;
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	class chr_file { read write };
Chris PeBenito a2d824
')
Chris PeBenito 4bf4ed
Chris PeBenito 4bf4ed
## </module>