selinux-policy/policy/modules/kernel/terminal.if

1115 lines
21 KiB
Plaintext
Raw Normal View History

## <summary>Policy for terminals.</summary>
## <required val="true">
## Depended on by other required modules.
## </required>
2005-04-20 19:07:16 +00:00
########################################
2005-08-11 17:46:39 +00:00
## <summary>
2005-06-23 21:30:57 +00:00
## Transform specified type into a pty type.
2005-08-11 17:46:39 +00:00
## </summary>
2005-06-23 21:30:57 +00:00
## <param name="pty_type">
## <summary>
2005-06-23 21:30:57 +00:00
## An object type that will applied to a pty.
## </summary>
2005-06-23 21:30:57 +00:00
## </param>
#
interface(`term_pty',`
2005-06-16 21:06:29 +00:00
gen_require(`
attribute ptynode;
type devpts_t;
')
2007-02-20 20:17:07 +00:00
dev_node($1)
allow $1 devpts_t:filesystem associate;
typeattribute $1 ptynode;
')
########################################
2005-08-11 17:46:39 +00:00
## <summary>
2005-06-23 21:30:57 +00:00
## Transform specified type into an user
## pty type. This allows it to be relabeled via
## type change by login programs such as ssh.
2005-08-11 17:46:39 +00:00
## </summary>
2005-06-23 21:30:57 +00:00
## <param name="userdomain">
## <summary>
2005-06-23 21:30:57 +00:00
## The type of the user domain associated with
## this pty.
## </summary>
2005-06-23 21:30:57 +00:00
## </param>
## <param name="object_type">
## <summary>
2005-06-23 21:30:57 +00:00
## An object type that will applied to a pty.
## </summary>
2005-06-23 21:30:57 +00:00
## </param>
#
interface(`term_user_pty',`
2005-06-16 21:06:29 +00:00
gen_require(`
attribute server_ptynode;
')
term_pty($2)
2006-01-20 22:05:40 +00:00
type_change $1 server_ptynode:chr_file $2;
')
2005-06-21 21:07:46 +00:00
########################################
2005-08-11 17:46:39 +00:00
## <summary>
2005-06-23 21:30:57 +00:00
## Transform specified type into a pty type
## used by login programs, such as sshd.
2005-08-11 17:46:39 +00:00
## </summary>
2005-06-23 21:30:57 +00:00
## <param name="pty_type">
## <summary>
2005-06-23 21:30:57 +00:00
## An object type that will applied to a pty.
## </summary>
2005-06-23 21:30:57 +00:00
## </param>
2005-06-21 21:07:46 +00:00
#
interface(`term_login_pty',`
2005-06-21 21:07:46 +00:00
gen_require(`
attribute server_ptynode;
')
term_pty($1)
typeattribute $1 server_ptynode;
')
########################################
2005-08-11 17:46:39 +00:00
## <summary>
2005-06-23 21:30:57 +00:00
## Transform specified type into a tty type.
2005-08-11 17:46:39 +00:00
## </summary>
2005-06-23 21:30:57 +00:00
## <param name="tty_type">
## <summary>
2005-06-23 21:30:57 +00:00
## An object type that will applied to a tty.
## </summary>
2005-06-23 21:30:57 +00:00
## </param>
#
interface(`term_tty',`
2005-06-16 21:06:29 +00:00
gen_require(`
2005-10-23 22:10:59 +00:00
attribute ttynode, serial_device;
2005-06-16 21:06:29 +00:00
type tty_device_t;
')
2006-10-16 16:51:57 +00:00
typeattribute $1 ttynode, serial_device;
2007-02-20 20:17:07 +00:00
dev_node($1)
2006-10-16 16:51:57 +00:00
')
########################################
## <summary>
## Transform specified type into a user tty type.
## </summary>
## <param name="domain">
## <summary>
## User domain that is related to this tty.
## </summary>
## </param>
## <param name="tty_type">
## <summary>
## An object type that will applied to a tty.
## </summary>
## </param>
#
interface(`term_user_tty',`
gen_require(`
attribute ttynode;
type tty_device_t;
')
2006-10-16 16:51:57 +00:00
term_tty($2)
type_change $1 tty_device_t:chr_file $2;
2005-10-24 19:50:21 +00:00
# Debian login is from shadow utils and does not allow resetting the perms.
# have to fix this!
ifdef(`distro_debian',`
2005-06-16 21:06:29 +00:00
type_change $1 ttynode:chr_file $2;
')
')
########################################
2005-08-11 17:46:39 +00:00
## <summary>
2005-06-23 21:30:57 +00:00
## Create a pty in the /dev/pts directory.
2005-08-11 17:46:39 +00:00
## </summary>
2005-06-23 21:30:57 +00:00
## <param name="domain">
## <summary>
2005-06-23 21:30:57 +00:00
## The type of the process creating the pty.
## </summary>
2005-06-23 21:30:57 +00:00
## </param>
## <param name="pty_type">
## <summary>
2005-06-23 21:30:57 +00:00
## The type of the pty.
## </summary>
2005-06-23 21:30:57 +00:00
## </param>
#
interface(`term_create_pty',`
2005-06-16 21:06:29 +00:00
gen_require(`
type bsdpty_device_t, devpts_t, ptmx_t;
')
2005-06-13 16:22:32 +00:00
dev_list_all_dev_nodes($1)
2005-06-08 20:28:45 +00:00
allow $1 ptmx_t:chr_file rw_file_perms;
2005-06-13 16:22:32 +00:00
2006-12-12 20:08:08 +00:00
allow $1 devpts_t:dir list_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-08-11 17:46:39 +00:00
## <summary>
2005-06-23 21:30:57 +00:00
## Read and write the console, all
## ttys and all ptys.
2005-08-11 17:46:39 +00:00
## </summary>
2005-06-23 21:30:57 +00:00
## <param name="domain">
## <summary>
2005-11-08 22:00:30 +00:00
## Domain allowed access.
## </summary>
2005-06-23 21:30:57 +00:00
## </param>
2006-09-06 22:07:25 +00:00
## <rolecap/>
#
interface(`term_use_all_terms',`
2005-06-16 21:06:29 +00:00
gen_require(`
attribute ttynode, ptynode;
type console_device_t, devpts_t, tty_device_t;
')
2005-06-13 16:22:32 +00:00
dev_list_all_dev_nodes($1)
2006-12-12 20:08:08 +00:00
allow $1 devpts_t:dir list_dir_perms;
allow $1 { console_device_t tty_device_t ttynode ptynode }:chr_file rw_file_perms;
')
########################################
2005-08-11 17:46:39 +00:00
## <summary>
2005-06-23 21:30:57 +00:00
## Write to the console.
2005-08-11 17:46:39 +00:00
## </summary>
2005-06-23 21:30:57 +00:00
## <param name="domain">
## <summary>
2005-11-08 22:00:30 +00:00
## Domain allowed access.
## </summary>
2005-06-23 21:30:57 +00:00
## </param>
2006-09-06 22:07:25 +00:00
## <rolecap/>
#
interface(`term_write_console',`
2005-06-16 21:06:29 +00:00
gen_require(`
type console_device_t;
')
2005-06-13 16:22:32 +00:00
dev_list_all_dev_nodes($1)
2006-12-12 20:08:08 +00:00
allow $1 console_device_t:chr_file write_chr_file_perms;
')
2005-12-08 15:01:57 +00:00
########################################
## <summary>
## Read from the console.
## </summary>
## <param name="domain">
## <summary>
2005-12-08 15:01:57 +00:00
## Domain allowed access.
## </summary>
2005-12-08 15:01:57 +00:00
## </param>
2006-09-06 22:07:25 +00:00
## <rolecap/>
2005-12-08 15:01:57 +00:00
#
interface(`term_read_console',`
gen_require(`
type console_device_t;
')
dev_list_all_dev_nodes($1)
2006-12-12 20:08:08 +00:00
allow $1 console_device_t:chr_file read_chr_file_perms;
2005-12-08 15:01:57 +00:00
')
########################################
2005-08-11 17:46:39 +00:00
## <summary>
2005-06-23 21:30:57 +00:00
## Read from and write to the console.
2005-08-11 17:46:39 +00:00
## </summary>
2005-06-23 21:30:57 +00:00
## <param name="domain">
## <summary>
2005-11-08 22:00:30 +00:00
## Domain allowed access.
## </summary>
2005-06-23 21:30:57 +00:00
## </param>
2006-09-06 22:07:25 +00:00
## <rolecap/>
#
interface(`term_use_console',`
2005-06-16 21:06:29 +00:00
gen_require(`
type console_device_t;
')
2005-06-13 16:22:32 +00:00
dev_list_all_dev_nodes($1)
2006-12-12 20:08:08 +00:00
allow $1 console_device_t:chr_file rw_chr_file_perms;
')
########################################
2005-08-11 17:46:39 +00:00
## <summary>
2005-06-23 21:30:57 +00:00
## Do not audit attemtps to read from
## or write to the console.
2005-08-11 17:46:39 +00:00
## </summary>
2005-06-23 21:30:57 +00:00
## <param name="domain">
## <summary>
2005-11-08 22:00:30 +00:00
## Domain allowed access.
## </summary>
2005-06-23 21:30:57 +00:00
## </param>
#
interface(`term_dontaudit_use_console',`
2005-06-16 21:06:29 +00:00
gen_require(`
type console_device_t;
')
2006-12-12 20:08:08 +00:00
dontaudit $1 console_device_t:chr_file rw_chr_file_perms;
')
########################################
2005-08-11 17:46:39 +00:00
## <summary>
2005-06-23 21:30:57 +00:00
## Set the attributes of the console
## device node.
2005-08-11 17:46:39 +00:00
## </summary>
2005-06-23 21:30:57 +00:00
## <param name="domain">
## <summary>
2005-11-08 22:00:30 +00:00
## Domain allowed access.
## </summary>
2005-06-23 21:30:57 +00:00
## </param>
2006-09-06 22:07:25 +00:00
## <rolecap/>
#
interface(`term_setattr_console',`
2005-06-16 21:06:29 +00:00
gen_require(`
type console_device_t;
')
2005-06-13 16:22:32 +00:00
dev_list_all_dev_nodes($1)
allow $1 console_device_t:chr_file setattr;
')
2007-06-12 13:06:13 +00:00
########################################
## <summary>
## Relabel from and to the console type.
## </summary>
## <param name="domain">
## <summary>
## Domain allowed access.
## </summary>
## </param>
#
interface(`term_relabel_console',`
gen_require(`
type console_device_t;
')
dev_list_all_dev_nodes($1)
allow $1 console_device_t:chr_file { relabelfrom relabelto };
')
2006-08-23 03:47:39 +00:00
########################################
## <summary>
## Create the console device (/dev/console).
## </summary>
## <param name="domain">
## <summary>
## Domain allowed access.
## </summary>
## </param>
#
interface(`term_create_console_dev',`
gen_require(`
2006-12-12 20:08:08 +00:00
type console_device_t;
2006-08-23 03:47:39 +00:00
')
2006-12-12 20:08:08 +00:00
dev_add_entry_generic_dirs($1)
2006-08-23 03:47:39 +00:00
allow $1 console_device_t:chr_file create;
allow $1 self:capability mknod;
')
########################################
## <summary>
## Get the attributes of a pty filesystem
## </summary>
## <param name="domain">
## <summary>
## Domain allowed access.
## </summary>
## </param>
#
interface(`term_getattr_pty_fs',`
gen_require(`
type devpts_t;
')
allow $1 devpts_t:filesystem getattr;
')
2005-09-02 19:11:07 +00:00
########################################
## <summary>
## Do not audit attempts to get the
## attributes of the /dev/pts directory.
## </summary>
## <param name="domain">
## <summary>
2005-09-02 19:11:07 +00:00
## The type of the process to not audit.
## </summary>
2005-09-02 19:11:07 +00:00
## </param>
#
2006-02-02 21:08:12 +00:00
interface(`term_dontaudit_getattr_pty_dirs',`
2005-09-02 19:11:07 +00:00
gen_require(`
type devpts_t;
')
dontaudit $1 devpts_t:dir getattr;
')
2005-09-23 19:38:34 +00:00
########################################
## <summary>
## Search the contents of the /dev/pts directory.
## </summary>
## <param name="domain">
## <summary>
2005-11-08 22:00:30 +00:00
## Domain allowed access.
## </summary>
2005-09-23 19:38:34 +00:00
## </param>
#
interface(`term_search_ptys',`
gen_require(`
type devpts_t;
')
dev_list_all_dev_nodes($1)
2006-12-12 20:08:08 +00:00
allow $1 devpts_t:dir search_dir_perms;
2006-01-04 15:26:42 +00:00
')
########################################
## <summary>
## Do not audit attempts to search the
## contents of the /dev/pts directory.
## </summary>
## <param name="domain">
## <summary>
2006-01-04 15:26:42 +00:00
## Domain allowed access.
## </summary>
2006-01-04 15:26:42 +00:00
## </param>
#
interface(`term_dontaudit_search_ptys',`
gen_require(`
type devpts_t;
')
dev_dontaudit_list_all_dev_nodes($1)
2006-12-12 20:08:08 +00:00
dontaudit $1 devpts_t:dir search_dir_perms;
2005-09-23 19:38:34 +00:00
')
########################################
2005-08-11 17:46:39 +00:00
## <summary>
2005-06-23 21:30:57 +00:00
## Read the /dev/pts directory to
## list all ptys.
2005-08-11 17:46:39 +00:00
## </summary>
2005-06-23 21:30:57 +00:00
## <param name="domain">
## <summary>
2005-11-08 22:00:30 +00:00
## Domain allowed access.
## </summary>
2005-06-23 21:30:57 +00:00
## </param>
#
interface(`term_list_ptys',`
2005-06-16 21:06:29 +00:00
gen_require(`
type devpts_t;
')
2005-06-13 16:22:32 +00:00
dev_list_all_dev_nodes($1)
2006-12-12 20:08:08 +00:00
allow $1 devpts_t:dir list_dir_perms;
')
########################################
2005-08-11 17:46:39 +00:00
## <summary>
2005-06-23 21:30:57 +00:00
## Do not audit attempts to read the
## /dev/pts directory.
2005-08-11 17:46:39 +00:00
## </summary>
2005-06-23 21:30:57 +00:00
## <param name="domain">
## <summary>
2005-06-23 21:30:57 +00:00
## The type of the process to not audit.
## </summary>
2005-06-23 21:30:57 +00:00
## </param>
#
interface(`term_dontaudit_list_ptys',`
2005-06-16 21:06:29 +00:00
gen_require(`
type devpts_t;
')
dontaudit $1 devpts_t:dir { getattr search read };
')
########################################
## <summary>
## Do not audit attempts to create, read,
## write, or delete the /dev/pts directory.
## </summary>
## <param name="domain">
## <summary>
## The type of the process to not audit.
## </summary>
## </param>
#
2006-02-02 21:08:12 +00:00
interface(`term_dontaudit_manage_pty_dirs',`
gen_require(`
type devpts_t;
')
2006-12-12 20:08:08 +00:00
dontaudit $1 devpts_t:dir manage_dir_perms;
')
2005-10-14 20:00:07 +00:00
########################################
## <summary>
## ioctl of generic pty devices.
2005-10-14 20:00:07 +00:00
## </summary>
## <param name="domain">
## <summary>
2005-11-08 22:00:30 +00:00
## Domain allowed access.
## </summary>
2005-10-14 20:00:07 +00:00
## </param>
#
# cjp: added for ppp
2006-02-02 21:08:12 +00:00
interface(`term_ioctl_generic_ptys',`
2005-10-14 20:00:07 +00:00
gen_require(`
type devpts_t;
')
dev_list_all_dev_nodes($1)
allow $1 devpts_t:dir search;
allow $1 devpts_t:chr_file ioctl;
')
########################################
## <summary>
## Allow setting the attributes of
## generic pty devices.
## </summary>
## <param name="domain">
## <summary>
## Domain allowed access.
## </summary>
## </param>
#
# dwalsh: added for rhgb
interface(`term_setattr_generic_ptys',`
gen_require(`
type devpts_t;
')
allow $1 devpts_t:chr_file setattr;
')
########################################
## <summary>
## Dontaudit setting the attributes of
## generic pty devices.
## </summary>
## <param name="domain">
## <summary>
## Domain allowed access.
## </summary>
## </param>
#
# dwalsh: added for rhgb
interface(`term_dontaudit_setattr_generic_ptys',`
gen_require(`
type devpts_t;
')
dontaudit $1 devpts_t:chr_file setattr;
')
########################################
2005-08-11 17:46:39 +00:00
## <summary>
2005-06-23 21:30:57 +00:00
## Read and write the generic pty
## type. This is generally only used in
## the targeted policy.
2005-08-11 17:46:39 +00:00
## </summary>
2005-06-23 21:30:57 +00:00
## <param name="domain">
## <summary>
2005-11-08 22:00:30 +00:00
## Domain allowed access.
## </summary>
2005-06-23 21:30:57 +00:00
## </param>
#
2006-02-02 21:08:12 +00:00
interface(`term_use_generic_ptys',`
2005-06-16 21:06:29 +00:00
gen_require(`
type devpts_t;
')
2005-06-13 16:22:32 +00:00
dev_list_all_dev_nodes($1)
2005-10-24 21:33:46 +00:00
allow $1 devpts_t:dir list_dir_perms;
2005-10-21 21:35:25 +00:00
allow $1 devpts_t:chr_file { rw_term_perms lock append };
')
2005-04-14 20:18:17 +00:00
########################################
2005-08-11 17:46:39 +00:00
## <summary>
2005-06-23 21:30:57 +00:00
## Dot not audit attempts to read and
## write the generic pty type. This is
## generally only used in the targeted policy.
2005-08-11 17:46:39 +00:00
## </summary>
2005-06-23 21:30:57 +00:00
## <param name="domain">
## <summary>
2005-06-23 21:30:57 +00:00
## The type of the process to not audit.
## </summary>
2005-06-23 21:30:57 +00:00
## </param>
2005-04-14 20:18:17 +00:00
#
2006-02-02 21:08:12 +00:00
interface(`term_dontaudit_use_generic_ptys',`
2005-06-16 20:54:18 +00:00
gen_require(`
type devpts_t;
')
dontaudit $1 devpts_t:chr_file { getattr read write ioctl };
2005-04-14 20:18:17 +00:00
')
2005-04-27 21:54:39 +00:00
########################################
2005-08-11 17:46:39 +00:00
## <summary>
2005-06-23 21:30:57 +00:00
## Read and write the controlling
## terminal (/dev/tty).
2005-08-11 17:46:39 +00:00
## </summary>
2005-06-23 21:30:57 +00:00
## <param name="domain">
## <summary>
2005-11-08 22:00:30 +00:00
## Domain allowed access.
## </summary>
2005-06-23 21:30:57 +00:00
## </param>
2005-04-27 21:54:39 +00:00
#
interface(`term_use_controlling_term',`
2005-06-16 20:54:18 +00:00
gen_require(`
type devtty_t;
')
2005-06-13 16:22:32 +00:00
dev_list_all_dev_nodes($1)
2005-10-21 19:36:49 +00:00
allow $1 devtty_t:chr_file { rw_term_perms lock append };
2005-04-27 21:54:39 +00:00
')
2005-10-14 20:00:07 +00:00
########################################
## <summary>
## Read and write the pty multiplexor (/dev/ptmx).
## </summary>
## <param name="domain">
## <summary>
2005-10-14 20:00:07 +00:00
## The type of the process to allow access.
## </summary>
2005-10-14 20:00:07 +00:00
## </param>
#
interface(`term_use_ptmx',`
gen_require(`
type ptmx_t;
')
2006-12-12 20:08:08 +00:00
dev_list_all_dev_nodes($1)
2005-10-14 20:00:07 +00:00
allow $1 ptmx_t:chr_file rw_file_perms;
')
2005-04-28 15:47:50 +00:00
########################################
2005-08-11 17:46:39 +00:00
## <summary>
2005-06-23 21:30:57 +00:00
## Do not audit attempts to read and
## write the pty multiplexor (/dev/ptmx).
2005-08-11 17:46:39 +00:00
## </summary>
2005-06-23 21:30:57 +00:00
## <param name="domain">
## <summary>
2005-06-23 21:30:57 +00:00
## The type of the process to not audit.
## </summary>
2005-06-23 21:30:57 +00:00
## </param>
2005-04-28 15:47:50 +00:00
#
interface(`term_dontaudit_use_ptmx',`
2005-06-16 21:06:29 +00:00
gen_require(`
type ptmx_t;
')
dontaudit $1 ptmx_t:chr_file { getattr read write };
2005-04-28 15:47:50 +00:00
')
2005-04-14 20:18:17 +00:00
########################################
2005-08-11 17:46:39 +00:00
## <summary>
2005-06-23 21:30:57 +00:00
## Get the attributes of all user
## pty device nodes.
2005-08-11 17:46:39 +00:00
## </summary>
2005-06-23 21:30:57 +00:00
## <param name="domain">
## <summary>
2005-11-08 22:00:30 +00:00
## Domain allowed access.
## </summary>
2005-06-23 21:30:57 +00:00
## </param>
2006-09-06 22:07:25 +00:00
## <rolecap/>
2005-04-14 20:18:17 +00:00
#
interface(`term_getattr_all_user_ptys',`
2005-06-16 21:06:29 +00:00
gen_require(`
attribute ptynode;
')
2005-06-13 16:22:32 +00:00
dev_list_all_dev_nodes($1)
2006-12-12 20:08:08 +00:00
allow $1 devpts_t:dir list_dir_perms;
allow $1 ptynode:chr_file getattr;
2005-04-14 20:18:17 +00:00
')
2005-07-15 19:18:55 +00:00
########################################
2005-08-11 17:46:39 +00:00
## <summary>
2005-07-15 19:18:55 +00:00
## Do not audit attempts to get the
## attributes of any user pty
## device nodes.
2005-08-11 17:46:39 +00:00
## </summary>
2005-07-15 19:18:55 +00:00
## <param name="domain">
## <summary>
2005-11-08 22:00:30 +00:00
## Domain allowed access.
## </summary>
2005-07-15 19:18:55 +00:00
## </param>
#
interface(`term_dontaudit_getattr_all_user_ptys',`
gen_require(`
attribute ptynode;
')
dontaudit $1 ptynode:chr_file getattr;
')
2005-07-28 20:52:55 +00:00
########################################
## <summary>
## Set the attributes of all user
## pty device nodes.
## </summary>
## <param name="domain">
## <summary>
2005-11-08 22:00:30 +00:00
## Domain allowed access.
## </summary>
2005-07-28 20:52:55 +00:00
## </param>
2006-09-06 22:07:25 +00:00
## <rolecap/>
2005-07-28 20:52:55 +00:00
#
interface(`term_setattr_all_user_ptys',`
gen_require(`
attribute ptynode;
')
dev_list_all_dev_nodes($1)
2006-12-12 20:08:08 +00:00
allow $1 devpts_t:dir list_dir_perms;
2005-07-28 20:52:55 +00:00
allow $1 ptynode:chr_file setattr;
')
########################################
## <summary>
## Relabel to all user ptys.
## </summary>
## <param name="domain">
## <summary>
2005-11-08 22:00:30 +00:00
## Domain allowed access.
## </summary>
2005-07-28 20:52:55 +00:00
## </param>
#
interface(`term_relabelto_all_user_ptys',`
gen_require(`
attribute ptynode;
')
allow $1 ptynode:chr_file relabelto;
')
2005-05-13 14:37:13 +00:00
########################################
2005-08-11 17:46:39 +00:00
## <summary>
2005-06-23 21:30:57 +00:00
## Read and write all user ptys.
2005-08-11 17:46:39 +00:00
## </summary>
2005-06-23 21:30:57 +00:00
## <param name="domain">
## <summary>
2005-11-08 22:00:30 +00:00
## Domain allowed access.
## </summary>
2005-06-23 21:30:57 +00:00
## </param>
2006-09-06 22:07:25 +00:00
## <rolecap/>
2005-05-13 14:37:13 +00:00
#
interface(`term_use_all_user_ptys',`
2005-06-16 21:06:29 +00:00
gen_require(`
attribute ptynode;
2005-09-19 14:18:48 +00:00
type devpts_t;
2005-06-16 21:06:29 +00:00
')
2005-06-13 16:22:32 +00:00
dev_list_all_dev_nodes($1)
2006-12-12 20:08:08 +00:00
allow $1 devpts_t:dir list_dir_perms;
2005-10-21 21:35:25 +00:00
allow $1 ptynode:chr_file { rw_term_perms lock append };
2005-05-13 14:37:13 +00:00
')
2005-05-05 17:44:11 +00:00
########################################
2005-08-11 17:46:39 +00:00
## <summary>
2005-06-23 21:30:57 +00:00
## Do not audit attempts to read any
## user ptys.
2005-08-11 17:46:39 +00:00
## </summary>
2005-06-23 21:30:57 +00:00
## <param name="domain">
## <summary>
2005-06-23 21:30:57 +00:00
## The type of the process to not audit.
## </summary>
2005-06-23 21:30:57 +00:00
## </param>
2005-05-05 17:44:11 +00:00
#
interface(`term_dontaudit_use_all_user_ptys',`
2005-06-16 21:06:29 +00:00
gen_require(`
attribute ptynode;
')
2005-10-21 22:56:41 +00:00
dontaudit $1 ptynode:chr_file { rw_term_perms lock append };
2005-05-05 17:44:11 +00:00
')
2005-06-21 17:01:45 +00:00
########################################
2005-08-11 17:46:39 +00:00
## <summary>
2005-06-23 21:30:57 +00:00
## Relabel from and to all user
## user pty device nodes.
2005-08-11 17:46:39 +00:00
## </summary>
2005-06-23 21:30:57 +00:00
## <param name="domain">
## <summary>
2005-11-08 22:00:30 +00:00
## Domain allowed access.
## </summary>
2005-06-23 21:30:57 +00:00
## </param>
2005-06-21 17:01:45 +00:00
#
interface(`term_relabel_all_user_ptys',`
2005-06-21 17:01:45 +00:00
gen_require(`
attribute ptynode;
type devpts_t;
2005-06-21 17:01:45 +00:00
')
dev_list_all_dev_nodes($1)
2006-12-12 20:08:08 +00:00
relabel_chr_files_pattern($1,devpts_t,ptynode)
2005-06-21 17:01:45 +00:00
')
2005-05-13 14:37:13 +00:00
########################################
2005-08-11 17:46:39 +00:00
## <summary>
2005-06-23 21:30:57 +00:00
## Get the attributes of all unallocated
## tty device nodes.
2005-08-11 17:46:39 +00:00
## </summary>
2005-06-23 21:30:57 +00:00
## <param name="domain">
## <summary>
2005-11-08 22:00:30 +00:00
## Domain allowed access.
## </summary>
2005-06-23 21:30:57 +00:00
## </param>
2006-09-06 22:07:25 +00:00
## <rolecap/>
2005-05-13 14:37:13 +00:00
#
interface(`term_getattr_unallocated_ttys',`
2005-06-16 21:06:29 +00:00
gen_require(`
type tty_device_t;
')
2005-06-13 16:22:32 +00:00
dev_list_all_dev_nodes($1)
allow $1 tty_device_t:chr_file getattr;
2005-05-13 14:37:13 +00:00
')
2005-07-18 18:31:49 +00:00
########################################
2005-08-11 17:46:39 +00:00
## <summary>
2005-07-18 18:31:49 +00:00
## Do not audit attempts to get the attributes
## of all unallocated tty device nodes.
2005-08-11 17:46:39 +00:00
## </summary>
2005-07-18 18:31:49 +00:00
## <param name="domain">
## <summary>
2005-11-08 22:00:30 +00:00
## Domain allowed access.
## </summary>
2005-07-18 18:31:49 +00:00
## </param>
#
interface(`term_dontaudit_getattr_unallocated_ttys',`
gen_require(`
type tty_device_t;
')
dontaudit $1 tty_device_t:chr_file getattr;
')
2005-05-13 14:37:13 +00:00
########################################
2005-08-11 17:46:39 +00:00
## <summary>
2005-06-23 21:30:57 +00:00
## Set the attributes of all unallocated
## tty device nodes.
2005-08-11 17:46:39 +00:00
## </summary>
2005-06-23 21:30:57 +00:00
## <param name="domain">
## <summary>
2005-11-08 22:00:30 +00:00
## Domain allowed access.
## </summary>
2005-06-23 21:30:57 +00:00
## </param>
2006-09-06 22:07:25 +00:00
## <rolecap/>
2005-05-13 14:37:13 +00:00
#
interface(`term_setattr_unallocated_ttys',`
2005-06-16 21:06:29 +00:00
gen_require(`
type tty_device_t;
')
2005-06-13 16:22:32 +00:00
dev_list_all_dev_nodes($1)
allow $1 tty_device_t:chr_file setattr;
2005-05-13 14:37:13 +00:00
')
2006-08-28 02:46:20 +00:00
########################################
## <summary>
## Do not audit attempts to set the attributes
## of unallocated tty device nodes.
## </summary>
## <param name="domain">
## <summary>
## Domain allowed access.
## </summary>
## </param>
#
interface(`term_dontaudit_setattr_unallocated_ttys',`
gen_require(`
type tty_device_t;
')
dontaudit $1 tty_device_t:chr_file setattr;
')
2005-12-13 20:38:19 +00:00
########################################
## <summary>
## Do not audit attempts to ioctl
## unallocated tty device nodes.
## </summary>
## <param name="domain">
## <summary>
2005-12-13 20:38:19 +00:00
## Domain allowed access.
## </summary>
2005-12-13 20:38:19 +00:00
## </param>
#
interface(`term_dontaudit_ioctl_unallocated_ttys',`
gen_require(`
type tty_device_t;
')
dontaudit $1 tty_device_t:chr_file ioctl;
')
########################################
2005-08-11 17:46:39 +00:00
## <summary>
2005-06-23 21:30:57 +00:00
## Relabel from and to the unallocated
## tty type.
2005-08-11 17:46:39 +00:00
## </summary>
2005-06-23 21:30:57 +00:00
## <param name="domain">
## <summary>
2005-11-08 22:00:30 +00:00
## Domain allowed access.
## </summary>
2005-06-23 21:30:57 +00:00
## </param>
#
interface(`term_relabel_unallocated_ttys',`
2005-06-16 21:06:29 +00:00
gen_require(`
type tty_device_t;
')
2005-06-13 16:22:32 +00:00
dev_list_all_dev_nodes($1)
allow $1 tty_device_t:chr_file { relabelfrom relabelto };
')
2005-04-14 20:18:17 +00:00
########################################
2005-08-11 17:46:39 +00:00
## <summary>
2005-06-23 21:30:57 +00:00
## Relabel from all user tty types to
## the unallocated tty type.
2005-08-11 17:46:39 +00:00
## </summary>
2005-06-23 21:30:57 +00:00
## <param name="domain">
## <summary>
2005-11-08 22:00:30 +00:00
## Domain allowed access.
## </summary>
2005-06-23 21:30:57 +00:00
## </param>
2005-04-14 20:18:17 +00:00
#
interface(`term_reset_tty_labels',`
2005-06-16 21:06:29 +00:00
gen_require(`
attribute ttynode;
type tty_device_t;
')
2005-06-13 16:22:32 +00:00
dev_list_all_dev_nodes($1)
allow $1 ttynode:chr_file relabelfrom;
allow $1 tty_device_t:chr_file relabelto;
2005-04-14 20:18:17 +00:00
')
2006-08-28 02:46:20 +00:00
########################################
## <summary>
## Append to unallocated ttys.
## </summary>
## <param name="domain">
## <summary>
## Domain allowed access.
## </summary>
## </param>
#
interface(`term_append_unallocated_ttys',`
gen_require(`
type tty_device_t;
')
dev_list_all_dev_nodes($1)
allow $1 tty_device_t:chr_file { getattr append };
')
########################################
2005-08-11 17:46:39 +00:00
## <summary>
2005-06-23 21:30:57 +00:00
## Write to unallocated ttys.
2005-08-11 17:46:39 +00:00
## </summary>
2005-06-23 21:30:57 +00:00
## <param name="domain">
## <summary>
2005-11-08 22:00:30 +00:00
## Domain allowed access.
## </summary>
2005-06-23 21:30:57 +00:00
## </param>
#
interface(`term_write_unallocated_ttys',`
2005-06-16 21:06:29 +00:00
gen_require(`
type tty_device_t;
')
2005-06-13 16:22:32 +00:00
dev_list_all_dev_nodes($1)
allow $1 tty_device_t:chr_file { getattr write };
')
2005-04-14 20:18:17 +00:00
########################################
2005-08-11 17:46:39 +00:00
## <summary>
2005-06-23 21:30:57 +00:00
## Read and write unallocated ttys.
2005-08-11 17:46:39 +00:00
## </summary>
2005-06-23 21:30:57 +00:00
## <param name="domain">
## <summary>
2005-11-08 22:00:30 +00:00
## Domain allowed access.
## </summary>
2005-06-23 21:30:57 +00:00
## </param>
2006-09-06 22:07:25 +00:00
## <rolecap/>
#
2006-02-02 21:08:12 +00:00
interface(`term_use_unallocated_ttys',`
2005-06-16 21:06:29 +00:00
gen_require(`
type tty_device_t;
')
2005-06-13 16:22:32 +00:00
dev_list_all_dev_nodes($1)
2005-10-21 19:36:49 +00:00
allow $1 tty_device_t:chr_file { rw_term_perms lock append };
')
########################################
2005-08-11 17:46:39 +00:00
## <summary>
2005-06-23 21:30:57 +00:00
## Do not audit attempts to read or
## write unallocated ttys.
2005-08-11 17:46:39 +00:00
## </summary>
2005-06-23 21:30:57 +00:00
## <param name="domain">
## <summary>
2005-06-23 21:30:57 +00:00
## The type of the process to not audit.
## </summary>
2005-06-23 21:30:57 +00:00
## </param>
#
2006-02-02 21:08:12 +00:00
interface(`term_dontaudit_use_unallocated_ttys',`
2005-06-16 21:06:29 +00:00
gen_require(`
type tty_device_t;
')
dontaudit $1 tty_device_t:chr_file { rw_term_perms lock append };
')
########################################
2005-08-11 17:46:39 +00:00
## <summary>
2005-06-23 21:30:57 +00:00
## Get the attributes of all user tty
## device nodes.
2005-08-11 17:46:39 +00:00
## </summary>
2005-06-23 21:30:57 +00:00
## <param name="domain">
## <summary>
2005-11-08 22:00:30 +00:00
## Domain allowed access.
## </summary>
2005-06-23 21:30:57 +00:00
## </param>
2006-09-06 22:07:25 +00:00
## <rolecap/>
#
interface(`term_getattr_all_user_ttys',`
2005-06-16 21:06:29 +00:00
gen_require(`
attribute ttynode;
')
2005-06-13 16:22:32 +00:00
dev_list_all_dev_nodes($1)
allow $1 ttynode:chr_file getattr;
')
########################################
2005-08-11 17:46:39 +00:00
## <summary>
2005-06-23 21:30:57 +00:00
## Do not audit attempts to get the
## attributes of any user tty
## device nodes.
2005-08-11 17:46:39 +00:00
## </summary>
2005-06-23 21:30:57 +00:00
## <param name="domain">
## <summary>
2005-11-08 22:00:30 +00:00
## Domain allowed access.
## </summary>
2005-06-23 21:30:57 +00:00
## </param>
#
interface(`term_dontaudit_getattr_all_user_ttys',`
2005-06-16 21:06:29 +00:00
gen_require(`
attribute ttynode;
')
2005-06-13 16:22:32 +00:00
dev_list_all_dev_nodes($1)
2005-06-09 19:52:50 +00:00
dontaudit $1 ttynode:chr_file getattr;
')
2005-04-14 20:18:17 +00:00
########################################
2005-08-11 17:46:39 +00:00
## <summary>
2005-06-23 21:30:57 +00:00
## Set the attributes of all user tty
## device nodes.
2005-08-11 17:46:39 +00:00
## </summary>
2005-06-23 21:30:57 +00:00
## <param name="domain">
## <summary>
2005-11-08 22:00:30 +00:00
## Domain allowed access.
## </summary>
2005-06-23 21:30:57 +00:00
## </param>
2006-09-06 22:07:25 +00:00
## <rolecap/>
2005-04-14 20:18:17 +00:00
#
interface(`term_setattr_all_user_ttys',`
2005-06-16 21:06:29 +00:00
gen_require(`
attribute ttynode;
')
2005-06-13 17:35:46 +00:00
dev_list_all_dev_nodes($1)
2005-06-09 19:52:50 +00:00
allow $1 ttynode:chr_file setattr;
2005-04-14 20:18:17 +00:00
')
########################################
2005-08-11 17:46:39 +00:00
## <summary>
2005-06-23 21:30:57 +00:00
## Relabel from and to all user
## user tty device nodes.
2005-08-11 17:46:39 +00:00
## </summary>
2005-06-23 21:30:57 +00:00
## <param name="domain">
## <summary>
2005-11-08 22:00:30 +00:00
## Domain allowed access.
## </summary>
2005-06-23 21:30:57 +00:00
## </param>
#
interface(`term_relabel_all_user_ttys',`
2005-06-16 21:06:29 +00:00
gen_require(`
attribute ttynode;
')
2005-06-13 16:22:32 +00:00
dev_list_all_dev_nodes($1)
allow $1 ttynode:chr_file { relabelfrom relabelto };
')
########################################
2005-08-11 17:46:39 +00:00
## <summary>
2005-06-23 21:30:57 +00:00
## Write to all user ttys.
2005-08-11 17:46:39 +00:00
## </summary>
2005-06-23 21:30:57 +00:00
## <param name="domain">
## <summary>
2005-11-08 22:00:30 +00:00
## Domain allowed access.
## </summary>
2005-06-23 21:30:57 +00:00
## </param>
#
interface(`term_write_all_user_ttys',`
2005-06-16 21:06:29 +00:00
gen_require(`
attribute ttynode;
')
2005-06-13 16:22:32 +00:00
dev_list_all_dev_nodes($1)
2007-06-12 13:06:13 +00:00
allow $1 ttynode:chr_file { getattr write append };
')
2005-04-28 21:41:09 +00:00
########################################
2005-08-11 17:46:39 +00:00
## <summary>
2005-06-23 21:30:57 +00:00
## Read and write all user to all user ttys.
2005-08-11 17:46:39 +00:00
## </summary>
2005-06-23 21:30:57 +00:00
## <param name="domain">
## <summary>
2005-11-08 22:00:30 +00:00
## Domain allowed access.
## </summary>
2005-06-23 21:30:57 +00:00
## </param>
2006-09-06 22:07:25 +00:00
## <rolecap/>
2005-04-28 21:41:09 +00:00
#
interface(`term_use_all_user_ttys',`
2005-06-16 21:06:29 +00:00
gen_require(`
attribute ttynode;
')
2005-06-13 16:22:32 +00:00
dev_list_all_dev_nodes($1)
2005-10-21 21:35:25 +00:00
allow $1 ttynode:chr_file { rw_term_perms lock append };
2005-04-28 21:41:09 +00:00
')
########################################
2005-08-11 17:46:39 +00:00
## <summary>
2005-06-23 21:30:57 +00:00
## Do not audit attempts to read or write
## any user ttys.
2005-08-11 17:46:39 +00:00
## </summary>
2005-06-23 21:30:57 +00:00
## <param name="domain">
## <summary>
2005-11-08 22:00:30 +00:00
## Domain allowed access.
## </summary>
2005-06-23 21:30:57 +00:00
## </param>
#
interface(`term_dontaudit_use_all_user_ttys',`
2005-06-16 21:06:29 +00:00
gen_require(`
attribute ttynode;
')
dontaudit $1 ttynode:chr_file { read write };
')