2005-04-20 19:07:16 +00:00
|
|
|
# Copyright (C) 2005 Tresys Technology, LLC
|
|
|
|
|
2005-04-22 19:31:32 +00:00
|
|
|
########################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# terminal_make_pseudoterminal(domain,ptytype)
|
2005-04-22 19:31:32 +00:00
|
|
|
#
|
|
|
|
define(`terminal_make_pseudoterminal',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-22 19:31:32 +00:00
|
|
|
devices_list_device_nodes($1,optional)
|
|
|
|
allow $1 ptmx_t:chr_file { getattr read write };
|
|
|
|
allow $1 devpts_t:dir { getattr search read };
|
|
|
|
allow $1 devpts_t:filesystem getattr;
|
|
|
|
allow $2 devpts_t:filesystem associate;
|
2005-04-26 17:00:25 +00:00
|
|
|
dontaudit $1 bsdpty_device_t:chr_file { getattr read write };
|
2005-04-22 19:31:32 +00:00
|
|
|
type_transition $1 devpts_t:chr_file $2;
|
|
|
|
typeattribute $2 ptynode;
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`terminal_make_pseudoterminal_depend',`
|
|
|
|
attribute ptynode;
|
|
|
|
type ptmx_t, devpts_t;
|
|
|
|
class filesystem { getattr associate };
|
|
|
|
class dir { getattr search read };
|
|
|
|
class chr_file { getattr read write };
|
|
|
|
devices_list_device_nodes_depend
|
|
|
|
')
|
|
|
|
|
2005-05-02 18:42:10 +00:00
|
|
|
########################################
|
|
|
|
#
|
2005-05-03 20:23:33 +00:00
|
|
|
# terminal_use_all_terminals(domain)
|
2005-05-02 18:42:10 +00:00
|
|
|
#
|
|
|
|
define(`terminal_use_all_terminals',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-05-03 20:23:33 +00:00
|
|
|
devices_list_device_nodes($1)
|
|
|
|
allow $1 devpts_t:dir { getattr search read };
|
2005-05-02 18:42:10 +00:00
|
|
|
allow $1 { console_device_t devtty_t ttynode ptynode }:chr_file { read write };
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`terminal_use_all_terminals_depend',`
|
|
|
|
attribute ttynode, ptynode;
|
|
|
|
type console_device_t, devtty_t, devpts_t;
|
2005-05-03 20:23:33 +00:00
|
|
|
class dir { getattr search read };
|
|
|
|
class chr_file { read write };
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# terminal_get_all_users_physical_terminal_attributes(domain)
|
|
|
|
#
|
|
|
|
define(`terminal_get_all_users_physical_terminal_attributes',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-05-03 20:23:33 +00:00
|
|
|
devices_list_device_nodes($1)
|
|
|
|
allow $1 ttynode:chr_file getattr;
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`terminal_get_all_users_physical_terminal_attributes_depend',`
|
|
|
|
attribute ttynode;
|
|
|
|
class chr_file getattr;
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# terminal_use_all_users_physical_terminals(domain)
|
|
|
|
#
|
|
|
|
define(`terminal_use_all_users_physical_terminals',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-05-03 20:23:33 +00:00
|
|
|
devices_list_device_nodes($1)
|
|
|
|
allow $1 ttynode:chr_file { read write };
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`terminal_use_all_users_physical_terminals_depend',`
|
|
|
|
attribute ttynode;
|
|
|
|
class chr_file { read write };
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# terminal_ignore_use_all_users_physical_terminals(domain)
|
|
|
|
#
|
|
|
|
define(`terminal_ignore_use_all_users_physical_terminals',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-05-03 20:23:33 +00:00
|
|
|
dontaudit $1 ttynode:chr_file { read write };
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`terminal_ignore_use_all_users_physical_terminals_depend',`
|
|
|
|
attribute ttynode;
|
|
|
|
class chr_file { read write };
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# terminal_get_all_users_pseudoterminal_attributes(domain)
|
|
|
|
#
|
|
|
|
define(`terminal_get_all_users_pseudoterminal_attributes',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-05-03 20:23:33 +00:00
|
|
|
devices_list_device_nodes($1)
|
|
|
|
allow $1 devpts_t:dir { getattr search read };
|
|
|
|
allow $1 ptynode:chr_file getattr;
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`terminal_get_all_users_pseudoterminal_attributes_depend',`
|
|
|
|
attribute ptynode;
|
|
|
|
class dir { getattr search read };
|
|
|
|
class chr_file getattr;
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# terminal_use_all_users_pseudoterminals(domain)
|
|
|
|
#
|
|
|
|
define(`terminal_use_all_users_pseudoterminals',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-05-03 20:23:33 +00:00
|
|
|
devices_list_device_nodes($1)
|
|
|
|
allow $1 devpts_t:dir { getattr read search };
|
|
|
|
allow $1 ptynode:chr_file { read write };
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`terminal_use_all_users_pseudoterminals_depend',`
|
|
|
|
attribute ptynode;
|
|
|
|
class dir { getattr search read };
|
|
|
|
class chr_file { read write };
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# terminal_ignore_use_all_users_pseudoterminals(domain)
|
|
|
|
#
|
|
|
|
define(`terminal_ignore_use_all_users_pseudoterminals',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-05-03 20:23:33 +00:00
|
|
|
dontaudit $1 ptynode:chr_file { read write };
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`terminal_ignore_use_all_users_pseudoterminals_depend',`
|
|
|
|
attribute ptynode;
|
2005-05-02 18:42:10 +00:00
|
|
|
class chr_file { read write };
|
|
|
|
')
|
|
|
|
|
2005-04-14 20:18:17 +00:00
|
|
|
########################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# terminal_use_console(domain)
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
|
|
|
define(`terminal_use_console',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-14 20:18:17 +00:00
|
|
|
devices_list_device_nodes($1,optional)
|
|
|
|
allow $1 console_device_t:chr_file { read write };
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`terminal_use_console_depend',`
|
|
|
|
type console_device_t;
|
|
|
|
class chr_file { read write };
|
|
|
|
devices_list_device_nodes_depend
|
|
|
|
')
|
|
|
|
|
2005-04-27 21:54:39 +00:00
|
|
|
########################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# terminal_ignore_use_console(domain)
|
2005-04-27 21:54:39 +00:00
|
|
|
#
|
|
|
|
define(`terminal_ignore_use_console',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-27 21:54:39 +00:00
|
|
|
dontaudit $1 console_device_t:chr_file { read write };
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`terminal_ignore_use_console_depend',`
|
|
|
|
type console_device_t;
|
|
|
|
class chr_file { read write };
|
|
|
|
')
|
|
|
|
|
2005-04-28 15:47:50 +00:00
|
|
|
########################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# terminal_set_console_attributes(domain)
|
2005-04-28 15:47:50 +00:00
|
|
|
#
|
|
|
|
define(`terminal_set_console_attributes',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-28 15:47:50 +00:00
|
|
|
devices_list_device_nodes($1,optional)
|
|
|
|
allow $1 console_device_t:chr_file setattr;
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`terminal_set_console_attributes_depend',`
|
|
|
|
type console_device_t;
|
|
|
|
class chr_file setattr;
|
|
|
|
devices_list_device_nodes_depend
|
|
|
|
')
|
|
|
|
|
2005-04-14 20:18:17 +00:00
|
|
|
########################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# terminal_use_controlling_terminal(domain)
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
|
|
|
define(`terminal_use_controlling_terminal',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-14 20:18:17 +00:00
|
|
|
devices_list_device_nodes($1,optional)
|
|
|
|
allow $1 devtty_t:chr_file { read write };
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`terminal_use_controlling_terminal_depend',`
|
|
|
|
type devtty_t;
|
|
|
|
class chr_file { read write };
|
|
|
|
devices_list_device_nodes_depend
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
2005-05-02 18:42:10 +00:00
|
|
|
# terminal_reset_physical_terminal_labels(domain)
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-05-02 18:42:10 +00:00
|
|
|
define(`terminal_reset_physical_terminal_labels',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-05-02 18:42:10 +00:00
|
|
|
devices_list_device_nodes($1)
|
|
|
|
allow $1 ttynode:chr_file relabelfrom;
|
|
|
|
allow $1 tty_device_t:chr_file relabelto;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2005-05-02 18:42:10 +00:00
|
|
|
define(`terminal_reset_physical_terminal_labels_depend',`
|
|
|
|
attribute ttynode;
|
|
|
|
type tty_device_t;
|
|
|
|
class chr_file { relabelfrom relabelto };
|
2005-04-14 20:18:17 +00:00
|
|
|
devices_list_device_nodes_depend
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
2005-05-02 18:42:10 +00:00
|
|
|
# terminal_use_general_physical_terminal(domain)
|
|
|
|
#
|
|
|
|
define(`terminal_use_general_physical_terminal',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-05-02 18:42:10 +00:00
|
|
|
devices_list_device_nodes($1)
|
|
|
|
allow $1 tty_device_t:chr_file { read write };
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`terminal_use_general_physical_terminal_depend',`
|
|
|
|
type tty_device_t;
|
|
|
|
class chr_file { read write };
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-05-02 18:42:10 +00:00
|
|
|
# terminal_ignore_use_general_physical_terminal(domain)
|
|
|
|
#
|
|
|
|
define(`terminal_ignore_use_general_physical_terminal',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-05-02 18:42:10 +00:00
|
|
|
dontaudit $1 tty_device_t:chr_file { read write };
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`terminal_ignore_use_general_physical_terminal_depend',`
|
|
|
|
type tty_device_t;
|
|
|
|
class chr_file { read write };
|
|
|
|
')
|
|
|
|
|
2005-04-28 18:59:01 +00:00
|
|
|
########################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# terminal_list_pseudoterminals(domain)
|
2005-04-28 18:59:01 +00:00
|
|
|
#
|
|
|
|
define(`terminal_list_pseudoterminals',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-28 18:59:01 +00:00
|
|
|
devices_list_device_nodes($1,optional)
|
|
|
|
allow $1 devpts_t:dir { getattr search read };
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`terminal_list_pseudoterminals_depend',`
|
|
|
|
type devpts_t;
|
|
|
|
class dir { getattr search read };
|
|
|
|
devices_list_device_nodes_depend
|
|
|
|
')
|
|
|
|
|
2005-04-14 20:18:17 +00:00
|
|
|
########################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# terminal_ignore_list_pseudoterminals(domain)
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-04-22 19:31:32 +00:00
|
|
|
define(`terminal_ignore_list_pseudoterminals',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-22 19:31:32 +00:00
|
|
|
dontaudit $1 devpts_t:dir { getattr search read };
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2005-04-22 19:31:32 +00:00
|
|
|
define(`terminal_ignore_list_pseudoterminals_depend',`
|
2005-04-14 20:18:17 +00:00
|
|
|
type devpts_t;
|
|
|
|
class dir { getattr search read };
|
|
|
|
')
|
2005-04-28 21:41:09 +00:00
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
2005-05-02 18:42:10 +00:00
|
|
|
# terminal_use_general_pseudoterminal(domain)
|
2005-04-28 21:41:09 +00:00
|
|
|
#
|
2005-05-02 18:42:10 +00:00
|
|
|
define(`terminal_use_general_pseudoterminal',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-05-02 18:42:10 +00:00
|
|
|
devices_list_device_nodes($1)
|
|
|
|
allow $1 devpts_t:chr_file { read write };
|
2005-04-28 21:41:09 +00:00
|
|
|
')
|
|
|
|
|
2005-05-02 18:42:10 +00:00
|
|
|
define(`terminal_use_general_pseudoterminal_depend',`
|
|
|
|
type devpts_t;
|
|
|
|
class chr_file { read write };
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# terminal_ignore_use_general_pseudoterminal(domain)
|
|
|
|
#
|
|
|
|
define(`terminal_ignore_use_general_pseudoterminal',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-05-02 18:42:10 +00:00
|
|
|
dontaudit $1 devpts_t:chr_file { read write };
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`terminal_ignore_use_general_pseudoterminal_depend',`
|
|
|
|
type devpts_t;
|
|
|
|
class chr_file { read write };
|
2005-04-28 21:41:09 +00:00
|
|
|
')
|
2005-05-04 17:01:46 +00:00
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# terminal_ignore_use_pseudoterminal_multiplexer(domain)
|
|
|
|
#
|
|
|
|
define(`terminal_ignore_use_pseudoterminal_multiplexer',`
|
|
|
|
requires_block_template(`$0'_depend)
|
|
|
|
dontaudit $1 ptmx_t:chr_file { getattr read write };
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`terminal_ignore_use_pseudoterminal_multiplexer_depend',`
|
|
|
|
type ptmx_t;
|
|
|
|
class chr_file { getattr read write };
|
|
|
|
')
|