2005-05-31 19:52:57 +00:00
|
|
|
## <module name="terminal" layer="kernel">
|
|
|
|
## <summary>Policy for terminals.</summary>
|
2005-04-20 19:07:16 +00:00
|
|
|
|
2005-04-22 19:31:32 +00:00
|
|
|
########################################
|
|
|
|
#
|
2005-06-08 18:40:30 +00:00
|
|
|
# term_make_pty(type)
|
2005-04-22 19:31:32 +00:00
|
|
|
#
|
2005-06-08 18:40:30 +00:00
|
|
|
define(`term_make_pty',`
|
2005-06-03 12:25:14 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
|
|
|
|
|
|
|
allow $1 devpts_t:filesystem associate;
|
|
|
|
typeattribute $1 ptynode;
|
2005-05-16 21:10:33 +00:00
|
|
|
')
|
|
|
|
|
2005-06-08 18:40:30 +00:00
|
|
|
define(`term_make_pty_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
attribute ptynode;
|
|
|
|
|
|
|
|
type devpts_t;
|
|
|
|
|
|
|
|
class filesystem associate;
|
2005-05-16 21:10:33 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-06-08 18:40:30 +00:00
|
|
|
## <interface name="term_make_user_pty">
|
|
|
|
## <description>
|
|
|
|
## Transform specified type into a user
|
|
|
|
## pty type. Interactive ptys will be relabeled
|
|
|
|
## </description>
|
|
|
|
## <parameter name="userdomain">
|
2005-06-09 17:23:53 +00:00
|
|
|
## The userdomain associated with this pty.
|
2005-06-08 18:40:30 +00:00
|
|
|
## </parameter>
|
|
|
|
## <parameter name="pty_type">
|
|
|
|
## An object type that will applied to a pty.
|
|
|
|
## </parameter>
|
|
|
|
## </interface>
|
2005-05-16 21:10:33 +00:00
|
|
|
#
|
2005-06-08 18:40:30 +00:00
|
|
|
define(`term_make_user_pty',`
|
2005-06-03 12:25:14 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
|
|
|
|
2005-06-08 18:40:30 +00:00
|
|
|
term_make_pty($1)
|
2005-06-03 12:25:14 +00:00
|
|
|
type_change $1 server_ptynode:chr_file $2;
|
2005-05-16 21:10:33 +00:00
|
|
|
')
|
|
|
|
|
2005-06-08 18:40:30 +00:00
|
|
|
define(`term_make_user_pty_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
attribute server_ptynode;
|
2005-05-16 21:10:33 +00:00
|
|
|
')
|
|
|
|
|
2005-06-08 18:40:30 +00:00
|
|
|
|
2005-05-16 21:10:33 +00:00
|
|
|
########################################
|
2005-06-08 18:40:30 +00:00
|
|
|
## <interface name="term_make_interactive_pty">
|
|
|
|
## <description>
|
|
|
|
## Transform specified type into an interactive
|
|
|
|
## pty type. This allows it to be relabeled via
|
|
|
|
## type change by login programs such as ssh.
|
|
|
|
## </description>
|
|
|
|
## <parameter name="object_type">
|
|
|
|
## An object type that will applied to a pty.
|
|
|
|
## </parameter>
|
|
|
|
## </interface>
|
2005-05-16 21:10:33 +00:00
|
|
|
#
|
2005-06-08 18:40:30 +00:00
|
|
|
define(`term_make_interactive_pty',`
|
2005-06-03 12:25:14 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
|
|
|
|
|
|
|
terminal_make_pseudoterminal($1)
|
|
|
|
typeattribute $1 server_ptynode;
|
2005-05-16 21:10:33 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
define(`terminal_make_service_pseudoterminal_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
attribute server_ptynode;
|
2005-05-16 21:10:33 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
2005-06-08 18:40:30 +00:00
|
|
|
# term_make_tty(domain,type)
|
2005-05-16 21:10:33 +00:00
|
|
|
#
|
2005-06-08 18:40:30 +00:00
|
|
|
define(`term_make_tty',`
|
2005-06-03 12:25:14 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
|
|
|
|
|
|
|
typeattribute $2 ttynode;
|
|
|
|
type_change $1 tty_device_t:chr_file $2;
|
|
|
|
|
|
|
|
# Debian login is from shadow utils and does not allow resetting the perms.
|
|
|
|
# have to fix this!
|
2005-06-07 18:45:47 +00:00
|
|
|
ifdef(`distro_debian',`
|
2005-06-03 12:25:14 +00:00
|
|
|
type_change $1 ttyfile:chr_file $2;
|
|
|
|
')
|
|
|
|
|
2005-06-07 18:45:47 +00:00
|
|
|
ifdef(`distro_redhat',`
|
2005-06-08 13:12:00 +00:00
|
|
|
fs_tmpfs_associate($2)
|
2005-06-03 12:25:14 +00:00
|
|
|
')
|
2005-05-16 21:10:33 +00:00
|
|
|
')
|
|
|
|
|
2005-06-08 18:40:30 +00:00
|
|
|
define(`term_make_tty_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
attribute ttynode;
|
|
|
|
|
|
|
|
type tty_device_t;
|
2005-05-16 21:10:33 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
2005-06-08 18:40:30 +00:00
|
|
|
# term_create_pty(domain,ptytype)
|
2005-05-16 21:10:33 +00:00
|
|
|
#
|
2005-06-08 18:40:30 +00:00
|
|
|
define(`term_create_pty',`
|
2005-06-03 12:25:14 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
|
|
|
|
|
|
|
devices_list_device_nodes($1)
|
2005-06-08 20:28:45 +00:00
|
|
|
allow $1 ptmx_t:chr_file rw_file_perms;
|
2005-06-03 12:25:14 +00:00
|
|
|
allow $1 devpts_t:dir r_dir_perms;
|
|
|
|
allow $1 devpts_t:filesystem getattr;
|
|
|
|
dontaudit $1 bsdpty_device_t:chr_file { getattr read write };
|
|
|
|
type_transition $1 devpts_t:chr_file $2;
|
2005-04-22 19:31:32 +00:00
|
|
|
')
|
|
|
|
|
2005-06-08 18:40:30 +00:00
|
|
|
define(`term_create_pty_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
type ptmx_t, devpts_t;
|
|
|
|
|
|
|
|
class filesystem getattr;
|
|
|
|
class dir r_dir_perms;
|
2005-06-08 20:28:45 +00:00
|
|
|
class chr_file rw_file_perms;
|
2005-04-22 19:31:32 +00:00
|
|
|
')
|
|
|
|
|
2005-05-02 18:42:10 +00:00
|
|
|
########################################
|
|
|
|
#
|
2005-06-08 18:40:30 +00:00
|
|
|
# term_use_all_terminals(domain)
|
2005-05-02 18:42:10 +00:00
|
|
|
#
|
2005-06-08 18:40:30 +00:00
|
|
|
define(`term_use_all_terminals',`
|
2005-06-03 12:25:14 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
|
|
|
|
|
|
|
devices_list_device_nodes($1)
|
|
|
|
allow $1 devpts_t:dir r_dir_perms;
|
|
|
|
allow $1 { console_device_t tty_device_t ttynode ptynode }:chr_file rw_file_perms;
|
2005-05-02 18:42:10 +00:00
|
|
|
')
|
|
|
|
|
2005-06-08 18:40:30 +00:00
|
|
|
define(`term_use_all_terminals_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
attribute ttynode, ptynode;
|
|
|
|
|
|
|
|
type console_device_t, devpts_t, tty_device_t;
|
|
|
|
|
|
|
|
class dir r_dir_perms;
|
|
|
|
class chr_file rw_file_perms;
|
2005-05-31 21:25:45 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-06-08 18:40:30 +00:00
|
|
|
## <interface name="term_write_console">
|
2005-05-31 21:25:45 +00:00
|
|
|
## <description>
|
|
|
|
## Write to the console.
|
|
|
|
## </description>
|
|
|
|
## <parameter name="domain">
|
|
|
|
## The type of the process performing this action.
|
|
|
|
## </parameter>
|
|
|
|
## </interface>
|
|
|
|
#
|
2005-06-08 18:40:30 +00:00
|
|
|
define(`term_write_console',`
|
2005-05-31 21:25:45 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
|
|
|
|
|
|
|
devices_list_device_nodes($1)
|
|
|
|
allow $1 console_device_t:chr_file write;
|
|
|
|
')
|
|
|
|
|
2005-06-08 18:40:30 +00:00
|
|
|
define(`term_use_console_depend',`
|
2005-05-31 21:25:45 +00:00
|
|
|
type console_device_t;
|
|
|
|
class chr_file write;
|
2005-05-03 20:23:33 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-06-08 18:40:30 +00:00
|
|
|
## <interface name="term_use_console">
|
2005-05-19 21:06:06 +00:00
|
|
|
## <description>
|
|
|
|
## Read from and write to the console.
|
|
|
|
## </description>
|
|
|
|
## <parameter name="domain">
|
|
|
|
## The type of the process performing this action.
|
|
|
|
## </parameter>
|
|
|
|
## </interface>
|
2005-05-03 20:23:33 +00:00
|
|
|
#
|
2005-06-08 18:40:30 +00:00
|
|
|
define(`term_use_console',`
|
2005-06-03 12:25:14 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
|
|
|
|
|
|
|
devices_list_device_nodes($1)
|
|
|
|
allow $1 console_device_t:chr_file rw_file_perms;
|
2005-05-03 20:23:33 +00:00
|
|
|
')
|
|
|
|
|
2005-06-08 18:40:30 +00:00
|
|
|
define(`term_use_console_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
type console_device_t;
|
|
|
|
|
|
|
|
class chr_file rw_file_perms;
|
2005-05-03 20:23:33 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-06-08 18:40:30 +00:00
|
|
|
## <interface name="term_dontaudit_use_console">
|
2005-05-19 21:06:06 +00:00
|
|
|
## <description>
|
|
|
|
## Do not audit read from or write to the console.
|
|
|
|
## </description>
|
|
|
|
## <parameter name="domain">
|
|
|
|
## The type of the process performing this action.
|
|
|
|
## </parameter>
|
|
|
|
## </interface>
|
2005-05-03 20:23:33 +00:00
|
|
|
#
|
2005-06-08 18:40:30 +00:00
|
|
|
define(`term_dontaudit_use_console',`
|
2005-06-03 12:25:14 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
|
|
|
|
|
|
|
dontaudit $1 console_device_t:chr_file { read write };
|
2005-05-03 20:23:33 +00:00
|
|
|
')
|
|
|
|
|
2005-06-08 18:40:30 +00:00
|
|
|
define(`term_dontaudit_use_console_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
type console_device_t;
|
|
|
|
|
|
|
|
class chr_file { read write };
|
2005-05-03 20:23:33 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
2005-06-08 18:40:30 +00:00
|
|
|
# term_setattr_console(domain)
|
2005-05-03 20:23:33 +00:00
|
|
|
#
|
2005-06-08 18:40:30 +00:00
|
|
|
define(`term_setattr_console',`
|
2005-06-03 12:25:14 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
|
|
|
|
|
|
|
devices_list_device_nodes($1)
|
|
|
|
allow $1 console_device_t:chr_file setattr;
|
2005-05-03 20:23:33 +00:00
|
|
|
')
|
|
|
|
|
2005-06-08 18:40:30 +00:00
|
|
|
define(`term_setattr_console_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
type console_device_t;
|
|
|
|
|
|
|
|
class chr_file setattr;
|
2005-05-03 20:23:33 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
2005-06-08 18:40:30 +00:00
|
|
|
# term_list_ptys(domain)
|
2005-05-03 20:23:33 +00:00
|
|
|
#
|
2005-06-08 18:40:30 +00:00
|
|
|
define(`term_list_ptys',`
|
2005-06-03 12:25:14 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
|
|
|
|
|
|
|
devices_list_device_nodes($1)
|
|
|
|
allow $1 devpts_t:dir r_dir_perms;
|
2005-05-03 20:23:33 +00:00
|
|
|
')
|
|
|
|
|
2005-06-08 18:40:30 +00:00
|
|
|
define(`term_list_ptys_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
type devpts_t;
|
|
|
|
|
|
|
|
class dir r_dir_perms;
|
2005-05-03 20:23:33 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
2005-06-08 18:40:30 +00:00
|
|
|
# term_dontaudit_list_ptys(domain)
|
2005-05-03 20:23:33 +00:00
|
|
|
#
|
2005-06-08 18:40:30 +00:00
|
|
|
define(`term_dontaudit_list_ptys',`
|
2005-06-03 12:25:14 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
|
|
|
|
|
|
|
dontaudit $1 devpts_t:dir { getattr search read };
|
2005-05-03 20:23:33 +00:00
|
|
|
')
|
|
|
|
|
2005-06-08 18:40:30 +00:00
|
|
|
define(`term_dontaudit_list_ptys_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
type devpts_t;
|
|
|
|
|
|
|
|
class dir { getattr search read };
|
2005-05-03 20:23:33 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
2005-06-08 18:40:30 +00:00
|
|
|
# term_use_generic_pty(domain)
|
2005-05-03 20:23:33 +00:00
|
|
|
#
|
2005-06-08 18:40:30 +00:00
|
|
|
define(`term_use_generic_pty',`
|
2005-06-03 12:25:14 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
|
|
|
|
|
|
|
devices_list_device_nodes($1)
|
|
|
|
allow $1 devpts_t:chr_file { read write };
|
2005-05-03 20:23:33 +00:00
|
|
|
')
|
|
|
|
|
2005-06-08 18:40:30 +00:00
|
|
|
define(`term_use_generic_pty_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
type devpts_t;
|
|
|
|
|
|
|
|
class chr_file { read write };
|
2005-05-02 18:42:10 +00:00
|
|
|
')
|
|
|
|
|
2005-04-14 20:18:17 +00:00
|
|
|
########################################
|
|
|
|
#
|
2005-06-08 18:40:30 +00:00
|
|
|
# term_dontaudit_use_generic_pty(domain)
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-06-08 18:40:30 +00:00
|
|
|
define(`term_dontaudit_use_generic_pty',`
|
2005-06-03 12:25:14 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
|
|
|
|
|
|
|
dontaudit $1 devpts_t:chr_file { read write };
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2005-06-08 18:40:30 +00:00
|
|
|
define(`term_dontaudit_use_generic_pty_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
type devpts_t;
|
|
|
|
|
|
|
|
class chr_file { read write };
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2005-04-27 21:54:39 +00:00
|
|
|
########################################
|
|
|
|
#
|
2005-06-08 18:40:30 +00:00
|
|
|
# term_use_controlling_terminal(domain)
|
2005-04-27 21:54:39 +00:00
|
|
|
#
|
2005-06-08 18:40:30 +00:00
|
|
|
define(`term_use_controlling_terminal',`
|
2005-06-03 12:25:14 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
|
|
|
|
|
|
|
devices_list_device_nodes($1)
|
|
|
|
allow $1 devtty_t:chr_file { getattr read write ioctl };
|
2005-04-27 21:54:39 +00:00
|
|
|
')
|
|
|
|
|
2005-06-08 18:40:30 +00:00
|
|
|
define(`term_use_controlling_terminal_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
type devtty_t;
|
|
|
|
|
|
|
|
class chr_file { getattr read write ioctl };
|
2005-04-27 21:54:39 +00:00
|
|
|
')
|
|
|
|
|
2005-04-28 15:47:50 +00:00
|
|
|
########################################
|
|
|
|
#
|
2005-06-08 18:40:30 +00:00
|
|
|
# term_dontaudit_rw_ptmx(domain)
|
2005-04-28 15:47:50 +00:00
|
|
|
#
|
2005-06-08 18:40:30 +00:00
|
|
|
define(`term_dontaudit_rw_ptmx',`
|
2005-06-03 12:25:14 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
|
|
|
|
|
|
|
dontaudit $1 ptmx_t:chr_file { getattr read write };
|
2005-04-28 15:47:50 +00:00
|
|
|
')
|
|
|
|
|
2005-06-08 18:40:30 +00:00
|
|
|
define(`term_dontaudit_rw_ptmx_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
type ptmx_t;
|
|
|
|
|
|
|
|
class chr_file { getattr read write };
|
2005-04-28 15:47:50 +00:00
|
|
|
')
|
|
|
|
|
2005-04-14 20:18:17 +00:00
|
|
|
########################################
|
|
|
|
#
|
2005-06-08 18:40:30 +00:00
|
|
|
# term_getattr_all_ptys(domain)
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-06-08 18:40:30 +00:00
|
|
|
define(`term_getattr_all_ptys',`
|
2005-06-03 12:25:14 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
|
|
|
|
|
|
|
devices_list_device_nodes($1)
|
|
|
|
allow $1 devpts_t:dir r_dir_perms;
|
|
|
|
allow $1 ptynode:chr_file getattr;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2005-06-08 18:40:30 +00:00
|
|
|
define(`term_getattr_all_ptys_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
attribute ptynode;
|
|
|
|
|
|
|
|
class dir r_dir_perms;
|
|
|
|
class chr_file getattr;
|
2005-05-13 14:37:13 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
2005-06-08 18:40:30 +00:00
|
|
|
# term_use_all_private_ptys(domain)
|
2005-05-13 14:37:13 +00:00
|
|
|
#
|
2005-06-08 18:40:30 +00:00
|
|
|
define(`term_use_all_private_ptys',`
|
2005-06-03 12:25:14 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
|
|
|
|
|
|
|
devices_list_device_nodes($1)
|
|
|
|
allow $1 devpts_t:dir r_dir_perms;
|
|
|
|
allow $1 ptynode:chr_file { getattr read write ioctl };
|
2005-05-13 14:37:13 +00:00
|
|
|
')
|
|
|
|
|
2005-06-08 18:40:30 +00:00
|
|
|
define(`term_use_all_private_ptys_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
attribute ptynode;
|
|
|
|
|
|
|
|
class dir r_dir_perms;
|
|
|
|
class chr_file { getattr read write ioctl };
|
2005-05-05 17:44:11 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
2005-06-08 18:40:30 +00:00
|
|
|
# term_dontaudit_use_all_private_ptys(domain)
|
2005-05-05 17:44:11 +00:00
|
|
|
#
|
2005-06-08 18:40:30 +00:00
|
|
|
define(`term_dontaudit_use_all_private_ptys',`
|
2005-06-03 12:25:14 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
|
|
|
|
|
|
|
dontaudit $1 ptynode:chr_file { read write };
|
2005-05-05 17:44:11 +00:00
|
|
|
')
|
|
|
|
|
2005-06-08 18:40:30 +00:00
|
|
|
define(`term_dontaudit_use_all_private_ptys_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
attribute ptynode;
|
|
|
|
|
|
|
|
class chr_file { read write };
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2005-05-13 14:37:13 +00:00
|
|
|
########################################
|
|
|
|
#
|
2005-06-08 18:40:30 +00:00
|
|
|
# term_gettattr_unallocated_ttys(domain)
|
2005-05-13 14:37:13 +00:00
|
|
|
#
|
2005-06-08 18:40:30 +00:00
|
|
|
define(`term_gettattr_unallocated_ttys',`
|
2005-06-03 12:25:14 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
|
|
|
|
|
|
|
devices_list_device_nodes($1)
|
|
|
|
allow $1 tty_device_t:chr_file getattr;
|
2005-05-13 14:37:13 +00:00
|
|
|
')
|
|
|
|
|
2005-06-08 18:40:30 +00:00
|
|
|
define(`term_gettattr_unallocated_ttys_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
type tty_device_t;
|
|
|
|
|
|
|
|
class chr_file getattr;
|
2005-05-13 14:37:13 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
2005-06-08 18:40:30 +00:00
|
|
|
# term_settattr_unallocated_ttys(domain)
|
2005-05-13 14:37:13 +00:00
|
|
|
#
|
2005-06-08 18:40:30 +00:00
|
|
|
define(`term_settattr_unallocated_ttys',`
|
2005-06-03 12:25:14 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
|
|
|
|
|
|
|
devices_list_device_nodes($1)
|
|
|
|
allow $1 tty_device_t:chr_file setattr;
|
2005-05-13 14:37:13 +00:00
|
|
|
')
|
|
|
|
|
2005-06-08 18:40:30 +00:00
|
|
|
define(`term_settattr_unallocated_ttys_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
type tty_device_t;
|
|
|
|
|
|
|
|
class chr_file setattr;
|
2005-05-13 14:37:13 +00:00
|
|
|
')
|
|
|
|
|
2005-05-31 19:52:57 +00:00
|
|
|
########################################
|
|
|
|
#
|
2005-06-08 18:40:30 +00:00
|
|
|
# term_relabel_unallocated_tty(domain)
|
2005-05-31 19:52:57 +00:00
|
|
|
#
|
2005-06-08 18:40:30 +00:00
|
|
|
define(`term_relabel_unallocated_tty',`
|
2005-06-03 12:25:14 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
|
|
|
|
|
|
|
devices_list_device_nodes($1)
|
|
|
|
allow $1 tty_device_t:chr_file { relabelfrom relabelto };
|
2005-05-31 19:52:57 +00:00
|
|
|
')
|
|
|
|
|
2005-06-08 18:40:30 +00:00
|
|
|
define(`term_relabel_unallocated_tty_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
type tty_device_t;
|
|
|
|
|
|
|
|
class chr_file { relabelfrom relabelto };
|
2005-05-31 19:52:57 +00:00
|
|
|
')
|
|
|
|
|
2005-04-14 20:18:17 +00:00
|
|
|
########################################
|
|
|
|
#
|
2005-06-08 18:40:30 +00:00
|
|
|
# term_reset_tty_labels(domain)
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-06-08 18:40:30 +00:00
|
|
|
define(`term_reset_tty_labels',`
|
2005-06-03 12:25:14 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
|
|
|
|
|
|
|
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-06-08 18:40:30 +00:00
|
|
|
define(`term_reset_tty_labels_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
attribute ttynode;
|
|
|
|
|
|
|
|
type tty_device_t;
|
|
|
|
class chr_file { relabelfrom relabelto };
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2005-05-19 21:06:06 +00:00
|
|
|
########################################
|
2005-06-08 18:40:30 +00:00
|
|
|
## <interface name="term_write_unallocated_tty">
|
2005-05-19 21:06:06 +00:00
|
|
|
## <description>
|
2005-06-08 18:40:30 +00:00
|
|
|
## Write to all unallocated ttys. Has a backchannel of
|
2005-05-19 21:06:06 +00:00
|
|
|
## getting all tty attributes.
|
|
|
|
## </description>
|
|
|
|
## <parameter name="domain">
|
|
|
|
## The type of the process performing this action.
|
|
|
|
## </parameter>
|
|
|
|
## </interface>
|
|
|
|
#
|
2005-06-08 18:40:30 +00:00
|
|
|
define(`term_write_general_tty',`
|
2005-06-03 12:25:14 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
|
|
|
|
|
|
|
devices_list_device_nodes($1)
|
|
|
|
allow $1 tty_device_t:chr_file { getattr write };
|
2005-05-19 21:06:06 +00:00
|
|
|
')
|
|
|
|
|
2005-06-08 18:40:30 +00:00
|
|
|
define(`term_write_general_tty_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
type tty_device_t;
|
|
|
|
|
|
|
|
class chr_file { getattr write };
|
2005-05-19 21:06:06 +00:00
|
|
|
')
|
|
|
|
|
2005-04-14 20:18:17 +00:00
|
|
|
########################################
|
|
|
|
#
|
2005-06-08 18:40:30 +00:00
|
|
|
# term_use_unallocated_tty(domain)
|
2005-05-02 18:42:10 +00:00
|
|
|
#
|
2005-06-08 18:40:30 +00:00
|
|
|
define(`term_use_unallocated_tty',`
|
2005-06-03 12:25:14 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
|
|
|
|
|
|
|
devices_list_device_nodes($1)
|
|
|
|
allow $1 tty_device_t:chr_file { getattr read write ioctl };
|
2005-05-02 18:42:10 +00:00
|
|
|
')
|
|
|
|
|
2005-06-08 18:40:30 +00:00
|
|
|
define(`term_use_unallocated_tty_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
type tty_device_t;
|
|
|
|
|
|
|
|
class chr_file { getattr read write ioctl };
|
2005-05-02 18:42:10 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-06-08 18:40:30 +00:00
|
|
|
# term_dontaudit_use_unallocated_tty(domain)
|
2005-05-02 18:42:10 +00:00
|
|
|
#
|
2005-06-08 18:40:30 +00:00
|
|
|
define(`term_dontaudit_use_unallocated_tty',`
|
2005-06-03 12:25:14 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
|
|
|
|
|
|
|
dontaudit $1 tty_device_t:chr_file { read write };
|
2005-05-02 18:42:10 +00:00
|
|
|
')
|
|
|
|
|
2005-06-08 18:40:30 +00:00
|
|
|
define(`term_dontaudit_use_unallocated_tty_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
type tty_device_t;
|
|
|
|
|
|
|
|
class chr_file { read write };
|
2005-05-02 18:42:10 +00:00
|
|
|
')
|
|
|
|
|
2005-04-28 18:59:01 +00:00
|
|
|
########################################
|
|
|
|
#
|
2005-06-08 18:40:30 +00:00
|
|
|
# term_getattr_all_private_ttys(domain)
|
2005-04-28 18:59:01 +00:00
|
|
|
#
|
2005-06-08 18:40:30 +00:00
|
|
|
define(`term_getattr_all_private_ttys',`
|
2005-06-03 12:25:14 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
|
|
|
|
|
|
|
devices_list_device_nodes($1)
|
|
|
|
allow $1 ttynode:chr_file getattr;
|
2005-04-28 18:59:01 +00:00
|
|
|
')
|
|
|
|
|
2005-06-08 18:40:30 +00:00
|
|
|
define(`term_getattr_all_private_ttys_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
attribute ttynode;
|
|
|
|
|
|
|
|
class chr_file getattr;
|
2005-04-28 18:59:01 +00:00
|
|
|
')
|
|
|
|
|
2005-05-31 19:52:57 +00:00
|
|
|
########################################
|
|
|
|
#
|
2005-06-08 18:40:30 +00:00
|
|
|
# term_setattr_all_private_ttys(domain)
|
2005-05-31 19:52:57 +00:00
|
|
|
#
|
2005-06-08 18:40:30 +00:00
|
|
|
define(`term_setattr_all_private_ttys',`
|
2005-06-03 12:25:14 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
|
|
|
|
|
|
|
devices_list_device_nodes($1)
|
|
|
|
allow $1 ttynode:chr_file setattr;
|
2005-05-31 19:52:57 +00:00
|
|
|
')
|
|
|
|
|
2005-06-08 18:40:30 +00:00
|
|
|
define(`term_setattr_all_private_ttys_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
attribute ttynode;
|
|
|
|
|
|
|
|
class chr_file setattr;
|
2005-05-31 19:52:57 +00:00
|
|
|
')
|
|
|
|
|
2005-04-14 20:18:17 +00:00
|
|
|
########################################
|
|
|
|
#
|
2005-06-08 18:40:30 +00:00
|
|
|
# term_dontaudit_getattr_all_private_ttys(domain)
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-06-08 18:40:30 +00:00
|
|
|
define(`term_dontaudit_getattr_all_private_ttys',`
|
2005-06-03 12:25:14 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
|
|
|
|
|
|
|
dontaudit $1 ttynode:chr_file getattr;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2005-06-08 18:40:30 +00:00
|
|
|
define(`term_dontaudit_getattr_all_private_ttys_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
attribute ttynode;
|
|
|
|
|
|
|
|
class chr_file getattr;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
2005-04-28 21:41:09 +00:00
|
|
|
|
2005-05-31 19:52:57 +00:00
|
|
|
########################################
|
|
|
|
#
|
2005-06-08 18:40:30 +00:00
|
|
|
# term_relabel_all_private_ttys(domain)
|
2005-05-31 19:52:57 +00:00
|
|
|
#
|
2005-06-08 18:40:30 +00:00
|
|
|
define(`term_relabel_all_private_ttys',`
|
2005-06-03 12:25:14 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
|
|
|
|
|
|
|
devices_list_device_nodes($1)
|
|
|
|
allow $1 ttynode:chr_file { relabelfrom relabelto };
|
2005-05-31 19:52:57 +00:00
|
|
|
')
|
|
|
|
|
2005-06-08 18:40:30 +00:00
|
|
|
define(`term_relabel_all_private_ttys_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
attribute ttynode;
|
|
|
|
|
|
|
|
class chr_file { relabelfrom relabelto };
|
2005-05-31 19:52:57 +00:00
|
|
|
')
|
|
|
|
|
2005-05-19 21:06:06 +00:00
|
|
|
########################################
|
2005-06-08 18:40:30 +00:00
|
|
|
## <interface name="term_write_all_private_ttys">
|
2005-05-19 21:06:06 +00:00
|
|
|
## <description>
|
|
|
|
## Write to all private ttys. Has a backchannel of
|
|
|
|
## getting all private tty attributes.
|
|
|
|
## </description>
|
|
|
|
## <parameter name="domain">
|
|
|
|
## The type of the process performing this action.
|
|
|
|
## </parameter>
|
|
|
|
## </interface>
|
|
|
|
#
|
2005-06-08 18:40:30 +00:00
|
|
|
define(`term_write_all_private_ttys',`
|
2005-06-03 12:25:14 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
|
|
|
|
|
|
|
devices_list_device_nodes($1)
|
|
|
|
allow $1 ttynode:chr_file { getattr write };
|
2005-05-19 21:06:06 +00:00
|
|
|
')
|
|
|
|
|
2005-06-08 18:40:30 +00:00
|
|
|
define(`term_write_all_private_ttys_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
attribute ttynode;
|
|
|
|
|
|
|
|
class chr_file { getattr write };
|
2005-05-19 21:06:06 +00:00
|
|
|
')
|
|
|
|
|
2005-04-28 21:41:09 +00:00
|
|
|
########################################
|
|
|
|
#
|
2005-06-08 18:40:30 +00:00
|
|
|
# term_use_all_private_ttys(domain)
|
2005-04-28 21:41:09 +00:00
|
|
|
#
|
2005-06-08 18:40:30 +00:00
|
|
|
define(`term_use_all_private_ttys',`
|
2005-06-03 12:25:14 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
|
|
|
|
|
|
|
devices_list_device_nodes($1)
|
|
|
|
allow $1 ttynode:chr_file { getattr read write ioctl };
|
2005-04-28 21:41:09 +00:00
|
|
|
')
|
|
|
|
|
2005-06-08 18:40:30 +00:00
|
|
|
define(`term_use_all_private_ttys_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
attribute ttynode;
|
|
|
|
|
|
|
|
class chr_file { getattr read write ioctl };
|
2005-05-02 18:42:10 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
2005-06-08 18:40:30 +00:00
|
|
|
# term_dontaudit_use_all_private_ttys(domain)
|
2005-05-02 18:42:10 +00:00
|
|
|
#
|
2005-06-08 18:40:30 +00:00
|
|
|
define(`term_dontaudit_use_all_private_ttys',`
|
2005-06-03 12:25:14 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
|
|
|
|
|
|
|
dontaudit $1 ttynode:chr_file { read write };
|
2005-05-02 18:42:10 +00:00
|
|
|
')
|
|
|
|
|
2005-06-08 18:40:30 +00:00
|
|
|
define(`term_dontaudit_use_all_private_ttys_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
attribute ttynode;
|
|
|
|
|
|
|
|
class chr_file { read write };
|
2005-04-28 21:41:09 +00:00
|
|
|
')
|
2005-05-31 19:52:57 +00:00
|
|
|
|
|
|
|
## </module>
|