2005-05-31 19:52:57 +00:00
|
|
|
## <summary>Policy for terminals.</summary>
|
2005-08-18 21:27:20 +00:00
|
|
|
## <required val="true">
|
|
|
|
## Depended on by other required modules.
|
|
|
|
## </required>
|
2005-04-20 19:07:16 +00:00
|
|
|
|
2005-04-22 19:31:32 +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">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## An object type that will applied to a pty.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-04-22 19:31:32 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`term_pty',`
|
2005-06-16 21:06:29 +00:00
|
|
|
gen_require(`
|
|
|
|
attribute ptynode;
|
|
|
|
type devpts_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2007-02-20 20:17:07 +00:00
|
|
|
dev_node($1)
|
2005-06-03 12:25:14 +00:00
|
|
|
allow $1 devpts_t:filesystem associate;
|
|
|
|
typeattribute $1 ptynode;
|
2005-05-16 21:10:33 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
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">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## The type of the user domain associated with
|
|
|
|
## this pty.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
|
|
|
## <param name="object_type">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## An object type that will applied to a pty.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-05-16 21:10:33 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`term_user_pty',`
|
2005-06-16 21:06:29 +00:00
|
|
|
gen_require(`
|
|
|
|
attribute server_ptynode;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-23 14:19:56 +00:00
|
|
|
term_pty($2)
|
2006-01-20 22:05:40 +00:00
|
|
|
type_change $1 server_ptynode:chr_file $2;
|
2005-05-16 21:10:33 +00:00
|
|
|
')
|
|
|
|
|
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">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## An object type that will applied to a pty.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-06-21 21:07:46 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +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-05-16 21:10:33 +00:00
|
|
|
########################################
|
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">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## An object type that will applied to a tty.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-05-16 21:10:33 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
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
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
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;
|
2011-01-10 10:09:22 +00:00
|
|
|
type console_device_t;
|
2006-10-16 16:51:57 +00:00
|
|
|
type tty_device_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
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
|
|
|
|
2005-06-03 12:25:14 +00:00
|
|
|
# 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-16 21:06:29 +00:00
|
|
|
type_change $1 ttynode:chr_file $2;
|
2005-06-03 12:25:14 +00:00
|
|
|
')
|
2011-01-10 10:09:22 +00:00
|
|
|
|
2011-01-14 16:44:42 +00:00
|
|
|
tunable_policy(`console_login',`
|
2011-01-10 10:09:22 +00:00
|
|
|
# When user logs in from /dev/console, relabel it
|
|
|
|
# to user tty type as well.
|
|
|
|
type_change $1 console_device_t:chr_file $2;
|
|
|
|
')
|
2005-05-16 21:10:33 +00:00
|
|
|
')
|
|
|
|
|
2017-04-01 16:08:42 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## mount a devpts_t filesystem
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## The type of the process to mount it
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`term_mount_devpts',`
|
|
|
|
gen_require(`
|
|
|
|
type devpts_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
allow $1 devpts_t:filesystem mount;
|
|
|
|
')
|
|
|
|
|
2017-09-10 18:22:21 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Create directory /dev/pts.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## The type of the process creating the directory.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
2017-09-12 00:03:58 +00:00
|
|
|
interface(`term_create_devpts_dirs',`
|
2017-09-10 18:22:21 +00:00
|
|
|
gen_require(`
|
|
|
|
type devpts_t;
|
|
|
|
')
|
|
|
|
|
2020-06-11 16:37:17 +00:00
|
|
|
dev_add_entry_generic_dirs($1)
|
2017-09-10 18:22:21 +00:00
|
|
|
allow $1 devpts_t:dir create_dir_perms;
|
|
|
|
')
|
|
|
|
|
2005-05-16 21:10:33 +00:00
|
|
|
########################################
|
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">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## The type of the process creating the pty.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
|
|
|
## <param name="pty_type">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## The type of the pty.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-05-16 21:10:33 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
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)
|
2020-04-14 21:47:06 +00:00
|
|
|
allow $1 ptmx_t:chr_file rw_chr_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;
|
2005-06-03 12:25:14 +00:00
|
|
|
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
|
|
|
')
|
|
|
|
|
2009-09-08 14:06:38 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Write the console, all
|
|
|
|
## ttys and all ptys.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
## <rolecap/>
|
|
|
|
#
|
|
|
|
interface(`term_write_all_terms',`
|
|
|
|
gen_require(`
|
|
|
|
attribute ttynode, ptynode;
|
|
|
|
type console_device_t, devpts_t, tty_device_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
dev_list_all_dev_nodes($1)
|
|
|
|
allow $1 devpts_t:dir list_dir_perms;
|
|
|
|
allow $1 { console_device_t tty_device_t ttynode ptynode }:chr_file write_chr_file_perms;
|
|
|
|
')
|
|
|
|
|
2005-05-02 18:42:10 +00:00
|
|
|
########################################
|
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">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-11-08 22:00:30 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2006-09-06 22:07:25 +00:00
|
|
|
## <rolecap/>
|
2005-05-02 18:42:10 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
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-03 12:25:14 +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;
|
2009-11-19 19:57:49 +00:00
|
|
|
allow $1 { devpts_t console_device_t tty_device_t ttynode ptynode }:chr_file rw_chr_file_perms;
|
2005-05-02 18:42:10 +00:00
|
|
|
')
|
|
|
|
|
2005-05-31 21:25:45 +00:00
|
|
|
########################################
|
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">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-11-08 22:00:30 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2006-09-06 22:07:25 +00:00
|
|
|
## <rolecap/>
|
2005-05-31 21:25:45 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`term_write_console',`
|
2005-06-16 21:06:29 +00:00
|
|
|
gen_require(`
|
|
|
|
type console_device_t;
|
|
|
|
')
|
2005-05-31 21:25:45 +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 console_device_t:chr_file write_chr_file_perms;
|
2005-05-31 21:25:45 +00:00
|
|
|
')
|
|
|
|
|
2005-12-08 15:01:57 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read from the console.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-12-08 15:01:57 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </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
|
|
|
')
|
|
|
|
|
2010-02-18 01:33:53 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Do not audit attempts to read from the console.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
2010-08-05 12:57:11 +00:00
|
|
|
## Domain to not audit.
|
2010-02-18 01:33:53 +00:00
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
## <rolecap/>
|
|
|
|
#
|
|
|
|
interface(`term_dontaudit_read_console',`
|
|
|
|
gen_require(`
|
|
|
|
type console_device_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
dontaudit $1 console_device_t:chr_file read_chr_file_perms;
|
|
|
|
')
|
|
|
|
|
2005-05-03 20:23:33 +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">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-11-08 22:00:30 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2006-09-06 22:07:25 +00:00
|
|
|
## <rolecap/>
|
2005-05-03 20:23:33 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`term_use_console',`
|
2005-06-16 21:06:29 +00:00
|
|
|
gen_require(`
|
|
|
|
type console_device_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +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 console_device_t:chr_file rw_chr_file_perms;
|
2005-05-03 20:23:33 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-08-11 17:46:39 +00:00
|
|
|
## <summary>
|
2020-08-11 13:01:34 +00:00
|
|
|
## Do not audit attempts to read from
|
2005-06-23 21:30:57 +00:00
|
|
|
## 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">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2010-08-05 12:57:11 +00:00
|
|
|
## Domain to not audit.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-05-03 20:23:33 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`term_dontaudit_use_console',`
|
2005-06-16 21:06:29 +00:00
|
|
|
gen_require(`
|
|
|
|
type console_device_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
dontaudit $1 console_device_t:chr_file rw_chr_file_perms;
|
2005-05-03 20:23:33 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
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">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-11-08 22:00:30 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2006-09-06 22:07:25 +00:00
|
|
|
## <rolecap/>
|
2005-05-03 20:23:33 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`term_setattr_console',`
|
2005-06-16 21:06:29 +00:00
|
|
|
gen_require(`
|
|
|
|
type console_device_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-13 16:22:32 +00:00
|
|
|
dev_list_all_dev_nodes($1)
|
2005-06-03 12:25:14 +00:00
|
|
|
allow $1 console_device_t:chr_file setattr;
|
2005-05-03 20:23:33 +00:00
|
|
|
')
|
|
|
|
|
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)
|
2011-03-31 13:49:01 +00:00
|
|
|
allow $1 console_device_t:chr_file relabel_chr_file_perms;
|
2007-06-12 13:06:13 +00:00
|
|
|
')
|
|
|
|
|
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)
|
2020-06-11 16:37:17 +00:00
|
|
|
allow $1 console_device_t:chr_file create_chr_file_perms;
|
2006-08-23 03:47:39 +00:00
|
|
|
allow $1 self:capability mknod;
|
|
|
|
')
|
|
|
|
|
2006-08-29 02:41:00 +00:00
|
|
|
########################################
|
|
|
|
## <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;
|
|
|
|
')
|
|
|
|
|
2012-10-21 12:20:14 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Relabel from and to pty filesystem.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`term_relabel_pty_fs',`
|
|
|
|
gen_require(`
|
|
|
|
type devpts_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
dev_list_all_dev_nodes($1)
|
|
|
|
allow $1 devpts_t:filesystem { relabelto relabelfrom };
|
|
|
|
')
|
|
|
|
|
2016-12-18 20:58:44 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Get the attributes of the
|
|
|
|
## /dev/pts directory.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`term_getattr_pty_dirs',`
|
|
|
|
gen_require(`
|
|
|
|
type devpts_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
allow $1 devpts_t:dir 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">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2010-08-03 13:20:22 +00:00
|
|
|
## Domain to not audit.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </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">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-11-08 22:00:30 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </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">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2010-08-05 12:57:11 +00:00
|
|
|
## Domain to not audit.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2006-01-04 15:26:42 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`term_dontaudit_search_ptys',`
|
|
|
|
gen_require(`
|
|
|
|
type devpts_t;
|
|
|
|
')
|
|
|
|
|
2006-08-29 02:41:00 +00:00
|
|
|
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-05-03 20:23:33 +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">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-11-08 22:00:30 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-05-03 20:23:33 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`term_list_ptys',`
|
2005-06-16 21:06:29 +00:00
|
|
|
gen_require(`
|
|
|
|
type devpts_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +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-05-03 20:23:33 +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 the
|
2005-08-15 19:31:37 +00:00
|
|
|
## /dev/pts directory.
|
2005-08-11 17:46:39 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2010-08-03 13:20:22 +00:00
|
|
|
## Domain to not audit.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-05-03 20:23:33 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`term_dontaudit_list_ptys',`
|
2005-06-16 21:06:29 +00:00
|
|
|
gen_require(`
|
|
|
|
type devpts_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
dontaudit $1 devpts_t:dir { getattr search read };
|
2005-05-03 20:23:33 +00:00
|
|
|
')
|
|
|
|
|
2005-08-15 19:31:37 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Do not audit attempts to create, read,
|
|
|
|
## write, or delete the /dev/pts directory.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2010-08-03 13:20:22 +00:00
|
|
|
## Domain to not audit.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-08-15 19:31:37 +00:00
|
|
|
## </param>
|
|
|
|
#
|
2006-02-02 21:08:12 +00:00
|
|
|
interface(`term_dontaudit_manage_pty_dirs',`
|
2005-08-15 19:31:37 +00:00
|
|
|
gen_require(`
|
|
|
|
type devpts_t;
|
|
|
|
')
|
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
dontaudit $1 devpts_t:dir manage_dir_perms;
|
2005-08-15 19:31:37 +00:00
|
|
|
')
|
|
|
|
|
2015-10-23 14:16:59 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Relabel from and to pty directories.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`term_relabel_pty_dirs',`
|
|
|
|
gen_require(`
|
|
|
|
type devpts_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
dev_list_all_dev_nodes($1)
|
|
|
|
allow $1 devpts_t:dir relabel_dir_perms;
|
|
|
|
')
|
|
|
|
|
2016-07-30 20:25:42 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Get the attributes of generic pty devices.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain to allow
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`term_getattr_generic_ptys',`
|
|
|
|
gen_require(`
|
|
|
|
type devpts_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
allow $1 devpts_t:chr_file getattr;
|
|
|
|
')
|
2016-12-18 20:58:44 +00:00
|
|
|
|
2009-11-19 19:57:49 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Do not audit attempts to get the attributes
|
|
|
|
## of generic pty devices.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
2010-08-03 13:20:22 +00:00
|
|
|
## Domain to not audit.
|
2009-11-19 19:57:49 +00:00
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`term_dontaudit_getattr_generic_ptys',`
|
|
|
|
gen_require(`
|
|
|
|
type devpts_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
dontaudit $1 devpts_t:chr_file getattr;
|
|
|
|
')
|
2005-10-14 20:00:07 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
2006-09-06 16:36:23 +00:00
|
|
|
## ioctl of generic pty devices.
|
2005-10-14 20:00:07 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-11-08 22:00:30 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </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;
|
|
|
|
')
|
|
|
|
|
2006-10-31 21:01:48 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Allow setting the attributes of
|
|
|
|
## generic pty devices.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`term_setattr_generic_ptys',`
|
|
|
|
gen_require(`
|
|
|
|
type devpts_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
allow $1 devpts_t:chr_file setattr;
|
|
|
|
')
|
|
|
|
|
2006-09-06 16:36:23 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Dontaudit setting the attributes of
|
|
|
|
## generic pty devices.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
2010-08-05 12:57:11 +00:00
|
|
|
## Domain to not audit.
|
2006-09-06 16:36:23 +00:00
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`term_dontaudit_setattr_generic_ptys',`
|
|
|
|
gen_require(`
|
|
|
|
type devpts_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
dontaudit $1 devpts_t:chr_file setattr;
|
|
|
|
')
|
|
|
|
|
2005-05-03 20:23:33 +00:00
|
|
|
########################################
|
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">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-11-08 22:00:30 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-05-03 20:23:33 +00:00
|
|
|
#
|
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-03 12:25:14 +00:00
|
|
|
|
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;
|
2020-08-14 14:33:08 +00:00
|
|
|
allow $1 devpts_t:chr_file rw_chr_file_perms;
|
2005-05-03 20:23:33 +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
|
|
|
## 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">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2010-08-03 13:20:22 +00:00
|
|
|
## Domain to not audit.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </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;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2006-05-19 14:02:24 +00:00
|
|
|
dontaudit $1 devpts_t:chr_file { getattr read write ioctl };
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2020-06-04 20:03:34 +00:00
|
|
|
#######################################
|
|
|
|
## <summary>
|
|
|
|
## Create the tty device.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`term_create_controlling_term',`
|
|
|
|
gen_require(`
|
|
|
|
type devtty_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
dev_list_all_dev_nodes($1)
|
|
|
|
dev_add_entry_generic_dirs($1)
|
|
|
|
allow $1 devtty_t:chr_file create_chr_file_perms;
|
|
|
|
allow $1 self:capability mknod;
|
|
|
|
')
|
|
|
|
|
2009-11-19 19:57:49 +00:00
|
|
|
#######################################
|
|
|
|
## <summary>
|
2009-11-24 16:11:38 +00:00
|
|
|
## Set the attributes of the tty device
|
2009-11-19 19:57:49 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2009-11-24 16:11:38 +00:00
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
2009-11-19 19:57:49 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`term_setattr_controlling_term',`
|
2009-11-24 16:11:38 +00:00
|
|
|
gen_require(`
|
|
|
|
type devtty_t;
|
|
|
|
')
|
2009-11-19 19:57:49 +00:00
|
|
|
|
|
|
|
dev_list_all_dev_nodes($1)
|
|
|
|
allow $1 devtty_t:chr_file setattr;
|
|
|
|
')
|
|
|
|
|
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">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-11-08 22:00:30 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-04-27 21:54:39 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`term_use_controlling_term',`
|
2005-06-16 20:54:18 +00:00
|
|
|
gen_require(`
|
|
|
|
type devtty_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-13 16:22:32 +00:00
|
|
|
dev_list_all_dev_nodes($1)
|
2020-08-14 14:33:08 +00:00
|
|
|
allow $1 devtty_t:chr_file rw_chr_file_perms;
|
2005-04-27 21:54:39 +00:00
|
|
|
')
|
|
|
|
|
2020-06-04 20:03:34 +00:00
|
|
|
#######################################
|
|
|
|
## <summary>
|
|
|
|
## Create the pty multiplexor (/dev/ptmx).
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain to not audit.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`term_create_ptmx',`
|
|
|
|
gen_require(`
|
|
|
|
type ptmx_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
dev_add_entry_generic_dirs($1)
|
|
|
|
allow $1 ptmx_t:chr_file create_chr_file_perms;
|
|
|
|
allow $1 self:capability mknod;
|
|
|
|
')
|
|
|
|
|
2011-03-31 13:49:01 +00:00
|
|
|
#######################################
|
|
|
|
## <summary>
|
|
|
|
## Get the attributes of the pty multiplexor (/dev/ptmx).
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain to not audit.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`term_getattr_ptmx',`
|
|
|
|
gen_require(`
|
|
|
|
type ptmx_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
allow $1 ptmx_t:chr_file getattr;
|
|
|
|
')
|
|
|
|
|
2010-06-09 12:22:31 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Do not audit attempts to get attributes
|
|
|
|
## on the pty multiplexor (/dev/ptmx).
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain to not audit.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`term_dontaudit_getattr_ptmx',`
|
|
|
|
gen_require(`
|
|
|
|
type ptmx_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
dontaudit $1 ptmx_t:chr_file getattr;
|
|
|
|
')
|
|
|
|
|
2005-10-14 20:00:07 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read and write the pty multiplexor (/dev/ptmx).
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2010-08-05 12:57:11 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </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)
|
2020-04-14 21:47:06 +00:00
|
|
|
allow $1 ptmx_t:chr_file rw_chr_file_perms;
|
2005-10-14 20:00:07 +00:00
|
|
|
')
|
|
|
|
|
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">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2010-08-03 13:20:22 +00:00
|
|
|
## Domain to not audit.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-04-28 15:47:50 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`term_dontaudit_use_ptmx',`
|
2005-06-16 21:06:29 +00:00
|
|
|
gen_require(`
|
|
|
|
type ptmx_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
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>
|
2010-02-11 19:20:10 +00:00
|
|
|
## Get the attributes of all
|
2005-06-23 21:30:57 +00:00
|
|
|
## pty device nodes.
|
2005-08-11 17:46:39 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-11-08 22:00:30 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </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
|
|
|
#
|
2010-02-11 19:20:10 +00:00
|
|
|
interface(`term_getattr_all_ptys',`
|
2005-06-16 21:06:29 +00:00
|
|
|
gen_require(`
|
|
|
|
attribute ptynode;
|
2008-05-15 13:10:34 +00:00
|
|
|
type devpts_t;
|
2005-06-16 21:06:29 +00:00
|
|
|
')
|
2005-06-03 12:25:14 +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-06-03 12:25:14 +00:00
|
|
|
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
|
2010-02-11 19:20:10 +00:00
|
|
|
## attributes of any pty
|
2005-07-15 19:18:55 +00:00
|
|
|
## device nodes.
|
2005-08-11 17:46:39 +00:00
|
|
|
## </summary>
|
2005-07-15 19:18:55 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2010-08-05 12:57:11 +00:00
|
|
|
## Domain to not audit.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-07-15 19:18:55 +00:00
|
|
|
## </param>
|
|
|
|
#
|
2010-02-11 19:20:10 +00:00
|
|
|
interface(`term_dontaudit_getattr_all_ptys',`
|
2005-07-15 19:18:55 +00:00
|
|
|
gen_require(`
|
|
|
|
attribute ptynode;
|
|
|
|
')
|
|
|
|
|
|
|
|
dontaudit $1 ptynode:chr_file getattr;
|
|
|
|
')
|
|
|
|
|
2005-07-28 20:52:55 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
2010-02-11 19:20:10 +00:00
|
|
|
## Set the attributes of all
|
2005-07-28 20:52:55 +00:00
|
|
|
## pty device nodes.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-11-08 22:00:30 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </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
|
|
|
#
|
2010-02-11 19:20:10 +00:00
|
|
|
interface(`term_setattr_all_ptys',`
|
2005-07-28 20:52:55 +00:00
|
|
|
gen_require(`
|
|
|
|
attribute ptynode;
|
2008-05-15 13:10:34 +00:00
|
|
|
type devpts_t;
|
2005-07-28 20:52:55 +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-07-28 20:52:55 +00:00
|
|
|
allow $1 ptynode:chr_file setattr;
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
2010-02-11 19:20:10 +00:00
|
|
|
## Relabel to all ptys.
|
2005-07-28 20:52:55 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-11-08 22:00:30 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-07-28 20:52:55 +00:00
|
|
|
## </param>
|
|
|
|
#
|
2010-02-11 19:20:10 +00:00
|
|
|
interface(`term_relabelto_all_ptys',`
|
2005-07-28 20:52:55 +00:00
|
|
|
gen_require(`
|
|
|
|
attribute ptynode;
|
|
|
|
')
|
|
|
|
|
|
|
|
allow $1 ptynode:chr_file relabelto;
|
|
|
|
')
|
|
|
|
|
2007-09-06 19:29:54 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
2010-02-11 19:20:10 +00:00
|
|
|
## Write to all ptys.
|
2007-09-06 19:29:54 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
2010-02-11 19:20:10 +00:00
|
|
|
interface(`term_write_all_ptys',`
|
2007-09-06 19:29:54 +00:00
|
|
|
gen_require(`
|
|
|
|
attribute ptynode;
|
|
|
|
')
|
|
|
|
|
|
|
|
dev_list_all_dev_nodes($1)
|
|
|
|
allow $1 ptynode:chr_file write_chr_file_perms;
|
|
|
|
')
|
|
|
|
|
2005-05-13 14:37:13 +00:00
|
|
|
########################################
|
2005-08-11 17:46:39 +00:00
|
|
|
## <summary>
|
2010-02-11 19:20:10 +00:00
|
|
|
## Read and write all ptys.
|
2005-08-11 17:46:39 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-11-08 22:00:30 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </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
|
|
|
#
|
2010-02-11 19:20:10 +00:00
|
|
|
interface(`term_use_all_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-03 12:25:14 +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;
|
2020-08-14 14:33:08 +00:00
|
|
|
allow $1 ptynode:chr_file rw_chr_file_perms;
|
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>
|
2010-02-11 19:20:10 +00:00
|
|
|
## Do not audit attempts to read or write any ptys.
|
2005-08-11 17:46:39 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2010-02-11 19:20:10 +00:00
|
|
|
## Domain to not audit.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-05-05 17:44:11 +00:00
|
|
|
#
|
2010-02-11 19:20:10 +00:00
|
|
|
interface(`term_dontaudit_use_all_ptys',`
|
2005-06-16 21:06:29 +00:00
|
|
|
gen_require(`
|
|
|
|
attribute ptynode;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2020-08-14 14:33:08 +00:00
|
|
|
dontaudit $1 ptynode:chr_file rw_chr_file_perms;
|
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>
|
2010-02-11 19:20:10 +00:00
|
|
|
## Relabel from and to all pty device nodes.
|
2005-08-11 17:46:39 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-11-08 22:00:30 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-06-21 17:01:45 +00:00
|
|
|
#
|
2010-02-11 19:20:10 +00:00
|
|
|
interface(`term_relabel_all_ptys',`
|
2005-06-21 17:01:45 +00:00
|
|
|
gen_require(`
|
|
|
|
attribute ptynode;
|
2005-07-13 18:29:08 +00:00
|
|
|
type devpts_t;
|
2005-06-21 17:01:45 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
dev_list_all_dev_nodes($1)
|
2008-07-23 21:38:39 +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">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-11-08 22:00:30 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </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
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`term_getattr_unallocated_ttys',`
|
2005-06-16 21:06:29 +00:00
|
|
|
gen_require(`
|
|
|
|
type tty_device_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-13 16:22:32 +00:00
|
|
|
dev_list_all_dev_nodes($1)
|
2005-06-03 12:25:14 +00:00
|
|
|
allow $1 tty_device_t:chr_file getattr;
|
2005-05-13 14:37:13 +00:00
|
|
|
')
|
|
|
|
|
single binary modutils
On Tuesday, 2 August 2016 7:59:28 PM AEDT Chris PeBenito wrote:
> On 07/31/16 08:34, Russell Coker wrote:
> > The following patch deals with a single binary for modutils, so depmod_t,
> > and insmod_t are merged.
>
> Since the main SELinux distros (including RHEL/CentOS 7) all have merged
> modutils these days, I'm open to taking a patch that fully merges these
> domains (in which case renaming to kmod_t, with proper aliasing seems
> the best idea).
>
> However, it's been some time since I used a busybox-based system; does
> busybox still have separated tools? Yes, this is a bit of an obvious
> question since busybox is also single-binary, but IIRC, the embedded
> guys made some tiny helper scripts or executables so proper
> transitioning could occur. Separate domains may still make sense.
As we have had no response from Busybox users in the last 3 months and also no
response to the thread Luis started in 2013 I think it's safe to assume that
they don't need this.
I've attached a new patch which renames to kmod_t as you suggested. Please
consider it for inclusion.
--
My Main Blog http://etbe.coker.com.au/
My Documents Blog http://doc.coker.com.au/
Description: Change modutils policy to match the use of a single binary
Author: Russell Coker <russell@coker.com.au>
Last-Update: 2014-06-25
2016-10-21 08:35:53 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Setattr and unlink unallocated tty device nodes.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
## <rolecap/>
|
|
|
|
#
|
|
|
|
interface(`term_setattr_unlink_unallocated_ttys',`
|
|
|
|
gen_require(`
|
|
|
|
type tty_device_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
dev_list_all_dev_nodes($1)
|
2020-08-14 14:33:08 +00:00
|
|
|
allow $1 tty_device_t:chr_file { delete_chr_file_perms setattr };
|
single binary modutils
On Tuesday, 2 August 2016 7:59:28 PM AEDT Chris PeBenito wrote:
> On 07/31/16 08:34, Russell Coker wrote:
> > The following patch deals with a single binary for modutils, so depmod_t,
> > and insmod_t are merged.
>
> Since the main SELinux distros (including RHEL/CentOS 7) all have merged
> modutils these days, I'm open to taking a patch that fully merges these
> domains (in which case renaming to kmod_t, with proper aliasing seems
> the best idea).
>
> However, it's been some time since I used a busybox-based system; does
> busybox still have separated tools? Yes, this is a bit of an obvious
> question since busybox is also single-binary, but IIRC, the embedded
> guys made some tiny helper scripts or executables so proper
> transitioning could occur. Separate domains may still make sense.
As we have had no response from Busybox users in the last 3 months and also no
response to the thread Luis started in 2013 I think it's safe to assume that
they don't need this.
I've attached a new patch which renames to kmod_t as you suggested. Please
consider it for inclusion.
--
My Main Blog http://etbe.coker.com.au/
My Documents Blog http://doc.coker.com.au/
Description: Change modutils policy to match the use of a single binary
Author: Russell Coker <russell@coker.com.au>
Last-Update: 2014-06-25
2016-10-21 08:35:53 +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">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2010-08-05 12:57:11 +00:00
|
|
|
## Domain to not audit.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </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">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-11-08 22:00:30 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </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
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`term_setattr_unallocated_ttys',`
|
2005-06-16 21:06:29 +00:00
|
|
|
gen_require(`
|
|
|
|
type tty_device_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-13 16:22:32 +00:00
|
|
|
dev_list_all_dev_nodes($1)
|
2005-06-03 12:25:14 +00:00
|
|
|
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>
|
2010-08-05 12:57:11 +00:00
|
|
|
## Domain to not audit.
|
2006-08-28 02:46:20 +00:00
|
|
|
## </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">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2010-08-05 12:57:11 +00:00
|
|
|
## Domain to not audit.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </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-05-31 19:52:57 +00:00
|
|
|
########################################
|
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">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-11-08 22:00:30 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-05-31 19:52:57 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`term_relabel_unallocated_ttys',`
|
2005-06-16 21:06:29 +00:00
|
|
|
gen_require(`
|
|
|
|
type tty_device_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-13 16:22:32 +00:00
|
|
|
dev_list_all_dev_nodes($1)
|
2011-03-31 13:49:01 +00:00
|
|
|
allow $1 tty_device_t:chr_file relabel_chr_file_perms;
|
2005-05-31 19:52:57 +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
|
|
|
## 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">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-11-08 22:00:30 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +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-03 12:25:14 +00:00
|
|
|
|
2005-06-13 16:22:32 +00:00
|
|
|
dev_list_all_dev_nodes($1)
|
2005-06-03 12:25:14 +00:00
|
|
|
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)
|
2008-10-20 16:10:42 +00:00
|
|
|
allow $1 tty_device_t:chr_file append_chr_file_perms;
|
2006-08-28 02:46:20 +00:00
|
|
|
')
|
|
|
|
|
2005-05-19 21:06:06 +00:00
|
|
|
########################################
|
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">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-11-08 22:00:30 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-05-19 21:06:06 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`term_write_unallocated_ttys',`
|
2005-06-16 21:06:29 +00:00
|
|
|
gen_require(`
|
|
|
|
type tty_device_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-13 16:22:32 +00:00
|
|
|
dev_list_all_dev_nodes($1)
|
2008-10-20 16:10:42 +00:00
|
|
|
allow $1 tty_device_t:chr_file write_chr_file_perms;
|
2005-05-19 21:06:06 +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
|
|
|
## 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">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-11-08 22:00:30 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2006-09-06 22:07:25 +00:00
|
|
|
## <rolecap/>
|
2005-05-02 18:42:10 +00:00
|
|
|
#
|
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-03 12:25:14 +00:00
|
|
|
|
2005-06-13 16:22:32 +00:00
|
|
|
dev_list_all_dev_nodes($1)
|
2008-10-20 16:10:42 +00:00
|
|
|
allow $1 tty_device_t:chr_file rw_chr_file_perms;
|
2005-05-02 18:42:10 +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 unallocated ttys.
|
2005-08-11 17:46:39 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2010-08-03 13:20:22 +00:00
|
|
|
## Domain to not audit.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-05-02 18:42:10 +00:00
|
|
|
#
|
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;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2008-10-20 16:10:42 +00:00
|
|
|
dontaudit $1 tty_device_t:chr_file rw_chr_file_perms;
|
2005-05-02 18:42:10 +00:00
|
|
|
')
|
|
|
|
|
2005-04-28 18:59:01 +00:00
|
|
|
########################################
|
2005-08-11 17:46:39 +00:00
|
|
|
## <summary>
|
2010-02-11 19:20:10 +00:00
|
|
|
## Get the attributes of all tty device nodes.
|
2005-08-11 17:46:39 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-11-08 22:00:30 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2006-09-06 22:07:25 +00:00
|
|
|
## <rolecap/>
|
2005-04-28 18:59:01 +00:00
|
|
|
#
|
2010-02-11 19:20:10 +00:00
|
|
|
interface(`term_getattr_all_ttys',`
|
2005-06-16 21:06:29 +00:00
|
|
|
gen_require(`
|
|
|
|
attribute ttynode;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-13 16:22:32 +00:00
|
|
|
dev_list_all_dev_nodes($1)
|
2005-06-03 12:25:14 +00:00
|
|
|
allow $1 ttynode:chr_file getattr;
|
2005-04-28 18:59:01 +00:00
|
|
|
')
|
|
|
|
|
2005-05-31 19:52:57 +00:00
|
|
|
########################################
|
2005-08-11 17:46:39 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Do not audit attempts to get the
|
2010-02-11 19:20:10 +00:00
|
|
|
## attributes of any tty device nodes.
|
2005-08-11 17:46:39 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2010-08-05 12:57:11 +00:00
|
|
|
## Domain to not audit.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-05-31 19:52:57 +00:00
|
|
|
#
|
2010-02-11 19:20:10 +00:00
|
|
|
interface(`term_dontaudit_getattr_all_ttys',`
|
2005-06-16 21:06:29 +00:00
|
|
|
gen_require(`
|
|
|
|
attribute ttynode;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
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-05-31 19:52:57 +00:00
|
|
|
')
|
|
|
|
|
2005-04-14 20:18:17 +00:00
|
|
|
########################################
|
2005-08-11 17:46:39 +00:00
|
|
|
## <summary>
|
2010-02-11 19:20:10 +00:00
|
|
|
## Set the attributes of all tty device nodes.
|
2005-08-11 17:46:39 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-11-08 22:00:30 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </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
|
|
|
#
|
2010-02-11 19:20:10 +00:00
|
|
|
interface(`term_setattr_all_ttys',`
|
2005-06-16 21:06:29 +00:00
|
|
|
gen_require(`
|
|
|
|
attribute ttynode;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
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-05-31 19:52:57 +00:00
|
|
|
########################################
|
2005-08-11 17:46:39 +00:00
|
|
|
## <summary>
|
2010-02-11 19:20:10 +00:00
|
|
|
## Relabel from and to all tty device nodes.
|
2005-08-11 17:46:39 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-11-08 22:00:30 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-05-31 19:52:57 +00:00
|
|
|
#
|
2010-02-11 19:20:10 +00:00
|
|
|
interface(`term_relabel_all_ttys',`
|
2005-06-16 21:06:29 +00:00
|
|
|
gen_require(`
|
|
|
|
attribute ttynode;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-13 16:22:32 +00:00
|
|
|
dev_list_all_dev_nodes($1)
|
2011-03-31 13:49:01 +00:00
|
|
|
allow $1 ttynode:chr_file relabel_chr_file_perms;
|
2005-05-31 19:52:57 +00:00
|
|
|
')
|
|
|
|
|
2005-05-19 21:06:06 +00:00
|
|
|
########################################
|
2005-08-11 17:46:39 +00:00
|
|
|
## <summary>
|
2010-02-11 19:20:10 +00:00
|
|
|
## Write to all ttys.
|
2005-08-11 17:46:39 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-11-08 22:00:30 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-05-19 21:06:06 +00:00
|
|
|
#
|
2010-02-11 19:20:10 +00:00
|
|
|
interface(`term_write_all_ttys',`
|
2005-06-16 21:06:29 +00:00
|
|
|
gen_require(`
|
|
|
|
attribute ttynode;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-13 16:22:32 +00:00
|
|
|
dev_list_all_dev_nodes($1)
|
2008-10-20 16:10:42 +00:00
|
|
|
allow $1 ttynode:chr_file write_chr_file_perms;
|
2005-05-19 21:06:06 +00:00
|
|
|
')
|
|
|
|
|
2005-04-28 21:41:09 +00:00
|
|
|
########################################
|
2005-08-11 17:46:39 +00:00
|
|
|
## <summary>
|
2010-02-11 19:20:10 +00:00
|
|
|
## Read and write all ttys.
|
2005-08-11 17:46:39 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-11-08 22:00:30 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </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
|
|
|
#
|
2010-02-11 19:20:10 +00:00
|
|
|
interface(`term_use_all_ttys',`
|
2005-06-16 21:06:29 +00:00
|
|
|
gen_require(`
|
|
|
|
attribute ttynode;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-13 16:22:32 +00:00
|
|
|
dev_list_all_dev_nodes($1)
|
2008-10-20 16:10:42 +00:00
|
|
|
allow $1 ttynode:chr_file rw_chr_file_perms;
|
2005-04-28 21:41:09 +00:00
|
|
|
')
|
|
|
|
|
2005-05-02 18:42:10 +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
|
2010-02-11 19:20:10 +00:00
|
|
|
## any ttys.
|
2005-08-11 17:46:39 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2010-08-05 12:57:11 +00:00
|
|
|
## Domain to not audit.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-05-02 18:42:10 +00:00
|
|
|
#
|
2010-02-11 19:20:10 +00:00
|
|
|
interface(`term_dontaudit_use_all_ttys',`
|
2005-06-16 21:06:29 +00:00
|
|
|
gen_require(`
|
|
|
|
attribute ttynode;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2008-10-20 16:10:42 +00:00
|
|
|
dontaudit $1 ttynode:chr_file rw_chr_file_perms;
|
2005-05-02 18:42:10 +00:00
|
|
|
')
|
2010-02-11 19:20:10 +00:00
|
|
|
|
2013-09-24 13:39:56 +00:00
|
|
|
#####################################
|
|
|
|
## <summary>
|
|
|
|
## Read from and write virtio console.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`term_use_virtio_console',`
|
|
|
|
gen_require(`
|
|
|
|
type virtio_device_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
dev_list_all_dev_nodes($1)
|
|
|
|
allow $1 virtio_device_t:chr_file rw_term_perms;
|
|
|
|
')
|