2005-06-13 19:22:00 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Basic filesystem types and interfaces.
|
2005-06-13 19:22:00 +00:00
|
|
|
## </summary>
|
2005-06-23 16:00:05 +00:00
|
|
|
## <desc>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <p>
|
|
|
|
## This module contains basic filesystem types and interfaces. This
|
|
|
|
## includes:
|
|
|
|
## <ul>
|
|
|
|
## <li>The concept of different file types including basic
|
|
|
|
## files, mount points, tmp files, etc.</li>
|
|
|
|
## <li>Access to groups of files and all files.</li>
|
|
|
|
## <li>Types and interfaces for the basic filesystem layout
|
|
|
|
## (/, /etc, /tmp, /usr, etc.).</li>
|
|
|
|
## </ul>
|
|
|
|
## </p>
|
2005-06-23 16:00:05 +00:00
|
|
|
## </desc>
|
2005-07-05 17:47:15 +00:00
|
|
|
## <required val="true">
|
|
|
|
## Contains the concept of a file.
|
|
|
|
## Comains the file initial SID.
|
|
|
|
## </required>
|
2005-04-20 19:07:16 +00:00
|
|
|
|
2005-04-14 20:18:17 +00:00
|
|
|
########################################
|
2005-10-14 17:55:40 +00:00
|
|
|
## <summary>
|
|
|
|
## Make the specified type usable for files
|
|
|
|
## in a filesystem.
|
|
|
|
## </summary>
|
|
|
|
## <param name="type">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-10-14 17:55:40 +00:00
|
|
|
## Type to be used for files.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-10-14 17:55:40 +00:00
|
|
|
## </param>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-06-29 14:26:41 +00:00
|
|
|
interface(`files_type',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
2008-07-31 14:05:46 +00:00
|
|
|
attribute file_type, non_security_file_type;
|
2005-06-22 16:07:14 +00:00
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2008-07-31 14:05:46 +00:00
|
|
|
typeattribute $1 file_type, non_security_file_type;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2005-05-12 20:50:09 +00:00
|
|
|
########################################
|
2006-05-10 18:09:08 +00:00
|
|
|
## <summary>
|
|
|
|
## Make the specified type usable for
|
|
|
|
## lock files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="type">
|
|
|
|
## <summary>
|
|
|
|
## Type to be used for lock files.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2005-05-12 20:50:09 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`files_lock_file',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
attribute lockfile;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-29 14:26:41 +00:00
|
|
|
files_type($1)
|
2005-06-03 12:25:14 +00:00
|
|
|
typeattribute $1 lockfile;
|
2005-05-12 20:50:09 +00:00
|
|
|
')
|
|
|
|
|
2005-05-11 19:21:40 +00:00
|
|
|
########################################
|
2006-05-10 18:09:08 +00:00
|
|
|
## <summary>
|
|
|
|
## Make the specified type usable for
|
|
|
|
## filesystem mount points.
|
|
|
|
## </summary>
|
|
|
|
## <param name="type">
|
|
|
|
## <summary>
|
|
|
|
## Type to be used for mount points.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2005-05-11 19:21:40 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`files_mountpoint',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
attribute mountpoint;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-29 14:26:41 +00:00
|
|
|
files_type($1)
|
2005-06-03 12:25:14 +00:00
|
|
|
typeattribute $1 mountpoint;
|
2005-05-11 19:21:40 +00:00
|
|
|
')
|
|
|
|
|
2005-04-28 21:41:09 +00:00
|
|
|
########################################
|
2006-05-10 18:09:08 +00:00
|
|
|
## <summary>
|
|
|
|
## Make the specified type usable for
|
|
|
|
## runtime process ID files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="type">
|
|
|
|
## <summary>
|
|
|
|
## Type to be used for PID files.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2005-04-28 21:41:09 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`files_pid_file',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
attribute pidfile;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-29 14:26:41 +00:00
|
|
|
files_type($1)
|
2005-06-03 12:25:14 +00:00
|
|
|
typeattribute $1 pidfile;
|
2005-04-28 21:41:09 +00:00
|
|
|
')
|
|
|
|
|
2005-10-24 18:40:24 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Make the specified type a
|
|
|
|
## configuration file.
|
|
|
|
## </summary>
|
|
|
|
## <param name="file_type">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-10-24 18:40:24 +00:00
|
|
|
## Type to be used as a configuration file.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-10-24 18:40:24 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_config_file',`
|
|
|
|
files_type($1)
|
|
|
|
')
|
|
|
|
|
2005-09-19 21:17:45 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Make the specified type a
|
|
|
|
## polyinstantiated directory.
|
|
|
|
## </summary>
|
|
|
|
## <param name="file_type">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-09-19 21:17:45 +00:00
|
|
|
## Type of the file to be used as a
|
|
|
|
## polyinstantiated directory.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-09-19 21:17:45 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_poly',`
|
|
|
|
gen_require(`
|
|
|
|
attribute polydir;
|
|
|
|
')
|
|
|
|
|
|
|
|
files_type($1)
|
|
|
|
typeattribute $1 polydir;
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Make the specified type a parent
|
|
|
|
## of a polyinstantiated directory.
|
|
|
|
## </summary>
|
|
|
|
## <param name="file_type">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-09-19 21:17:45 +00:00
|
|
|
## Type of the file to be used as a
|
|
|
|
## parent directory.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-09-19 21:17:45 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_poly_parent',`
|
|
|
|
gen_require(`
|
|
|
|
attribute polyparent;
|
|
|
|
')
|
|
|
|
|
|
|
|
files_type($1)
|
|
|
|
typeattribute $1 polyparent;
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Make the specified type a
|
|
|
|
## polyinstantiation member directory.
|
|
|
|
## </summary>
|
|
|
|
## <param name="file_type">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-09-19 21:17:45 +00:00
|
|
|
## Type of the file to be used as a
|
|
|
|
## member directory.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-09-19 21:17:45 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_poly_member',`
|
|
|
|
gen_require(`
|
|
|
|
attribute polymember;
|
|
|
|
')
|
|
|
|
|
|
|
|
files_type($1)
|
|
|
|
typeattribute $1 polymember;
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Make the domain use the specified
|
|
|
|
## type of polyinstantiated directory.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-09-19 21:17:45 +00:00
|
|
|
## Domain using the polyinstantiated
|
|
|
|
## directory.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-09-19 21:17:45 +00:00
|
|
|
## </param>
|
|
|
|
## <param name="file_type">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-09-19 21:17:45 +00:00
|
|
|
## Type of the file to be used as a
|
|
|
|
## member directory.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-09-19 21:17:45 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_poly_member_tmp',`
|
|
|
|
gen_require(`
|
|
|
|
type tmp_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
type_member $1 tmp_t:dir $2;
|
|
|
|
')
|
|
|
|
|
2005-09-28 19:07:22 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Make the specified type a file that
|
|
|
|
## should not be dontaudited from
|
|
|
|
## browsing from user domains.
|
|
|
|
## </summary>
|
|
|
|
## <param name="file_type">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-09-28 19:07:22 +00:00
|
|
|
## Type of the file to be used as a
|
|
|
|
## member directory.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-09-28 19:07:22 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_security_file',`
|
|
|
|
gen_require(`
|
2008-07-31 14:05:46 +00:00
|
|
|
attribute file_type, security_file_type;
|
2005-09-28 19:07:22 +00:00
|
|
|
')
|
|
|
|
|
2008-07-31 14:05:46 +00:00
|
|
|
typeattribute $1 file_type, security_file_type;
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Make the specified type usable for
|
|
|
|
## security file filesystem mount points.
|
|
|
|
## </summary>
|
|
|
|
## <param name="type">
|
|
|
|
## <summary>
|
|
|
|
## Type to be used for mount points.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_security_mountpoint',`
|
|
|
|
gen_require(`
|
|
|
|
attribute mountpoint;
|
|
|
|
')
|
|
|
|
|
|
|
|
files_security_file($1)
|
|
|
|
typeattribute $1 mountpoint;
|
2005-09-28 19:07:22 +00:00
|
|
|
')
|
|
|
|
|
2005-05-11 19:36:36 +00:00
|
|
|
########################################
|
2005-09-16 19:36:10 +00:00
|
|
|
## <summary>
|
|
|
|
## Make the specified type a file
|
|
|
|
## used for temporary files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="file_type">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-09-16 19:36:10 +00:00
|
|
|
## Type of the file to be used as a
|
|
|
|
## temporary file.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-09-16 19:36:10 +00:00
|
|
|
## </param>
|
2005-09-19 21:17:45 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`files_tmp_file',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
attribute tmpfile;
|
2005-09-19 21:17:45 +00:00
|
|
|
type tmp_t;
|
2005-06-22 16:07:14 +00:00
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-29 14:26:41 +00:00
|
|
|
files_type($1)
|
2005-09-19 21:17:45 +00:00
|
|
|
files_poly_member($1)
|
2005-06-03 12:25:14 +00:00
|
|
|
typeattribute $1 tmpfile;
|
2005-05-11 19:36:36 +00:00
|
|
|
')
|
|
|
|
|
2005-05-23 15:49:31 +00:00
|
|
|
########################################
|
2005-07-08 20:44:57 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Transform the type into a file, for use on a
|
|
|
|
## virtual memory filesystem (tmpfs).
|
2005-07-08 20:44:57 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="type">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## The type to be transformed.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-05-23 15:49:31 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`files_tmpfs_file',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
attribute tmpfsfile;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-29 14:26:41 +00:00
|
|
|
files_type($1)
|
2005-06-03 12:25:14 +00:00
|
|
|
typeattribute $1 tmpfsfile;
|
2005-05-23 15:49:31 +00:00
|
|
|
')
|
|
|
|
|
2005-04-14 20:18:17 +00:00
|
|
|
########################################
|
2005-07-15 15:17:57 +00:00
|
|
|
## <summary>
|
|
|
|
## Get the attributes of all directories.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-07-15 15:17:57 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-07-15 15:17:57 +00:00
|
|
|
## </param>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-07-15 15:17:57 +00:00
|
|
|
interface(`files_getattr_all_dirs',`
|
|
|
|
gen_require(`
|
|
|
|
attribute file_type;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
getattr_dirs_pattern($1, file_type, file_type)
|
2005-07-15 15:17:57 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Do not audit attempts to get the attributes
|
|
|
|
## of all directories.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-07-15 15:17:57 +00:00
|
|
|
## Domain to not audit.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-07-15 15:17:57 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_dontaudit_getattr_all_dirs',`
|
|
|
|
gen_require(`
|
|
|
|
attribute file_type;
|
|
|
|
')
|
|
|
|
|
|
|
|
dontaudit $1 file_type:dir getattr;
|
|
|
|
')
|
2005-05-25 20:58:21 +00:00
|
|
|
|
2006-01-04 19:31:53 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## List all non-security directories.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-01-04 19:31:53 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2006-01-04 19:31:53 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_list_non_security',`
|
|
|
|
gen_require(`
|
2008-07-31 14:05:46 +00:00
|
|
|
attribute non_security_file_type;
|
2006-01-04 19:31:53 +00:00
|
|
|
')
|
|
|
|
|
2008-07-31 14:05:46 +00:00
|
|
|
list_dirs_pattern($1, non_security_file_type, non_security_file_type)
|
2006-01-04 19:31:53 +00:00
|
|
|
')
|
|
|
|
|
2005-09-28 19:07:22 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Do not audit attempts to list all
|
2006-01-04 19:31:53 +00:00
|
|
|
## non-security directories.
|
2005-09-28 19:07:22 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-09-28 19:07:22 +00:00
|
|
|
## Domain to not audit.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-09-28 19:07:22 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_dontaudit_list_non_security',`
|
|
|
|
gen_require(`
|
2008-07-31 14:05:46 +00:00
|
|
|
attribute non_security_file_type;
|
2005-09-28 19:07:22 +00:00
|
|
|
')
|
|
|
|
|
2008-07-31 14:05:46 +00:00
|
|
|
dontaudit $1 non_security_file_type:dir list_dir_perms;
|
2005-09-28 19:07:22 +00:00
|
|
|
')
|
|
|
|
|
2006-06-21 18:25:06 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Mount a filesystem on all non-security
|
|
|
|
## directories and files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_mounton_non_security',`
|
|
|
|
gen_require(`
|
2008-07-31 14:05:46 +00:00
|
|
|
attribute non_security_file_type;
|
2006-06-21 18:25:06 +00:00
|
|
|
')
|
|
|
|
|
2008-07-31 14:05:46 +00:00
|
|
|
allow $1 non_security_file_type:dir mounton;
|
|
|
|
allow $1 non_security_file_type:file mounton;
|
2006-06-21 18:25:06 +00:00
|
|
|
')
|
|
|
|
|
2006-04-10 21:04:51 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Allow attempts to modify any directory
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain to allow
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_write_non_security_dirs',`
|
|
|
|
gen_require(`
|
2008-07-31 14:05:46 +00:00
|
|
|
attribute non_security_file_type;
|
|
|
|
')
|
|
|
|
|
|
|
|
allow $1 non_security_file_type:dir write;
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Allow attempts to manage non-security directories
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain to allow
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_manage_non_security_dirs',`
|
|
|
|
gen_require(`
|
|
|
|
attribute non_security_file_type;
|
2006-04-10 21:04:51 +00:00
|
|
|
')
|
|
|
|
|
2008-07-31 14:05:46 +00:00
|
|
|
allow $1 non_security_file_type:dir manage_dir_perms;
|
2006-04-10 21:04:51 +00:00
|
|
|
')
|
|
|
|
|
2005-08-11 14:49:58 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Get the attributes of all files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-08-11 14:49:58 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-08-11 14:49:58 +00:00
|
|
|
## </param>
|
2005-07-15 15:17:57 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`files_getattr_all_files',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
attribute file_type;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
getattr_files_pattern($1, file_type, file_type)
|
|
|
|
getattr_lnk_files_pattern($1, file_type, file_type)
|
2005-07-15 15:17:57 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Do not audit attempts to get the attributes
|
|
|
|
## of all files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-07-15 15:17:57 +00:00
|
|
|
## Domain to not audit.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-07-15 15:17:57 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_dontaudit_getattr_all_files',`
|
|
|
|
gen_require(`
|
|
|
|
attribute file_type;
|
|
|
|
')
|
|
|
|
|
|
|
|
dontaudit $1 file_type:file getattr;
|
|
|
|
')
|
|
|
|
|
2005-09-28 19:07:22 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Do not audit attempts to get the attributes
|
|
|
|
## of non security files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-09-28 19:07:22 +00:00
|
|
|
## Domain to not audit.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-09-28 19:07:22 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_dontaudit_getattr_non_security_files',`
|
|
|
|
gen_require(`
|
2008-07-31 14:05:46 +00:00
|
|
|
attribute non_security_file_type;
|
2005-09-28 19:07:22 +00:00
|
|
|
')
|
|
|
|
|
2008-07-31 14:05:46 +00:00
|
|
|
dontaudit $1 non_security_file_type:file getattr;
|
2005-09-28 19:07:22 +00:00
|
|
|
')
|
|
|
|
|
2005-08-11 14:49:58 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read all files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-08-11 14:49:58 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-08-11 14:49:58 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_read_all_files',`
|
|
|
|
gen_require(`
|
|
|
|
attribute file_type;
|
|
|
|
')
|
|
|
|
|
2006-04-24 18:00:32 +00:00
|
|
|
allow $1 file_type:dir list_dir_perms;
|
2008-07-23 21:38:39 +00:00
|
|
|
read_files_pattern($1, file_type, file_type)
|
2005-08-11 14:49:58 +00:00
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-08-11 14:49:58 +00:00
|
|
|
auth_read_shadow($1)
|
|
|
|
')
|
|
|
|
')
|
|
|
|
|
2006-06-06 17:51:24 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Allow shared library text relocations in all files.
|
|
|
|
## </summary>
|
|
|
|
## <desc>
|
|
|
|
## <p>
|
|
|
|
## Allow shared library text relocations in all files.
|
|
|
|
## </p>
|
|
|
|
## <p>
|
2007-10-02 16:04:50 +00:00
|
|
|
## This is added to support WINE policy.
|
2006-06-06 17:51:24 +00:00
|
|
|
## </p>
|
|
|
|
## </desc>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_execmod_all_files',`
|
2007-10-02 16:04:50 +00:00
|
|
|
gen_require(`
|
|
|
|
attribute file_type;
|
2006-06-06 17:51:24 +00:00
|
|
|
')
|
2007-10-02 16:04:50 +00:00
|
|
|
|
|
|
|
allow $1 file_type:file execmod;
|
2006-06-06 17:51:24 +00:00
|
|
|
')
|
|
|
|
|
2006-01-04 19:31:53 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read all non-security files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-01-04 19:31:53 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2006-01-04 19:31:53 +00:00
|
|
|
## </param>
|
2006-09-06 22:07:25 +00:00
|
|
|
## <rolecap/>
|
2006-01-04 19:31:53 +00:00
|
|
|
#
|
|
|
|
interface(`files_read_non_security_files',`
|
|
|
|
gen_require(`
|
2008-07-31 14:05:46 +00:00
|
|
|
attribute non_security_file_type;
|
2006-01-04 19:31:53 +00:00
|
|
|
')
|
|
|
|
|
2008-07-31 14:05:46 +00:00
|
|
|
read_files_pattern($1, non_security_file_type, non_security_file_type)
|
|
|
|
read_lnk_files_pattern($1, non_security_file_type, non_security_file_type)
|
2006-01-04 19:31:53 +00:00
|
|
|
')
|
|
|
|
|
2005-10-24 01:53:13 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read all directories on the filesystem, except
|
|
|
|
## the listed exceptions.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-10-24 01:53:13 +00:00
|
|
|
## The type of the domain perfoming this action.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-10-24 01:53:13 +00:00
|
|
|
## </param>
|
|
|
|
## <param name="exception_types" optional="true">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-10-24 01:53:13 +00:00
|
|
|
## The types to be excluded. Each type or attribute
|
|
|
|
## must be negated by the caller.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-10-24 01:53:13 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_read_all_dirs_except',`
|
|
|
|
gen_require(`
|
|
|
|
attribute file_type;
|
|
|
|
')
|
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
allow $1 { file_type $2 }:dir list_dir_perms;
|
2005-10-24 01:53:13 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read all files on the filesystem, except
|
|
|
|
## the listed exceptions.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-10-24 01:53:13 +00:00
|
|
|
## The type of the domain perfoming this action.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-10-24 01:53:13 +00:00
|
|
|
## </param>
|
|
|
|
## <param name="exception_types" optional="true">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-10-24 01:53:13 +00:00
|
|
|
## The types to be excluded. Each type or attribute
|
|
|
|
## must be negated by the caller.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-10-24 01:53:13 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_read_all_files_except',`
|
|
|
|
gen_require(`
|
|
|
|
attribute file_type;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
read_files_pattern($1, { file_type $2 }, { file_type $2 })
|
2005-10-24 01:53:13 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
2006-01-04 19:31:53 +00:00
|
|
|
## Read all symbolic links on the filesystem, except
|
2005-10-24 01:53:13 +00:00
|
|
|
## the listed exceptions.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-10-24 01:53:13 +00:00
|
|
|
## The type of the domain perfoming this action.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-10-24 01:53:13 +00:00
|
|
|
## </param>
|
|
|
|
## <param name="exception_types" optional="true">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-10-24 01:53:13 +00:00
|
|
|
## The types to be excluded. Each type or attribute
|
|
|
|
## must be negated by the caller.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-10-24 01:53:13 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_read_all_symlinks_except',`
|
|
|
|
gen_require(`
|
|
|
|
attribute file_type;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
read_lnk_files_pattern($1, { file_type $2 }, { file_type $2 })
|
2005-10-24 01:53:13 +00:00
|
|
|
')
|
|
|
|
|
2005-07-15 15:17:57 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Get the attributes of all symbolic links.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-07-15 15:17:57 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-07-15 15:17:57 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_getattr_all_symlinks',`
|
|
|
|
gen_require(`
|
|
|
|
attribute file_type;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
getattr_lnk_files_pattern($1, file_type, file_type)
|
2005-07-15 15:17:57 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Do not audit attempts to get the attributes
|
|
|
|
## of all symbolic links.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-07-15 15:17:57 +00:00
|
|
|
## Domain to not audit.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-07-15 15:17:57 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_dontaudit_getattr_all_symlinks',`
|
|
|
|
gen_require(`
|
|
|
|
attribute file_type;
|
|
|
|
')
|
|
|
|
|
|
|
|
dontaudit $1 file_type:lnk_file getattr;
|
|
|
|
')
|
|
|
|
|
2006-12-04 20:10:56 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Do not audit attempts to read all symbolic links.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain to not audit.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_dontaudit_read_all_symlinks',`
|
|
|
|
gen_require(`
|
|
|
|
attribute file_type;
|
|
|
|
')
|
|
|
|
|
|
|
|
dontaudit $1 file_type:lnk_file read;
|
|
|
|
')
|
|
|
|
|
2005-09-28 19:07:22 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Do not audit attempts to get the attributes
|
|
|
|
## of non security symbolic links.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-09-28 19:07:22 +00:00
|
|
|
## Domain to not audit.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-09-28 19:07:22 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_dontaudit_getattr_non_security_symlinks',`
|
|
|
|
gen_require(`
|
2008-07-31 14:05:46 +00:00
|
|
|
attribute non_security_file_type;
|
2005-09-28 19:07:22 +00:00
|
|
|
')
|
|
|
|
|
2008-07-31 14:05:46 +00:00
|
|
|
dontaudit $1 non_security_file_type:lnk_file getattr;
|
2005-09-28 19:07:22 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Do not audit attempts to get the attributes
|
|
|
|
## of non security block devices.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-09-28 19:07:22 +00:00
|
|
|
## Domain to not audit.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-09-28 19:07:22 +00:00
|
|
|
## </param>
|
|
|
|
#
|
2006-01-31 19:21:01 +00:00
|
|
|
interface(`files_dontaudit_getattr_non_security_blk_files',`
|
2005-09-28 19:07:22 +00:00
|
|
|
gen_require(`
|
2008-07-31 14:05:46 +00:00
|
|
|
attribute non_security_file_type;
|
2005-09-28 19:07:22 +00:00
|
|
|
')
|
|
|
|
|
2008-07-31 14:05:46 +00:00
|
|
|
dontaudit $1 non_security_file_type:blk_file getattr;
|
2005-09-28 19:07:22 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Do not audit attempts to get the attributes
|
|
|
|
## of non security character devices.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-09-28 19:07:22 +00:00
|
|
|
## Domain to not audit.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-09-28 19:07:22 +00:00
|
|
|
## </param>
|
|
|
|
#
|
2006-01-31 19:21:01 +00:00
|
|
|
interface(`files_dontaudit_getattr_non_security_chr_files',`
|
2005-09-28 19:07:22 +00:00
|
|
|
gen_require(`
|
2008-07-31 14:05:46 +00:00
|
|
|
attribute non_security_file_type;
|
2005-09-28 19:07:22 +00:00
|
|
|
')
|
|
|
|
|
2008-07-31 14:05:46 +00:00
|
|
|
dontaudit $1 non_security_file_type:chr_file getattr;
|
2005-09-28 19:07:22 +00:00
|
|
|
')
|
|
|
|
|
2005-08-11 14:49:58 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read all symbolic links.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-08-11 14:49:58 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-08-11 14:49:58 +00:00
|
|
|
## </param>
|
2006-09-06 22:07:25 +00:00
|
|
|
## <rolecap/>
|
2005-08-11 14:49:58 +00:00
|
|
|
#
|
|
|
|
interface(`files_read_all_symlinks',`
|
|
|
|
gen_require(`
|
|
|
|
attribute file_type;
|
|
|
|
')
|
|
|
|
|
2006-04-24 18:00:32 +00:00
|
|
|
allow $1 file_type:dir list_dir_perms;
|
2008-07-23 21:38:39 +00:00
|
|
|
read_lnk_files_pattern($1, file_type, file_type)
|
2005-08-11 14:49:58 +00:00
|
|
|
')
|
|
|
|
|
2005-07-15 15:17:57 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Get the attributes of all named pipes.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-07-15 15:17:57 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-07-15 15:17:57 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_getattr_all_pipes',`
|
|
|
|
gen_require(`
|
|
|
|
attribute file_type;
|
|
|
|
')
|
|
|
|
|
2006-04-24 18:00:32 +00:00
|
|
|
allow $1 file_type:dir list_dir_perms;
|
2008-07-23 21:38:39 +00:00
|
|
|
getattr_fifo_files_pattern($1, file_type, file_type)
|
2005-07-15 15:17:57 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Do not audit attempts to get the attributes
|
|
|
|
## of all named pipes.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-07-15 15:17:57 +00:00
|
|
|
## Domain to not audit.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-07-15 15:17:57 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_dontaudit_getattr_all_pipes',`
|
|
|
|
gen_require(`
|
|
|
|
attribute file_type;
|
|
|
|
')
|
|
|
|
|
|
|
|
dontaudit $1 file_type:fifo_file getattr;
|
|
|
|
')
|
|
|
|
|
2005-09-28 19:07:22 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Do not audit attempts to get the attributes
|
|
|
|
## of non security named pipes.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-09-28 19:07:22 +00:00
|
|
|
## Domain to not audit.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-09-28 19:07:22 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_dontaudit_getattr_non_security_pipes',`
|
|
|
|
gen_require(`
|
2008-07-31 14:05:46 +00:00
|
|
|
attribute non_security_file_type;
|
2005-09-28 19:07:22 +00:00
|
|
|
')
|
|
|
|
|
2008-07-31 14:05:46 +00:00
|
|
|
dontaudit $1 non_security_file_type:fifo_file getattr;
|
2005-09-28 19:07:22 +00:00
|
|
|
')
|
|
|
|
|
2005-07-15 15:17:57 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Get the attributes of all named sockets.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-07-15 15:17:57 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-07-15 15:17:57 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_getattr_all_sockets',`
|
|
|
|
gen_require(`
|
|
|
|
attribute file_type;
|
|
|
|
')
|
|
|
|
|
2006-04-24 18:00:32 +00:00
|
|
|
allow $1 file_type:dir list_dir_perms;
|
2008-07-23 21:38:39 +00:00
|
|
|
getattr_sock_files_pattern($1, file_type, file_type)
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2005-07-15 15:17:57 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Do not audit attempts to get the attributes
|
|
|
|
## of all named sockets.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-07-15 15:17:57 +00:00
|
|
|
## Domain to not audit.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-07-15 15:17:57 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_dontaudit_getattr_all_sockets',`
|
|
|
|
gen_require(`
|
|
|
|
attribute file_type;
|
|
|
|
')
|
|
|
|
|
|
|
|
dontaudit $1 file_type:sock_file getattr;
|
|
|
|
')
|
|
|
|
|
2005-09-28 19:07:22 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Do not audit attempts to get the attributes
|
|
|
|
## of non security named sockets.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-09-28 19:07:22 +00:00
|
|
|
## Domain to not audit.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-09-28 19:07:22 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_dontaudit_getattr_non_security_sockets',`
|
|
|
|
gen_require(`
|
2008-07-31 14:05:46 +00:00
|
|
|
attribute non_security_file_type;
|
2005-09-28 19:07:22 +00:00
|
|
|
')
|
|
|
|
|
2008-07-31 14:05:46 +00:00
|
|
|
dontaudit $1 non_security_file_type:sock_file getattr;
|
2005-09-28 19:07:22 +00:00
|
|
|
')
|
|
|
|
|
2005-10-22 19:58:58 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read all block nodes with file types.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-10-22 19:58:58 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-10-22 19:58:58 +00:00
|
|
|
## </param>
|
|
|
|
#
|
2006-01-31 19:21:01 +00:00
|
|
|
interface(`files_read_all_blk_files',`
|
2005-10-22 19:58:58 +00:00
|
|
|
gen_require(`
|
|
|
|
attribute file_type;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
read_blk_files_pattern($1, file_type, file_type)
|
2005-10-22 19:58:58 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read all character nodes with file types.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-10-22 19:58:58 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-10-22 19:58:58 +00:00
|
|
|
## </param>
|
|
|
|
#
|
2006-01-31 19:21:01 +00:00
|
|
|
interface(`files_read_all_chr_files',`
|
2005-10-22 19:58:58 +00:00
|
|
|
gen_require(`
|
|
|
|
attribute file_type;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
read_chr_files_pattern($1, file_type, file_type)
|
2005-10-22 19:58:58 +00:00
|
|
|
')
|
|
|
|
|
2005-04-28 18:59:01 +00:00
|
|
|
########################################
|
2005-07-08 20:44:57 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Relabel all files on the filesystem, except
|
|
|
|
## the listed exceptions.
|
2005-07-08 20:44:57 +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 domain perfoming this action.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
|
|
|
## <param name="exception_types" optional="true">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## The types to be excluded. Each type or attribute
|
|
|
|
## must be negated by the caller.
|
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
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`files_relabel_all_files',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
attribute file_type;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
allow $1 { file_type $2 }:dir list_dir_perms;
|
2008-07-23 21:38:39 +00:00
|
|
|
relabel_dirs_pattern($1, { file_type $2 }, { file_type $2 })
|
|
|
|
relabel_files_pattern($1, { file_type $2 }, { file_type $2 })
|
|
|
|
relabel_lnk_files_pattern($1, { file_type $2 }, { file_type $2 })
|
|
|
|
relabel_fifo_files_pattern($1, { file_type $2 }, { file_type $2 })
|
|
|
|
relabel_sock_files_pattern($1, { file_type $2 }, { file_type $2 })
|
|
|
|
relabelfrom_blk_files_pattern($1, { file_type $2 }, { file_type $2 })
|
|
|
|
relabelfrom_chr_files_pattern($1, { file_type $2 }, { file_type $2 })
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
# satisfy the assertions:
|
2006-02-02 21:08:12 +00:00
|
|
|
seutil_relabelto_bin_policy($1)
|
2005-05-25 20:58:21 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-07-08 20:44:57 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Manage all files on the filesystem, except
|
|
|
|
## the listed exceptions.
|
2005-07-08 20:44:57 +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 domain perfoming this action.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
|
|
|
## <param name="exception_types" optional="true">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## The types to be excluded. Each type or attribute
|
|
|
|
## must be negated by the caller.
|
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-25 20:58:21 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`files_manage_all_files',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
attribute file_type;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
manage_dirs_pattern($1, { file_type $2 }, { file_type $2 })
|
|
|
|
manage_files_pattern($1, { file_type $2 }, { file_type $2 })
|
|
|
|
manage_lnk_files_pattern($1, { file_type $2 }, { file_type $2 })
|
|
|
|
manage_fifo_files_pattern($1, { file_type $2 }, { file_type $2 })
|
|
|
|
manage_sock_files_pattern($1, { file_type $2 }, { file_type $2 })
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
# satisfy the assertions:
|
2006-02-02 21:08:12 +00:00
|
|
|
seutil_create_bin_policy($1)
|
2006-03-02 23:41:11 +00:00
|
|
|
files_manage_kernel_modules($1)
|
2005-05-25 20:58:21 +00:00
|
|
|
')
|
|
|
|
|
2005-04-14 20:18:17 +00:00
|
|
|
########################################
|
2006-05-10 18:09:08 +00:00
|
|
|
## <summary>
|
|
|
|
## Search the contents of all directories on
|
|
|
|
## extended attribute filesystems.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2005-04-26 21:12:32 +00:00
|
|
|
#
|
2006-01-31 19:21:01 +00:00
|
|
|
interface(`files_search_all',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
attribute file_type;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
allow $1 file_type:dir search_dir_perms;
|
2005-04-26 21:12:32 +00:00
|
|
|
')
|
|
|
|
|
2005-05-11 19:05:15 +00:00
|
|
|
########################################
|
2006-05-10 18:09:08 +00:00
|
|
|
## <summary>
|
|
|
|
## List the contents of all directories on
|
|
|
|
## extended attribute filesystems.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2005-05-11 19:05:15 +00:00
|
|
|
#
|
2006-01-31 19:21:01 +00:00
|
|
|
interface(`files_list_all',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
attribute file_type;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
allow $1 file_type:dir list_dir_perms;
|
2005-05-11 19:05:15 +00:00
|
|
|
')
|
|
|
|
|
2005-05-02 18:40:42 +00:00
|
|
|
########################################
|
2006-05-10 18:09:08 +00:00
|
|
|
## <summary>
|
|
|
|
## Do not audit attempts to search the
|
|
|
|
## contents of any directories on extended
|
|
|
|
## attribute filesystems.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2005-05-02 18:40:42 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`files_dontaudit_search_all_dirs',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
attribute file_type;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2007-06-20 19:47:10 +00:00
|
|
|
dontaudit $1 file_type:dir search_dir_perms;
|
2005-05-02 18:40:42 +00:00
|
|
|
')
|
|
|
|
|
2007-02-16 23:01:42 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Get the attributes of all filesystems
|
|
|
|
## with the type of a file.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
# dwalsh: This interface is to allow quotacheck to work on a
|
|
|
|
# a filesystem mounted with the --context switch
|
|
|
|
# https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=212957
|
|
|
|
#
|
|
|
|
interface(`files_getattr_all_file_type_fs',`
|
|
|
|
gen_require(`
|
|
|
|
attribute file_type;
|
|
|
|
')
|
|
|
|
|
|
|
|
allow $1 file_type:filesystem getattr;
|
|
|
|
')
|
|
|
|
|
2006-05-10 18:09:08 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Relabel a filesystem to the type of a file.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2005-05-24 15:55:57 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`files_relabelto_all_file_type_fs',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
attribute file_type;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
allow $1 file_type:filesystem relabelto;
|
2005-05-24 15:55:57 +00:00
|
|
|
')
|
|
|
|
|
2006-05-10 18:09:08 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Mount all filesystems with the type of a file.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2005-05-24 15:55:57 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`files_mount_all_file_type_fs',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
attribute file_type;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
allow $1 file_type:filesystem mount;
|
2005-05-24 15:55:57 +00:00
|
|
|
')
|
|
|
|
|
2006-05-10 18:09:08 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Unmount all filesystems with the type of a file.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2005-05-24 15:55:57 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`files_unmount_all_file_type_fs',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
attribute file_type;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-09-05 16:47:19 +00:00
|
|
|
allow $1 file_type:filesystem unmount;
|
2005-05-24 15:55:57 +00:00
|
|
|
')
|
|
|
|
|
2005-04-28 21:41:09 +00:00
|
|
|
########################################
|
2006-05-10 18:09:08 +00:00
|
|
|
## <summary>
|
|
|
|
## Mount a filesystem on all mount points.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2005-04-28 21:41:09 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`files_mounton_all_mountpoints',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
attribute mountpoint;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
allow $1 mountpoint:dir { getattr search mounton };
|
2005-11-25 15:51:50 +00:00
|
|
|
allow $1 mountpoint:file { getattr mounton };
|
2005-04-28 21:41:09 +00:00
|
|
|
')
|
|
|
|
|
2006-04-17 17:32:54 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Get the attributes of all mount points.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_getattr_all_mountpoints',`
|
|
|
|
gen_require(`
|
|
|
|
attribute mountpoint;
|
|
|
|
')
|
|
|
|
|
|
|
|
allow $1 mountpoint:dir getattr;
|
|
|
|
')
|
|
|
|
|
2007-10-29 18:35:32 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Search all mount points.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_search_all_mountpoints',`
|
|
|
|
gen_require(`
|
|
|
|
attribute mountpoint;
|
|
|
|
')
|
|
|
|
|
|
|
|
allow $1 mountpoint:dir search_dir_perms;
|
|
|
|
')
|
|
|
|
|
2005-04-28 18:59:01 +00:00
|
|
|
########################################
|
2006-05-10 18:09:08 +00:00
|
|
|
## <summary>
|
|
|
|
## List the contents of the root directory.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`files_list_root',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
type root_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
allow $1 root_t:dir list_dir_perms;
|
2007-10-09 17:29:48 +00:00
|
|
|
allow $1 root_t:lnk_file { read_lnk_file_perms ioctl lock };
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2007-10-29 18:35:32 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Do not audit attempts to write
|
|
|
|
## files in the root directory.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_dontaudit_rw_root_dir',`
|
|
|
|
gen_require(`
|
|
|
|
type root_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
dontaudit $1 root_t:dir rw_dir_perms;
|
|
|
|
')
|
|
|
|
|
2005-04-14 20:18:17 +00:00
|
|
|
########################################
|
2005-07-08 20:44:57 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Create an object in the root directory, with a private
|
2006-05-10 18:09:08 +00:00
|
|
|
## type using a type transition.
|
2005-07-08 20:44:57 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-03-02 23:41:11 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2006-01-13 21:06:49 +00:00
|
|
|
## <param name="private type">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-01-13 21:06:49 +00:00
|
|
|
## The type of the object to be created.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2006-03-02 23:41:11 +00:00
|
|
|
## <param name="object">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-03-02 23:41:11 +00:00
|
|
|
## The object class of the object being created.
|
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-21 18:40:44 +00:00
|
|
|
interface(`files_root_filetrans',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
type root_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
filetrans_pattern($1, root_t, $2, $3)
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2005-05-02 18:40:42 +00:00
|
|
|
########################################
|
2006-05-10 18:09:08 +00:00
|
|
|
## <summary>
|
|
|
|
## Do not audit attempts to read files in
|
|
|
|
## the root directory.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain to not audit.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2005-05-02 18:40:42 +00:00
|
|
|
#
|
2006-01-31 19:21:01 +00:00
|
|
|
interface(`files_dontaudit_read_root_files',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
type root_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-10-21 19:36:49 +00:00
|
|
|
dontaudit $1 root_t:file { getattr read };
|
2005-05-02 18:40:42 +00:00
|
|
|
')
|
|
|
|
|
2005-04-19 18:57:13 +00:00
|
|
|
########################################
|
2006-05-10 18:09:08 +00:00
|
|
|
## <summary>
|
|
|
|
## Do not audit attempts to read or write
|
|
|
|
## files in the root directory.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2005-04-19 18:57:13 +00:00
|
|
|
#
|
2006-01-31 19:21:01 +00:00
|
|
|
interface(`files_dontaudit_rw_root_files',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
type root_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
dontaudit $1 root_t:file { read write };
|
2005-04-19 18:57:13 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2006-05-10 18:09:08 +00:00
|
|
|
## <summary>
|
|
|
|
## Do not audit attempts to read or write
|
|
|
|
## character device nodes in the root directory.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2005-04-19 18:57:13 +00:00
|
|
|
#
|
2006-01-31 19:21:01 +00:00
|
|
|
interface(`files_dontaudit_rw_root_chr_files',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
type root_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
dontaudit $1 root_t:chr_file { read write };
|
2005-04-19 18:57:13 +00:00
|
|
|
')
|
|
|
|
|
2005-04-14 20:18:17 +00:00
|
|
|
########################################
|
2006-05-10 18:09:08 +00:00
|
|
|
## <summary>
|
|
|
|
## Remove entries from the root directory.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`files_delete_root_dir_entry',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
type root_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-09 14:50:48 +00:00
|
|
|
allow $1 root_t:dir rw_dir_perms;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2005-04-28 21:41:09 +00:00
|
|
|
########################################
|
2006-05-10 18:09:08 +00:00
|
|
|
## <summary>
|
|
|
|
## Unmount a rootfs filesystem.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2005-04-28 21:41:09 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`files_unmount_rootfs',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
type root_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
allow $1 root_t:filesystem unmount;
|
2005-04-28 21:41:09 +00:00
|
|
|
')
|
|
|
|
|
2006-03-02 23:41:11 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Get attributes of the /boot directory.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_getattr_boot_dirs',`
|
|
|
|
gen_require(`
|
|
|
|
type boot_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
allow $1 boot_t:dir getattr;
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Do not audit attempts to get attributes
|
|
|
|
## of the /boot directory.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain to not audit.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_dontaudit_getattr_boot_dirs',`
|
|
|
|
gen_require(`
|
|
|
|
type boot_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
dontaudit $1 boot_t:dir getattr;
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Search the /boot directory.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_search_boot',`
|
|
|
|
gen_require(`
|
|
|
|
type boot_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
allow $1 boot_t:dir search_dir_perms;
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Do not audit attempts to search the /boot directory.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_dontaudit_search_boot',`
|
|
|
|
gen_require(`
|
|
|
|
type boot_t;
|
|
|
|
')
|
|
|
|
|
2007-06-20 19:47:10 +00:00
|
|
|
dontaudit $1 boot_t:dir search_dir_perms;
|
2006-03-02 23:41:11 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Create directories in /boot
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_create_boot_dirs',`
|
|
|
|
gen_require(`
|
|
|
|
type boot_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
allow $1 boot_t:dir { create rw_dir_perms };
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Create a private type object in boot
|
|
|
|
## with an automatic type transition
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
## <param name="private_type">
|
|
|
|
## <summary>
|
|
|
|
## The type of the object to be created.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
## <param name="object_class">
|
|
|
|
## <summary>
|
|
|
|
## The object class of the object being created.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_boot_filetrans',`
|
|
|
|
gen_require(`
|
|
|
|
type boot_t;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
filetrans_pattern($1, boot_t, $2, $3)
|
2006-03-02 23:41:11 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Create, read, write, and delete files
|
|
|
|
## in the /boot directory.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2006-09-06 22:07:25 +00:00
|
|
|
## <rolecap/>
|
2006-03-02 23:41:11 +00:00
|
|
|
#
|
|
|
|
interface(`files_manage_boot_files',`
|
|
|
|
gen_require(`
|
|
|
|
type boot_t;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
manage_files_pattern($1, boot_t, boot_t)
|
2006-03-02 23:41:11 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Relabel from files in the /boot directory.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_relabelfrom_boot_files',`
|
|
|
|
gen_require(`
|
|
|
|
type boot_t;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
relabelfrom_files_pattern($1, boot_t, boot_t)
|
2006-03-02 23:41:11 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read and write symbolic links
|
|
|
|
## in the /boot directory.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_rw_boot_symlinks',`
|
|
|
|
gen_require(`
|
|
|
|
type boot_t;
|
|
|
|
')
|
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
allow $1 boot_t:dir list_dir_perms;
|
2008-07-23 21:38:39 +00:00
|
|
|
rw_lnk_files_pattern($1, boot_t, boot_t)
|
2006-03-02 23:41:11 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Create, read, write, and delete symbolic links
|
|
|
|
## in the /boot directory.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_manage_boot_symlinks',`
|
|
|
|
gen_require(`
|
|
|
|
type boot_t;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
manage_lnk_files_pattern($1, boot_t, boot_t)
|
2006-03-02 23:41:11 +00:00
|
|
|
')
|
|
|
|
|
2006-04-26 15:22:33 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read kernel files in the /boot directory.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_read_kernel_img',`
|
2006-12-12 20:08:08 +00:00
|
|
|
gen_require(`
|
|
|
|
type boot_t;
|
|
|
|
')
|
2006-04-26 15:22:33 +00:00
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
allow $1 boot_t:dir list_dir_perms;
|
2008-07-23 21:38:39 +00:00
|
|
|
read_files_pattern($1, boot_t, boot_t)
|
|
|
|
read_lnk_files_pattern($1, boot_t, boot_t)
|
2006-04-26 15:22:33 +00:00
|
|
|
')
|
|
|
|
|
2006-03-02 23:41:11 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Install a kernel into the /boot directory.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2006-09-06 22:07:25 +00:00
|
|
|
## <rolecap/>
|
2006-03-02 23:41:11 +00:00
|
|
|
#
|
|
|
|
interface(`files_create_kernel_img',`
|
|
|
|
gen_require(`
|
|
|
|
type boot_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
allow $1 boot_t:file { getattr read write create };
|
2008-07-23 21:38:39 +00:00
|
|
|
manage_lnk_files_pattern($1, boot_t, boot_t)
|
2006-03-02 23:41:11 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Delete a kernel from /boot.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2006-09-06 22:07:25 +00:00
|
|
|
## <rolecap/>
|
2006-03-02 23:41:11 +00:00
|
|
|
#
|
|
|
|
interface(`files_delete_kernel',`
|
|
|
|
gen_require(`
|
|
|
|
type boot_t;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
delete_files_pattern($1, boot_t, boot_t)
|
2006-03-02 23:41:11 +00:00
|
|
|
')
|
|
|
|
|
2005-12-09 20:08:10 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Getattr of directories with the default file type.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-12-09 20:08:10 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-12-09 20:08:10 +00:00
|
|
|
## </param>
|
|
|
|
#
|
2006-01-31 19:21:01 +00:00
|
|
|
interface(`files_getattr_default_dirs',`
|
2005-12-09 20:08:10 +00:00
|
|
|
gen_require(`
|
|
|
|
type default_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
allow $1 default_t:dir getattr;
|
|
|
|
')
|
|
|
|
|
2005-07-14 18:15:47 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Do not audit attempts to get the attributes of
|
|
|
|
## directories with the default file type.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-07-14 18:15:47 +00:00
|
|
|
## Domain to not audit.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-07-14 18:15:47 +00:00
|
|
|
## </param>
|
|
|
|
#
|
2006-01-31 19:21:01 +00:00
|
|
|
interface(`files_dontaudit_getattr_default_dirs',`
|
2005-07-14 18:15:47 +00:00
|
|
|
gen_require(`
|
|
|
|
type default_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
dontaudit $1 default_t:dir getattr;
|
|
|
|
')
|
|
|
|
|
2005-09-20 17:11:53 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Search the contents of directories with the default file type.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-09-20 17:11:53 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-09-20 17:11:53 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_search_default',`
|
|
|
|
gen_require(`
|
|
|
|
type default_t;
|
|
|
|
')
|
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
allow $1 default_t:dir search_dir_perms;
|
2005-09-20 17:11:53 +00:00
|
|
|
')
|
|
|
|
|
2005-07-08 20:44:57 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## List contents of directories with the default file type.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-07-08 20:44:57 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-07-08 20:44:57 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_list_default',`
|
|
|
|
gen_require(`
|
|
|
|
type default_t;
|
|
|
|
')
|
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
allow $1 default_t:dir list_dir_perms;
|
2005-07-08 20:44:57 +00:00
|
|
|
')
|
|
|
|
|
2005-09-19 21:17:45 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Do not audit attempts to list contents of
|
|
|
|
## directories with the default file type.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-09-19 21:17:45 +00:00
|
|
|
## Domain to not audit.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-09-19 21:17:45 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_dontaudit_list_default',`
|
|
|
|
gen_require(`
|
|
|
|
type default_t;
|
|
|
|
')
|
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
dontaudit $1 default_t:dir list_dir_perms;
|
2005-09-19 21:17:45 +00:00
|
|
|
')
|
|
|
|
|
2005-07-08 20:44:57 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Mount a filesystem on a directory with the default file type.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-07-08 20:44:57 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-07-08 20:44:57 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_mounton_default',`
|
|
|
|
gen_require(`
|
|
|
|
type default_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
allow $1 default_t:dir { getattr search mounton };
|
|
|
|
')
|
|
|
|
|
2005-07-14 18:15:47 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Do not audit attempts to get the attributes of
|
|
|
|
## files with the default file type.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-07-14 18:15:47 +00:00
|
|
|
## Domain to not audit.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-07-14 18:15:47 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_dontaudit_getattr_default_files',`
|
|
|
|
gen_require(`
|
|
|
|
type default_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
dontaudit $1 default_t:file getattr;
|
|
|
|
')
|
|
|
|
|
2005-07-08 20:44:57 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read files with the default file type.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-07-08 20:44:57 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-07-08 20:44:57 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_read_default_files',`
|
|
|
|
gen_require(`
|
|
|
|
type default_t;
|
|
|
|
')
|
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
allow $1 default_t:file read_file_perms;
|
2005-07-08 20:44:57 +00:00
|
|
|
')
|
|
|
|
|
2005-09-19 21:17:45 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Do not audit attempts to read files
|
|
|
|
## with the default file type.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-09-19 21:17:45 +00:00
|
|
|
## Domain to not audit.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-09-19 21:17:45 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_dontaudit_read_default_files',`
|
|
|
|
gen_require(`
|
|
|
|
type default_t;
|
|
|
|
')
|
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
dontaudit $1 default_t:file read_file_perms;
|
2005-09-19 21:17:45 +00:00
|
|
|
')
|
|
|
|
|
2005-07-08 20:44:57 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read symbolic links with the default file type.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-07-08 20:44:57 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-07-08 20:44:57 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_read_default_symlinks',`
|
|
|
|
gen_require(`
|
|
|
|
type default_t;
|
|
|
|
')
|
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
allow $1 default_t:lnk_file read_lnk_file_perms;
|
2005-07-08 20:44:57 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read sockets with the default file type.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-07-08 20:44:57 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-07-08 20:44:57 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_read_default_sockets',`
|
|
|
|
gen_require(`
|
|
|
|
type default_t;
|
|
|
|
')
|
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
allow $1 default_t:sock_file read_sock_file_perms;
|
2005-07-08 20:44:57 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read named pipes with the default file type.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-07-08 20:44:57 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-07-08 20:44:57 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_read_default_pipes',`
|
|
|
|
gen_require(`
|
|
|
|
type default_t;
|
|
|
|
')
|
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
allow $1 default_t:fifo_file read_fifo_file_perms;
|
2005-07-08 20:44:57 +00:00
|
|
|
')
|
|
|
|
|
2005-05-11 16:48:10 +00:00
|
|
|
########################################
|
2006-05-10 18:09:08 +00:00
|
|
|
## <summary>
|
|
|
|
## Search the contents of /etc directories.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2005-05-11 16:48:10 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`files_search_etc',`
|
2005-06-17 17:59:26 +00:00
|
|
|
gen_require(`
|
|
|
|
type etc_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
allow $1 etc_t:dir search_dir_perms;
|
2005-05-11 16:48:10 +00:00
|
|
|
')
|
|
|
|
|
2005-07-08 20:44:57 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Set the attributes of the /etc directories.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-07-08 20:44:57 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-07-08 20:44:57 +00:00
|
|
|
## </param>
|
|
|
|
#
|
2006-01-31 19:21:01 +00:00
|
|
|
interface(`files_setattr_etc_dirs',`
|
2005-07-08 20:44:57 +00:00
|
|
|
gen_require(`
|
|
|
|
type etc_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
allow $1 etc_t:dir setattr;
|
|
|
|
')
|
|
|
|
|
2005-05-11 16:48:10 +00:00
|
|
|
########################################
|
2006-05-10 18:09:08 +00:00
|
|
|
## <summary>
|
|
|
|
## List the contents of /etc directories.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2005-05-11 16:48:10 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`files_list_etc',`
|
2005-06-17 17:59:26 +00:00
|
|
|
gen_require(`
|
|
|
|
type etc_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
allow $1 etc_t:dir list_dir_perms;
|
2005-05-11 16:48:10 +00:00
|
|
|
')
|
|
|
|
|
2006-09-28 14:37:29 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Add and remove entries from /etc directories.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_rw_etc_dirs',`
|
|
|
|
gen_require(`
|
|
|
|
type etc_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
allow $1 etc_t:dir rw_dir_perms;
|
|
|
|
')
|
|
|
|
|
2005-04-14 20:18:17 +00:00
|
|
|
########################################
|
2006-05-10 18:09:08 +00:00
|
|
|
## <summary>
|
|
|
|
## Read generic files in /etc.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-06-29 14:26:41 +00:00
|
|
|
interface(`files_read_etc_files',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
type etc_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
allow $1 etc_t:dir list_dir_perms;
|
2008-07-23 21:38:39 +00:00
|
|
|
read_files_pattern($1, etc_t, etc_t)
|
|
|
|
read_lnk_files_pattern($1, etc_t, etc_t)
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2006-06-08 17:18:25 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Do not audit attempts to write generic files in /etc.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_dontaudit_write_etc_files',`
|
|
|
|
gen_require(`
|
|
|
|
type etc_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
dontaudit $1 etc_t:file write;
|
|
|
|
')
|
|
|
|
|
2005-04-14 20:18:17 +00:00
|
|
|
########################################
|
2006-05-10 18:09:08 +00:00
|
|
|
## <summary>
|
|
|
|
## Read and write generic files in /etc.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2006-09-06 22:07:25 +00:00
|
|
|
## <rolecap/>
|
2005-05-04 19:15:13 +00:00
|
|
|
#
|
2005-06-29 14:26:41 +00:00
|
|
|
interface(`files_rw_etc_files',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
type etc_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
allow $1 etc_t:dir list_dir_perms;
|
2008-07-23 21:38:39 +00:00
|
|
|
rw_files_pattern($1, etc_t, etc_t)
|
|
|
|
read_lnk_files_pattern($1, etc_t, etc_t)
|
2005-05-04 19:15:13 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2006-05-10 18:09:08 +00:00
|
|
|
## <summary>
|
|
|
|
## Create, read, write, and delete generic
|
|
|
|
## files in /etc.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2006-09-06 22:07:25 +00:00
|
|
|
## <rolecap/>
|
2005-05-04 19:15:13 +00:00
|
|
|
#
|
2005-06-29 14:26:41 +00:00
|
|
|
interface(`files_manage_etc_files',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
type etc_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
manage_files_pattern($1, etc_t, etc_t)
|
|
|
|
read_lnk_files_pattern($1, etc_t, etc_t)
|
2005-05-04 19:15:13 +00:00
|
|
|
')
|
|
|
|
|
2005-05-23 15:49:31 +00:00
|
|
|
########################################
|
2005-07-08 20:44:57 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Delete system configuration files in /etc.
|
2005-07-08 20:44:57 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-03-02 23:41:11 +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-23 15:49:31 +00:00
|
|
|
#
|
2005-06-29 14:26:41 +00:00
|
|
|
interface(`files_delete_etc_files',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
type etc_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
delete_files_pattern($1, etc_t, etc_t)
|
2005-05-23 15:49:31 +00:00
|
|
|
')
|
|
|
|
|
2005-05-04 19:15:13 +00:00
|
|
|
########################################
|
2006-05-10 18:09:08 +00:00
|
|
|
## <summary>
|
|
|
|
## Execute generic files in /etc.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-06-29 14:26:41 +00:00
|
|
|
interface(`files_exec_etc_files',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
type etc_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
allow $1 etc_t:dir list_dir_perms;
|
2008-07-23 21:38:39 +00:00
|
|
|
read_lnk_files_pattern($1, etc_t, etc_t)
|
|
|
|
exec_files_pattern($1, etc_t, etc_t)
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2005-11-25 15:51:50 +00:00
|
|
|
#######################################
|
|
|
|
## <summary>
|
|
|
|
## Relabel from and to generic files in /etc.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-11-25 15:51:50 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-11-25 15:51:50 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_relabel_etc_files',`
|
|
|
|
gen_require(`
|
|
|
|
type etc_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
allow $1 etc_t:dir list_dir_perms;
|
2008-07-23 21:38:39 +00:00
|
|
|
relabel_files_pattern($1, etc_t, etc_t)
|
2005-11-25 15:51:50 +00:00
|
|
|
')
|
|
|
|
|
2006-09-13 18:08:17 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read symbolic links in /etc.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_read_etc_symlinks',`
|
|
|
|
gen_require(`
|
|
|
|
type etc_t;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
read_lnk_files_pattern($1, etc_t, etc_t)
|
2006-09-13 18:08:17 +00:00
|
|
|
')
|
|
|
|
|
2007-02-16 23:01:42 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Create, read, write, and delete symbolic links in /etc.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_manage_etc_symlinks',`
|
|
|
|
gen_require(`
|
|
|
|
type etc_t;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
manage_lnk_files_pattern($1, etc_t, etc_t)
|
2007-02-16 23:01:42 +00:00
|
|
|
')
|
|
|
|
|
2006-05-02 18:34:35 +00:00
|
|
|
########################################
|
2006-05-10 18:09:08 +00:00
|
|
|
## <summary>
|
|
|
|
## Create objects in /etc with a private
|
|
|
|
## type using a type_transition.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
## <param name="file_type">
|
|
|
|
## <summary>
|
|
|
|
## Private file type.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
## <param name="class">
|
|
|
|
## <summary>
|
|
|
|
## Object classes to be created.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2006-05-02 18:34:35 +00:00
|
|
|
#
|
|
|
|
interface(`files_etc_filetrans',`
|
|
|
|
gen_require(`
|
|
|
|
type etc_t;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
filetrans_pattern($1, etc_t, $2, $3)
|
2006-05-02 18:34:35 +00:00
|
|
|
')
|
|
|
|
|
2005-04-14 20:18:17 +00:00
|
|
|
########################################
|
2006-05-10 18:09:08 +00:00
|
|
|
## <summary>
|
|
|
|
## Create a boot flag.
|
|
|
|
## </summary>
|
|
|
|
## <desc>
|
|
|
|
## <p>
|
|
|
|
## Create a boot flag, such as
|
|
|
|
## /.autorelabel and /.autofsck.
|
|
|
|
## </p>
|
|
|
|
## </desc>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2006-09-06 22:07:25 +00:00
|
|
|
## <rolecap/>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`files_create_boot_flag',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
type root_t, etc_runtime_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
allow $1 etc_runtime_t:file manage_file_perms;
|
|
|
|
filetrans_pattern($1,root_t,etc_runtime_t,file)
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-08-15 14:46:17 +00:00
|
|
|
## <summary>
|
|
|
|
## Read files in /etc that are dynamically
|
|
|
|
## created on boot, such as mtab.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-08-15 14:46:17 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-08-15 14:46:17 +00:00
|
|
|
## </param>
|
2006-09-06 22:07:25 +00:00
|
|
|
## <rolecap/>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-08-15 14:46:17 +00:00
|
|
|
interface(`files_read_etc_runtime_files',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
type etc_t, etc_runtime_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
allow $1 etc_t:dir list_dir_perms;
|
2008-07-23 21:38:39 +00:00
|
|
|
read_files_pattern($1, etc_t, etc_runtime_t)
|
|
|
|
read_lnk_files_pattern($1, etc_t, etc_runtime_t)
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-08-15 14:46:17 +00:00
|
|
|
## <summary>
|
|
|
|
## Do not audit attempts to read files
|
|
|
|
## in /etc that are dynamically
|
|
|
|
## created on boot, such as mtab.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-08-15 14:46:17 +00:00
|
|
|
## Domain to not audit.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-08-15 14:46:17 +00:00
|
|
|
## </param>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-08-15 14:46:17 +00:00
|
|
|
interface(`files_dontaudit_read_etc_runtime_files',`
|
|
|
|
gen_require(`
|
|
|
|
type etc_runtime_t;
|
|
|
|
')
|
|
|
|
|
2005-08-31 16:54:19 +00:00
|
|
|
dontaudit $1 etc_runtime_t:file { getattr read };
|
2005-08-15 14:46:17 +00:00
|
|
|
')
|
|
|
|
|
2005-09-02 20:29:52 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read and write files in /etc that are dynamically
|
|
|
|
## created on boot, such as mtab.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-09-02 20:29:52 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-09-02 20:29:52 +00:00
|
|
|
## </param>
|
2006-09-06 22:07:25 +00:00
|
|
|
## <rolecap/>
|
2005-09-02 20:29:52 +00:00
|
|
|
#
|
|
|
|
interface(`files_rw_etc_runtime_files',`
|
|
|
|
gen_require(`
|
|
|
|
type etc_t, etc_runtime_t;
|
|
|
|
')
|
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
allow $1 etc_t:dir list_dir_perms;
|
2008-07-23 21:38:39 +00:00
|
|
|
rw_files_pattern($1, etc_t, etc_runtime_t)
|
2005-09-02 20:29:52 +00:00
|
|
|
')
|
|
|
|
|
2005-08-15 14:46:17 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Create, read, write, and delete files in
|
|
|
|
## /etc that are dynamically created on boot,
|
|
|
|
## such as mtab.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-08-15 14:46:17 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-08-15 14:46:17 +00:00
|
|
|
## </param>
|
2006-09-06 22:07:25 +00:00
|
|
|
## <rolecap/>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-08-15 14:46:17 +00:00
|
|
|
interface(`files_manage_etc_runtime_files',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
type etc_t, etc_runtime_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
manage_files_pattern($1, { etc_t etc_runtime_t }, etc_runtime_t)
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2006-05-02 18:34:35 +00:00
|
|
|
## <summary>
|
|
|
|
## Create, etc runtime objects with an automatic
|
|
|
|
## type transition.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
## <param name="object">
|
|
|
|
## <summary>
|
|
|
|
## The class of the object being created.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2006-05-02 18:34:35 +00:00
|
|
|
interface(`files_etc_filetrans_etc_runtime',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
2006-05-02 18:34:35 +00:00
|
|
|
type etc_t, etc_runtime_t;
|
2005-06-22 16:07:14 +00:00
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
filetrans_pattern($1, etc_t, etc_runtime_t, $2)
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2005-12-09 20:08:10 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Getattr of directories on new filesystems
|
|
|
|
## that have not yet been labeled.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-03-02 23:41:11 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-12-09 20:08:10 +00:00
|
|
|
## </param>
|
|
|
|
#
|
2006-01-31 19:21:01 +00:00
|
|
|
interface(`files_getattr_isid_type_dirs',`
|
2005-12-09 20:08:10 +00:00
|
|
|
gen_require(`
|
|
|
|
type file_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
allow $1 file_t:dir getattr;
|
|
|
|
')
|
|
|
|
|
2005-06-01 13:51:54 +00:00
|
|
|
########################################
|
2005-06-27 20:59:28 +00:00
|
|
|
## <summary>
|
|
|
|
## Do not audit attempts to search directories on new filesystems
|
|
|
|
## that have not yet been labeled.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-03-02 23:41:11 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-27 20:59:28 +00:00
|
|
|
## </param>
|
2005-06-01 13:51:54 +00:00
|
|
|
#
|
2006-01-31 19:21:01 +00:00
|
|
|
interface(`files_dontaudit_search_isid_type_dirs',`
|
2005-06-27 20:59:28 +00:00
|
|
|
gen_require(`
|
|
|
|
type file_t;
|
|
|
|
')
|
|
|
|
|
2005-10-21 21:35:25 +00:00
|
|
|
dontaudit $1 file_t:dir search_dir_perms;
|
2005-06-27 20:59:28 +00:00
|
|
|
')
|
|
|
|
|
2005-07-08 20:44:57 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## List the contents of directories on new filesystems
|
|
|
|
## that have not yet been labeled.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-03-02 23:41:11 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-07-08 20:44:57 +00:00
|
|
|
## </param>
|
|
|
|
#
|
2006-01-31 19:21:01 +00:00
|
|
|
interface(`files_list_isid_type_dirs',`
|
2005-07-08 20:44:57 +00:00
|
|
|
gen_require(`
|
|
|
|
type file_t;
|
|
|
|
')
|
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
allow $1 file_t:dir list_dir_perms;
|
2005-07-08 20:44:57 +00:00
|
|
|
')
|
|
|
|
|
2005-06-27 20:59:28 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read and write directories on new filesystems
|
|
|
|
## that have not yet been labeled.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-03-02 23:41:11 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-27 20:59:28 +00:00
|
|
|
## </param>
|
2005-06-01 13:51:54 +00:00
|
|
|
#
|
2006-01-31 19:21:01 +00:00
|
|
|
interface(`files_rw_isid_type_dirs',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
type file_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
allow $1 file_t:dir rw_dir_perms;
|
2005-06-01 13:51:54 +00:00
|
|
|
')
|
|
|
|
|
2005-05-31 21:25:45 +00:00
|
|
|
########################################
|
2005-06-27 20:59:28 +00:00
|
|
|
## <summary>
|
|
|
|
## Create, read, write, and delete directories
|
|
|
|
## on new filesystems that have not yet been labeled.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-03-02 23:41:11 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-27 20:59:28 +00:00
|
|
|
## </param>
|
2005-05-31 21:25:45 +00:00
|
|
|
#
|
2006-01-31 19:21:01 +00:00
|
|
|
interface(`files_manage_isid_type_dirs',`
|
2005-06-27 20:59:28 +00:00
|
|
|
gen_require(`
|
|
|
|
type file_t;
|
|
|
|
')
|
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
allow $1 file_t:dir manage_dir_perms;
|
2005-06-27 20:59:28 +00:00
|
|
|
')
|
|
|
|
|
2005-07-08 20:44:57 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Mount a filesystem on a directory on new filesystems
|
|
|
|
## that has not yet been labeled.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-03-02 23:41:11 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-07-08 20:44:57 +00:00
|
|
|
## </param>
|
|
|
|
#
|
2006-01-31 19:21:01 +00:00
|
|
|
interface(`files_mounton_isid_type_dirs',`
|
2005-07-08 20:44:57 +00:00
|
|
|
gen_require(`
|
|
|
|
type file_t;
|
|
|
|
')
|
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
allow $1 file_t:dir { search_dir_perms mounton };
|
2005-07-08 20:44:57 +00:00
|
|
|
')
|
|
|
|
|
2005-07-11 19:02:50 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read files on new filesystems
|
|
|
|
## that have not yet been labeled.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-03-02 23:41:11 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-07-11 19:02:50 +00:00
|
|
|
## </param>
|
|
|
|
#
|
2006-01-31 19:21:01 +00:00
|
|
|
interface(`files_read_isid_type_files',`
|
2005-07-11 19:02:50 +00:00
|
|
|
gen_require(`
|
|
|
|
type file_t;
|
|
|
|
')
|
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
allow $1 file_t:file read_file_perms;
|
2005-07-11 19:02:50 +00:00
|
|
|
')
|
|
|
|
|
2005-06-27 20:59:28 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Create, read, write, and delete files
|
|
|
|
## on new filesystems that have not yet been labeled.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-03-02 23:41:11 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-27 20:59:28 +00:00
|
|
|
## </param>
|
2005-05-31 21:25:45 +00:00
|
|
|
#
|
2006-01-31 19:21:01 +00:00
|
|
|
interface(`files_manage_isid_type_files',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
type file_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
allow $1 file_t:file manage_file_perms;
|
2005-05-31 21:25:45 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-06-27 20:59:28 +00:00
|
|
|
## <summary>
|
|
|
|
## Create, read, write, and delete symbolic links
|
|
|
|
## on new filesystems that have not yet been labeled.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-03-02 23:41:11 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-27 20:59:28 +00:00
|
|
|
## </param>
|
2005-05-31 21:25:45 +00:00
|
|
|
#
|
2006-01-31 19:21:01 +00:00
|
|
|
interface(`files_manage_isid_type_symlinks',`
|
2005-06-27 20:59:28 +00:00
|
|
|
gen_require(`
|
|
|
|
type file_t;
|
|
|
|
')
|
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
allow $1 file_t:lnk_file manage_lnk_file_perms;
|
2005-06-27 20:59:28 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read and write block device nodes on new filesystems
|
|
|
|
## that have not yet been labeled.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-03-02 23:41:11 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-27 20:59:28 +00:00
|
|
|
## </param>
|
2005-05-31 21:25:45 +00:00
|
|
|
#
|
2006-01-31 19:21:01 +00:00
|
|
|
interface(`files_rw_isid_type_blk_files',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
type file_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
allow $1 file_t:blk_file rw_blk_file_perms;
|
2005-06-27 20:59:28 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Create, read, write, and delete block device nodes
|
|
|
|
## on new filesystems that have not yet been labeled.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-03-02 23:41:11 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-27 20:59:28 +00:00
|
|
|
## </param>
|
|
|
|
#
|
2006-01-31 19:21:01 +00:00
|
|
|
interface(`files_manage_isid_type_blk_files',`
|
2005-06-27 20:59:28 +00:00
|
|
|
gen_require(`
|
|
|
|
type file_t;
|
|
|
|
')
|
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
allow $1 file_t:blk_file manage_blk_file_perms;
|
2005-06-27 20:59:28 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Create, read, write, and delete character device nodes
|
|
|
|
## on new filesystems that have not yet been labeled.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-03-02 23:41:11 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-27 20:59:28 +00:00
|
|
|
## </param>
|
|
|
|
#
|
2006-01-31 19:21:01 +00:00
|
|
|
interface(`files_manage_isid_type_chr_files',`
|
2005-06-27 20:59:28 +00:00
|
|
|
gen_require(`
|
|
|
|
type file_t;
|
|
|
|
')
|
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
allow $1 file_t:chr_file manage_chr_file_perms;
|
2005-05-31 21:25:45 +00:00
|
|
|
')
|
|
|
|
|
2005-06-30 18:54:08 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
2005-10-10 18:50:08 +00:00
|
|
|
## Get the attributes of the home directories root
|
2005-09-02 19:11:07 +00:00
|
|
|
## (/home).
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-03-02 23:41:11 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-09-02 19:11:07 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_getattr_home_dir',`
|
|
|
|
gen_require(`
|
|
|
|
type home_root_t;
|
|
|
|
')
|
|
|
|
|
2005-10-10 18:50:08 +00:00
|
|
|
allow $1 home_root_t:dir getattr;
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Do not audit attempts to get the
|
|
|
|
## attributes of the home directories root
|
|
|
|
## (/home).
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-10-10 18:50:08 +00:00
|
|
|
## Domain to not audit.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-10-10 18:50:08 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_dontaudit_getattr_home_dir',`
|
|
|
|
gen_require(`
|
|
|
|
type home_root_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
dontaudit $1 home_root_t:dir getattr;
|
2005-09-02 19:11:07 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Search home directories root (/home).
|
2005-06-30 18:54:08 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-03-02 23:41:11 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-30 18:54:08 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_search_home',`
|
|
|
|
gen_require(`
|
|
|
|
type home_root_t;
|
|
|
|
')
|
|
|
|
|
2005-10-21 21:35:25 +00:00
|
|
|
allow $1 home_root_t:dir search_dir_perms;
|
2005-06-30 18:54:08 +00:00
|
|
|
')
|
|
|
|
|
2005-08-08 15:51:15 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
2005-09-02 19:11:07 +00:00
|
|
|
## Do not audit attempts to search
|
|
|
|
## home directories root (/home).
|
2005-08-08 15:51:15 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-08-08 15:51:15 +00:00
|
|
|
## Domain to not audit.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-08-08 15:51:15 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_dontaudit_search_home',`
|
|
|
|
gen_require(`
|
|
|
|
type home_root_t;
|
|
|
|
')
|
|
|
|
|
2005-10-21 21:35:25 +00:00
|
|
|
dontaudit $1 home_root_t:dir search_dir_perms;
|
2005-08-08 15:51:15 +00:00
|
|
|
')
|
|
|
|
|
2006-01-12 23:23:22 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Do not audit attempts to list
|
|
|
|
## home directories root (/home).
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-01-12 23:23:22 +00:00
|
|
|
## Domain to not audit.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2006-01-12 23:23:22 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_dontaudit_list_home',`
|
|
|
|
gen_require(`
|
|
|
|
type home_root_t;
|
|
|
|
')
|
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
dontaudit $1 home_root_t:dir list_dir_perms;
|
2006-01-12 23:23:22 +00:00
|
|
|
')
|
|
|
|
|
2005-04-14 20:18:17 +00:00
|
|
|
########################################
|
2005-06-28 17:48:59 +00:00
|
|
|
## <summary>
|
|
|
|
## Get listing of home directories.
|
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-03-02 23:41:11 +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(`files_list_home',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
type home_root_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
allow $1 home_root_t:dir list_dir_perms;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2005-07-06 20:28:29 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
2006-01-13 21:06:49 +00:00
|
|
|
## Create objects in /home.
|
2005-07-06 20:28:29 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-03-02 23:41:11 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-07-06 20:28:29 +00:00
|
|
|
## </param>
|
|
|
|
## <param name="home_type">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-01-13 21:06:49 +00:00
|
|
|
## The private type.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2006-01-13 21:06:49 +00:00
|
|
|
## </param>
|
2006-03-02 23:41:11 +00:00
|
|
|
## <param name="object">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-03-02 23:41:11 +00:00
|
|
|
## The class of the object being created.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-07-06 20:28:29 +00:00
|
|
|
## </param>
|
|
|
|
#
|
2006-02-21 18:40:44 +00:00
|
|
|
interface(`files_home_filetrans',`
|
2005-07-06 20:28:29 +00:00
|
|
|
gen_require(`
|
|
|
|
type home_root_t;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
filetrans_pattern($1, home_root_t, $2, $3)
|
2005-07-06 20:28:29 +00:00
|
|
|
')
|
|
|
|
|
2006-09-06 22:07:25 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Get the attributes of lost+found directories.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_getattr_lost_found_dirs',`
|
|
|
|
gen_require(`
|
|
|
|
type lost_found_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
allow $1 lost_found_t:dir getattr;
|
|
|
|
')
|
|
|
|
|
2007-02-16 23:01:42 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Do not audit attempts to get the attributes of
|
|
|
|
## lost+found directories.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain to not audit.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_dontaudit_getattr_lost_found_dirs',`
|
|
|
|
gen_require(`
|
|
|
|
type lost_found_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
dontaudit $1 lost_found_t:dir getattr;
|
|
|
|
')
|
|
|
|
|
2005-06-28 17:48:59 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Create, read, write, and delete objects in
|
|
|
|
## lost+found directories.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-03-02 23:41:11 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-28 17:48:59 +00:00
|
|
|
## </param>
|
2006-09-06 22:07:25 +00:00
|
|
|
## <rolecap/>
|
2005-06-28 17:48:59 +00:00
|
|
|
#
|
|
|
|
interface(`files_manage_lost_found',`
|
|
|
|
gen_require(`
|
|
|
|
type lost_found_t;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
manage_dirs_pattern($1, lost_found_t, lost_found_t)
|
|
|
|
manage_files_pattern($1, lost_found_t, lost_found_t)
|
|
|
|
manage_lnk_files_pattern($1, lost_found_t, lost_found_t)
|
|
|
|
manage_fifo_files_pattern($1, lost_found_t, lost_found_t)
|
|
|
|
manage_sock_files_pattern($1, lost_found_t, lost_found_t)
|
2005-06-28 17:48:59 +00:00
|
|
|
')
|
|
|
|
|
2005-05-26 20:38:45 +00:00
|
|
|
########################################
|
2006-05-10 18:09:08 +00:00
|
|
|
## <summary>
|
|
|
|
## Search the contents of /mnt.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2005-06-27 18:37:33 +00:00
|
|
|
#
|
|
|
|
interface(`files_search_mnt',`
|
|
|
|
gen_require(`
|
|
|
|
type mnt_t;
|
|
|
|
')
|
|
|
|
|
2005-12-09 20:08:10 +00:00
|
|
|
allow $1 mnt_t:dir search_dir_perms;
|
2005-06-27 18:37:33 +00:00
|
|
|
')
|
|
|
|
|
2006-03-30 15:59:39 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Do not audit attempts to search /mnt.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain to not audit.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_dontaudit_search_mnt',`
|
|
|
|
gen_require(`
|
|
|
|
type mnt_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
dontaudit $1 mnt_t:dir search_dir_perms;
|
|
|
|
')
|
|
|
|
|
2005-06-27 18:37:33 +00:00
|
|
|
########################################
|
2006-05-10 18:09:08 +00:00
|
|
|
## <summary>
|
|
|
|
## List the contents of /mnt.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2005-05-26 20:38:45 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`files_list_mnt',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
type mnt_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
allow $1 mnt_t:dir list_dir_perms;
|
2005-05-26 20:38:45 +00:00
|
|
|
')
|
|
|
|
|
2005-09-14 18:33:53 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Mount a filesystem on /mnt.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-09-14 18:33:53 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-09-14 18:33:53 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_mounton_mnt',`
|
|
|
|
gen_require(`
|
|
|
|
type mnt_t;
|
|
|
|
')
|
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
allow $1 mnt_t:dir { search_dir_perms mounton };
|
2005-09-14 18:33:53 +00:00
|
|
|
')
|
|
|
|
|
2005-07-08 20:44:57 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Create, read, write, and delete directories in /mnt.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-07-08 20:44:57 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-07-08 20:44:57 +00:00
|
|
|
## </param>
|
2006-09-06 22:07:25 +00:00
|
|
|
## <rolecap/>
|
2005-07-08 20:44:57 +00:00
|
|
|
#
|
|
|
|
interface(`files_manage_mnt_dirs',`
|
|
|
|
gen_require(`
|
|
|
|
type mnt_t;
|
|
|
|
')
|
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
allow $1 mnt_t:dir manage_dir_perms;
|
2005-07-08 20:44:57 +00:00
|
|
|
')
|
|
|
|
|
2005-08-08 15:51:15 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Create, read, write, and delete files in /mnt.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-08-08 15:51:15 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-08-08 15:51:15 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_manage_mnt_files',`
|
|
|
|
gen_require(`
|
|
|
|
type mnt_t;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
manage_files_pattern($1, mnt_t, mnt_t)
|
2005-08-08 15:51:15 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Create, read, write, and delete symbolic links in /mnt.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-08-08 15:51:15 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-08-08 15:51:15 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_manage_mnt_symlinks',`
|
|
|
|
gen_require(`
|
|
|
|
type mnt_t;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
manage_lnk_files_pattern($1, mnt_t, mnt_t)
|
2005-08-08 15:51:15 +00:00
|
|
|
')
|
|
|
|
|
2006-03-02 23:41:11 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Search the contents of the kernel module directories.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_search_kernel_modules',`
|
|
|
|
gen_require(`
|
|
|
|
type modules_object_t;
|
|
|
|
')
|
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
allow $1 modules_object_t:dir search_dir_perms;
|
2006-03-02 23:41:11 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## List the contents of the kernel module directories.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_list_kernel_modules',`
|
|
|
|
gen_require(`
|
|
|
|
type modules_object_t;
|
|
|
|
')
|
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
allow $1 modules_object_t:dir list_dir_perms;
|
2006-03-02 23:41:11 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Get the attributes of kernel module files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_getattr_kernel_modules',`
|
|
|
|
gen_require(`
|
|
|
|
type modules_object_t;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
getattr_files_pattern($1, modules_object_t, modules_object_t)
|
2006-03-02 23:41:11 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read kernel module files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_read_kernel_modules',`
|
|
|
|
gen_require(`
|
|
|
|
type modules_object_t;
|
|
|
|
')
|
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
allow $1 modules_object_t:dir list_dir_perms;
|
2008-07-23 21:38:39 +00:00
|
|
|
read_files_pattern($1, modules_object_t, modules_object_t)
|
|
|
|
read_lnk_files_pattern($1, modules_object_t, modules_object_t)
|
2006-03-02 23:41:11 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Write kernel module files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_write_kernel_modules',`
|
|
|
|
gen_require(`
|
|
|
|
type modules_object_t;
|
|
|
|
')
|
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
allow $1 modules_object_t:dir list_dir_perms;
|
2008-07-23 21:38:39 +00:00
|
|
|
write_files_pattern($1, modules_object_t, modules_object_t)
|
2006-03-02 23:41:11 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Delete kernel module files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_delete_kernel_modules',`
|
|
|
|
gen_require(`
|
|
|
|
type modules_object_t;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
delete_files_pattern($1, modules_object_t, modules_object_t)
|
2006-03-02 23:41:11 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Create, read, write, and delete
|
|
|
|
## kernel module files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2006-09-06 22:07:25 +00:00
|
|
|
## <rolecap/>
|
2006-03-02 23:41:11 +00:00
|
|
|
#
|
|
|
|
interface(`files_manage_kernel_modules',`
|
|
|
|
gen_require(`
|
|
|
|
type modules_object_t;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
manage_files_pattern($1, modules_object_t, modules_object_t)
|
2006-03-02 23:41:11 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Relabel from and to kernel module files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_relabel_kernel_modules',`
|
|
|
|
gen_require(`
|
|
|
|
type modules_object_t;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
relabel_files_pattern($1, modules_object_t, modules_object_t)
|
2006-03-02 23:41:11 +00:00
|
|
|
allow $1 modules_object_t:dir list_dir_perms;
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Create objects in the kernel module directories
|
|
|
|
## with a private type via an automatic type transition.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
## <param name="private_type">
|
|
|
|
## <summary>
|
|
|
|
## The type of the object to be created.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
## <param name="object_class">
|
|
|
|
## <summary>
|
|
|
|
## The object class of the object being created.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_kernel_modules_filetrans',`
|
|
|
|
gen_require(`
|
|
|
|
type modules_object_t;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
filetrans_pattern($1, modules_object_t, $2, $3)
|
2006-03-02 23:41:11 +00:00
|
|
|
')
|
|
|
|
|
2005-07-11 19:02:50 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## List world-readable directories.
|
|
|
|
## </summary>
|
2005-07-11 19:15:54 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-07-11 19:02:50 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-07-11 19:02:50 +00:00
|
|
|
## </param>
|
2006-09-06 22:07:25 +00:00
|
|
|
## <rolecap/>
|
2005-07-11 19:02:50 +00:00
|
|
|
#
|
|
|
|
interface(`files_list_world_readable',`
|
|
|
|
gen_require(`
|
|
|
|
type readable_t;
|
|
|
|
')
|
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
allow $1 readable_t:dir list_dir_perms;
|
2005-07-11 19:02:50 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read world-readable files.
|
|
|
|
## </summary>
|
2005-07-11 19:15:54 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-07-11 19:02:50 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-07-11 19:02:50 +00:00
|
|
|
## </param>
|
2006-09-06 22:07:25 +00:00
|
|
|
## <rolecap/>
|
2005-07-11 19:02:50 +00:00
|
|
|
#
|
|
|
|
interface(`files_read_world_readable_files',`
|
|
|
|
gen_require(`
|
|
|
|
type readable_t;
|
|
|
|
')
|
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
allow $1 readable_t:file read_file_perms;
|
2005-07-11 19:02:50 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read world-readable symbolic links.
|
|
|
|
## </summary>
|
2005-07-11 19:15:54 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-07-11 19:02:50 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-07-11 19:02:50 +00:00
|
|
|
## </param>
|
2006-09-06 22:07:25 +00:00
|
|
|
## <rolecap/>
|
2005-07-11 19:02:50 +00:00
|
|
|
#
|
|
|
|
interface(`files_read_world_readable_symlinks',`
|
|
|
|
gen_require(`
|
|
|
|
type readable_t;
|
|
|
|
')
|
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
allow $1 readable_t:lnk_file read_lnk_file_perms;
|
2005-07-11 19:02:50 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read world-readable named pipes.
|
|
|
|
## </summary>
|
2005-07-11 19:15:54 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-07-11 19:02:50 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-07-11 19:02:50 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_read_world_readable_pipes',`
|
|
|
|
gen_require(`
|
|
|
|
type readable_t;
|
|
|
|
')
|
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
allow $1 readable_t:fifo_file read_fifo_file_perms;
|
2005-07-11 19:02:50 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read world-readable sockets.
|
|
|
|
## </summary>
|
2005-07-11 19:15:54 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-07-11 19:02:50 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-07-11 19:02:50 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_read_world_readable_sockets',`
|
|
|
|
gen_require(`
|
|
|
|
type readable_t;
|
|
|
|
')
|
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
allow $1 readable_t:sock_file read_sock_file_perms;
|
2005-07-11 19:02:50 +00:00
|
|
|
')
|
|
|
|
|
2005-09-19 21:17:45 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Allow the specified type to associate
|
|
|
|
## to a filesystem with the type of the
|
|
|
|
## temporary directory (/tmp).
|
|
|
|
## </summary>
|
|
|
|
## <param name="file_type">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-09-19 21:17:45 +00:00
|
|
|
## Type of the file to associate.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-09-19 21:17:45 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_associate_tmp',`
|
|
|
|
gen_require(`
|
|
|
|
type tmp_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
allow $1 tmp_t:filesystem associate;
|
|
|
|
')
|
|
|
|
|
2005-10-23 20:18:36 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Get the attributes of the tmp directory (/tmp).
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-10-23 20:18:36 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-10-23 20:18:36 +00:00
|
|
|
## </param>
|
|
|
|
#
|
2006-01-31 19:21:01 +00:00
|
|
|
interface(`files_getattr_tmp_dirs',`
|
2005-10-23 20:18:36 +00:00
|
|
|
gen_require(`
|
|
|
|
type tmp_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
allow $1 tmp_t:dir getattr;
|
|
|
|
')
|
|
|
|
|
2005-09-02 19:11:07 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Do not audit attempts to get the
|
|
|
|
## attributes of the tmp directory (/tmp).
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-03-02 23:41:11 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-09-02 19:11:07 +00:00
|
|
|
## </param>
|
|
|
|
#
|
2006-01-31 19:21:01 +00:00
|
|
|
interface(`files_dontaudit_getattr_tmp_dirs',`
|
2005-09-02 19:11:07 +00:00
|
|
|
gen_require(`
|
|
|
|
type tmp_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
dontaudit $1 tmp_t:dir getattr;
|
|
|
|
')
|
|
|
|
|
2005-06-29 20:53:53 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
2005-08-05 15:32:27 +00:00
|
|
|
## Search the tmp directory (/tmp).
|
2005-06-29 20:53:53 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-03-02 23:41:11 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-29 20:53:53 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_search_tmp',`
|
|
|
|
gen_require(`
|
|
|
|
type tmp_t;
|
|
|
|
')
|
|
|
|
|
2006-01-18 18:45:23 +00:00
|
|
|
allow $1 tmp_t:dir search_dir_perms;
|
2005-06-29 20:53:53 +00:00
|
|
|
')
|
|
|
|
|
2006-08-29 02:41:00 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Do not audit attempts to search the tmp directory (/tmp).
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_dontaudit_search_tmp',`
|
|
|
|
gen_require(`
|
|
|
|
type tmp_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
dontaudit $1 tmp_t:dir search_dir_perms;
|
|
|
|
')
|
|
|
|
|
2005-10-24 01:53:13 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read the tmp directory (/tmp).
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-03-02 23:41:11 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-10-24 01:53:13 +00:00
|
|
|
## </param>
|
|
|
|
#
|
2005-11-08 22:00:30 +00:00
|
|
|
interface(`files_list_tmp',`
|
2005-10-24 01:53:13 +00:00
|
|
|
gen_require(`
|
|
|
|
type tmp_t;
|
|
|
|
')
|
|
|
|
|
2005-11-08 22:00:30 +00:00
|
|
|
allow $1 tmp_t:dir list_dir_perms;
|
2005-10-24 01:53:13 +00:00
|
|
|
')
|
|
|
|
|
2006-01-12 23:23:22 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Do not audit listing of the tmp directory (/tmp).
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-01-12 23:23:22 +00:00
|
|
|
## Domain not to audit.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2006-01-12 23:23:22 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_dontaudit_list_tmp',`
|
|
|
|
gen_require(`
|
|
|
|
type tmp_t;
|
|
|
|
')
|
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
dontaudit $1 tmp_t:dir list_dir_perms;
|
2006-01-12 23:23:22 +00:00
|
|
|
')
|
|
|
|
|
2005-10-24 01:53:13 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read files in the tmp directory (/tmp).
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-03-02 23:41:11 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-10-24 01:53:13 +00:00
|
|
|
## </param>
|
|
|
|
#
|
2005-11-08 22:00:30 +00:00
|
|
|
interface(`files_read_generic_tmp_files',`
|
2005-10-24 01:53:13 +00:00
|
|
|
gen_require(`
|
|
|
|
type tmp_t;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
read_files_pattern($1, tmp_t, tmp_t)
|
2005-10-24 01:53:13 +00:00
|
|
|
')
|
|
|
|
|
2007-10-29 18:35:32 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Manage temporary directories in /tmp.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## The type of the process performing this action.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_manage_generic_tmp_dirs',`
|
|
|
|
gen_require(`
|
|
|
|
type tmp_t;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
manage_dirs_pattern($1, tmp_t, tmp_t)
|
2007-10-29 18:35:32 +00:00
|
|
|
')
|
|
|
|
|
2006-03-08 20:09:42 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Manage temporary files and directories in /tmp.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## The type of the process performing this action.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_manage_generic_tmp_files',`
|
|
|
|
gen_require(`
|
|
|
|
type tmp_t;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
manage_files_pattern($1, tmp_t, tmp_t)
|
2006-03-08 20:09:42 +00:00
|
|
|
')
|
|
|
|
|
2005-10-24 01:53:13 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read symbolic links in the tmp directory (/tmp).
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-03-02 23:41:11 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-10-24 01:53:13 +00:00
|
|
|
## </param>
|
|
|
|
#
|
2005-11-08 22:00:30 +00:00
|
|
|
interface(`files_read_generic_tmp_symlinks',`
|
2005-10-24 01:53:13 +00:00
|
|
|
gen_require(`
|
|
|
|
type tmp_t;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
read_lnk_files_pattern($1, tmp_t, tmp_t)
|
2005-10-24 01:53:13 +00:00
|
|
|
')
|
|
|
|
|
2005-12-02 22:06:05 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read and write generic named sockets in the tmp directory (/tmp).
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-03-02 23:41:11 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-12-02 22:06:05 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_rw_generic_tmp_sockets',`
|
|
|
|
gen_require(`
|
|
|
|
type tmp_t;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
rw_sock_files_pattern($1, tmp_t, tmp_t)
|
2005-12-02 22:06:05 +00:00
|
|
|
')
|
|
|
|
|
2005-08-05 15:32:27 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Set the attributes of all tmp directories.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-03-02 23:41:11 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-08-05 15:32:27 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_setattr_all_tmp_dirs',`
|
|
|
|
gen_require(`
|
|
|
|
attribute tmpfile;
|
|
|
|
')
|
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
allow $1 tmpfile:dir { search_dir_perms setattr };
|
2005-08-05 15:32:27 +00:00
|
|
|
')
|
|
|
|
|
2007-02-16 23:01:42 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Do not audit attempts to get the attributes
|
|
|
|
## of all tmp files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain not to audit.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_dontaudit_getattr_all_tmp_files',`
|
|
|
|
gen_require(`
|
|
|
|
attribute tmpfile;
|
|
|
|
')
|
|
|
|
|
|
|
|
dontaudit $1 tmpfile:file getattr;
|
|
|
|
')
|
|
|
|
|
2007-10-29 18:35:32 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Allow attempts to get the attributes
|
|
|
|
## of all tmp files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain not to audit.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_getattr_all_tmp_files',`
|
|
|
|
gen_require(`
|
|
|
|
attribute tmpfile;
|
|
|
|
')
|
|
|
|
|
|
|
|
allow $1 tmpfile:file getattr;
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Do not audit attempts to get the attributes
|
|
|
|
## of all tmp sock_file.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain not to audit.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_dontaudit_getattr_all_tmp_sockets',`
|
|
|
|
gen_require(`
|
|
|
|
attribute tmpfile;
|
|
|
|
')
|
|
|
|
|
|
|
|
dontaudit $1 tmpfile:sock_file getattr;
|
|
|
|
')
|
|
|
|
|
2007-02-16 23:01:42 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read all tmp files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_read_all_tmp_files',`
|
|
|
|
gen_require(`
|
|
|
|
attribute tmpfile;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
read_files_pattern($1, tmpfile, tmpfile)
|
2007-02-16 23:01:42 +00:00
|
|
|
')
|
|
|
|
|
2005-04-14 20:18:17 +00:00
|
|
|
########################################
|
2006-05-10 18:09:08 +00:00
|
|
|
## <summary>
|
|
|
|
## Create an object in the tmp directories, with a private
|
|
|
|
## type using a type transition.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
## <param name="private type">
|
|
|
|
## <summary>
|
|
|
|
## The type of the object to be created.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
## <param name="object">
|
|
|
|
## <summary>
|
|
|
|
## The object class of the object being created.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2006-02-21 18:40:44 +00:00
|
|
|
interface(`files_tmp_filetrans',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
type tmp_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
filetrans_pattern($1, tmp_t, $2, $3)
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2006-05-10 18:09:08 +00:00
|
|
|
## <summary>
|
|
|
|
## Delete the contents of /tmp.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-08-05 15:32:27 +00:00
|
|
|
interface(`files_purge_tmp',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
attribute tmpfile;
|
2005-08-05 15:32:27 +00:00
|
|
|
')
|
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
allow $1 tmpfile:dir list_dir_perms;
|
2008-07-23 21:38:39 +00:00
|
|
|
delete_dirs_pattern($1, tmpfile, tmpfile)
|
|
|
|
delete_files_pattern($1, tmpfile, tmpfile)
|
|
|
|
delete_lnk_files_pattern($1, tmpfile, tmpfile)
|
|
|
|
delete_fifo_files_pattern($1, tmpfile, tmpfile)
|
|
|
|
delete_sock_files_pattern($1, tmpfile, tmpfile)
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2005-05-25 20:58:21 +00:00
|
|
|
########################################
|
2006-05-10 18:09:08 +00:00
|
|
|
## <summary>
|
|
|
|
## Search the content of /etc.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2005-05-25 20:58:21 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`files_search_usr',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
type usr_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
allow $1 usr_t:dir search_dir_perms;
|
2005-05-25 20:58:21 +00:00
|
|
|
')
|
|
|
|
|
2005-09-05 18:17:17 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## List the contents of generic
|
|
|
|
## directories in /usr.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-09-05 18:17:17 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-09-05 18:17:17 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_list_usr',`
|
|
|
|
gen_require(`
|
|
|
|
type usr_t;
|
|
|
|
')
|
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
allow $1 usr_t:dir list_dir_perms;
|
2005-09-05 18:17:17 +00:00
|
|
|
')
|
|
|
|
|
2007-06-20 19:47:10 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Add and remove entries from /usr directories.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_rw_usr_dirs',`
|
|
|
|
gen_require(`
|
|
|
|
type usr_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
allow $1 usr_t:dir rw_dir_perms;
|
|
|
|
')
|
|
|
|
|
2007-10-29 18:35:32 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## dontaudit Add and remove entries from /usr directories.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_dontaudit_rw_usr_dirs',`
|
|
|
|
gen_require(`
|
|
|
|
type usr_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
dontaudit $1 usr_t:dir rw_dir_perms;
|
|
|
|
')
|
|
|
|
|
2005-08-09 19:30:43 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Get the attributes of files in /usr.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-08-09 19:30:43 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-08-09 19:30:43 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_getattr_usr_files',`
|
|
|
|
gen_require(`
|
|
|
|
type usr_t;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
getattr_files_pattern($1, usr_t, usr_t)
|
2005-08-09 19:30:43 +00:00
|
|
|
')
|
|
|
|
|
2005-04-14 20:18:17 +00:00
|
|
|
########################################
|
2006-05-10 18:09:08 +00:00
|
|
|
## <summary>
|
|
|
|
## Read generic files in /usr.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`files_read_usr_files',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
type usr_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
allow $1 usr_t:dir list_dir_perms;
|
2008-07-23 21:38:39 +00:00
|
|
|
read_files_pattern($1, usr_t, usr_t)
|
|
|
|
read_lnk_files_pattern($1, usr_t, usr_t)
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2005-10-07 18:48:43 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Execute generic programs in /usr in the caller domain.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-03-02 23:41:11 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-10-07 18:48:43 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_exec_usr_files',`
|
|
|
|
gen_require(`
|
|
|
|
type usr_t;
|
|
|
|
')
|
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
allow $1 usr_t:dir list_dir_perms;
|
2008-07-23 21:38:39 +00:00
|
|
|
exec_files_pattern($1, usr_t, usr_t)
|
|
|
|
read_lnk_files_pattern($1, usr_t, usr_t)
|
2005-10-07 18:48:43 +00:00
|
|
|
')
|
|
|
|
|
2007-06-20 19:47:10 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Create, read, write, and delete files in the /usr directory.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_manage_usr_files',`
|
|
|
|
gen_require(`
|
|
|
|
type usr_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
manage_files_pattern($1, usr_t, usr_t)
|
|
|
|
')
|
|
|
|
|
2005-08-15 19:31:37 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Relabel a file to the type used in /usr.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-08-15 19:31:37 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-08-15 19:31:37 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_relabelto_usr_files',`
|
|
|
|
gen_require(`
|
|
|
|
type usr_t;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
relabelto_files_pattern($1, usr_t, usr_t)
|
2005-08-15 19:31:37 +00:00
|
|
|
')
|
|
|
|
|
2007-10-29 18:35:32 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Relabel a file from the type used in /usr.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_relabelfrom_usr_files',`
|
|
|
|
gen_require(`
|
|
|
|
type usr_t;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
relabelfrom_files_pattern($1, usr_t, usr_t)
|
2007-10-29 18:35:32 +00:00
|
|
|
')
|
|
|
|
|
2005-08-09 19:30:43 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read symbolic links in /usr.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-08-09 19:30:43 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-08-09 19:30:43 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_read_usr_symlinks',`
|
|
|
|
gen_require(`
|
|
|
|
type usr_t;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
read_lnk_files_pattern($1, usr_t, usr_t)
|
2005-08-09 19:30:43 +00:00
|
|
|
')
|
|
|
|
|
2005-09-16 14:54:36 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Create objects in the /usr directory
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-09-16 14:54:36 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-09-16 14:54:36 +00:00
|
|
|
## </param>
|
|
|
|
## <param name="file_type">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-09-16 14:54:36 +00:00
|
|
|
## The type of the object to be created
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-09-16 14:54:36 +00:00
|
|
|
## </param>
|
2006-03-02 23:41:11 +00:00
|
|
|
## <param name="object_class">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-03-02 23:41:11 +00:00
|
|
|
## The object class.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-09-16 14:54:36 +00:00
|
|
|
## </param>
|
|
|
|
#
|
2006-02-21 18:40:44 +00:00
|
|
|
interface(`files_usr_filetrans',`
|
2005-09-16 14:54:36 +00:00
|
|
|
gen_require(`
|
|
|
|
type usr_t;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
filetrans_pattern($1, usr_t, $2, $3)
|
2005-09-16 14:54:36 +00:00
|
|
|
')
|
|
|
|
|
2005-05-19 21:06:06 +00:00
|
|
|
########################################
|
2005-07-08 20:44:57 +00:00
|
|
|
## <summary>
|
2006-09-19 17:02:29 +00:00
|
|
|
## Do not audit attempts to search /usr/src.
|
2005-07-08 20:44:57 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-09-19 17:02:29 +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-19 21:06:06 +00:00
|
|
|
#
|
2006-09-19 17:02:29 +00:00
|
|
|
interface(`files_dontaudit_search_src',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
2006-09-19 17:02:29 +00:00
|
|
|
type src_t;
|
2005-06-22 16:07:14 +00:00
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
dontaudit $1 src_t:dir search_dir_perms;
|
2005-05-19 21:06:06 +00:00
|
|
|
')
|
|
|
|
|
2005-09-23 19:38:34 +00:00
|
|
|
########################################
|
2006-05-10 18:09:08 +00:00
|
|
|
## <summary>
|
2006-09-19 17:02:29 +00:00
|
|
|
## Get the attributes of files in /usr/src.
|
2006-05-10 18:09:08 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
2006-09-19 17:02:29 +00:00
|
|
|
## Domain allowed access.
|
2006-05-10 18:09:08 +00:00
|
|
|
## </summary>
|
|
|
|
## </param>
|
2005-09-23 19:38:34 +00:00
|
|
|
#
|
2006-09-19 17:02:29 +00:00
|
|
|
interface(`files_getattr_usr_src_files',`
|
2005-10-07 18:48:43 +00:00
|
|
|
gen_require(`
|
2006-09-19 17:02:29 +00:00
|
|
|
type usr_t, src_t;
|
2005-10-07 18:48:43 +00:00
|
|
|
')
|
2005-09-23 19:38:34 +00:00
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
getattr_files_pattern($1, src_t, src_t)
|
2006-09-19 17:02:29 +00:00
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
# /usr/src/linux symlink:
|
2008-07-23 21:38:39 +00:00
|
|
|
read_lnk_files_pattern($1, usr_t, src_t)
|
2005-09-23 19:38:34 +00:00
|
|
|
')
|
|
|
|
|
2005-04-14 20:18:17 +00:00
|
|
|
########################################
|
2006-05-10 18:09:08 +00:00
|
|
|
## <summary>
|
|
|
|
## Read files in /usr/src.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-06-29 14:26:41 +00:00
|
|
|
interface(`files_read_usr_src_files',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
type usr_t, src_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
allow $1 usr_t:dir search_dir_perms;
|
2008-07-23 21:38:39 +00:00
|
|
|
read_files_pattern($1, { usr_t src_t }, src_t)
|
|
|
|
read_lnk_files_pattern($1, { usr_t src_t }, src_t)
|
2006-12-12 20:08:08 +00:00
|
|
|
allow $1 src_t:dir list_dir_perms;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2006-09-19 17:02:29 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Execute programs in /usr/src in the caller domain.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_exec_usr_src_files',`
|
|
|
|
gen_require(`
|
|
|
|
type usr_t, src_t;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
list_dirs_pattern($1, usr_t, src_t)
|
|
|
|
exec_files_pattern($1, src_t, src_t)
|
|
|
|
read_lnk_files_pattern($1, src_t, src_t)
|
2006-09-19 17:02:29 +00:00
|
|
|
')
|
|
|
|
|
2006-03-02 23:41:11 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Install a system.map into the /boot directory.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_create_kernel_symbol_table',`
|
|
|
|
gen_require(`
|
|
|
|
type boot_t, system_map_t;
|
|
|
|
')
|
|
|
|
|
2007-10-09 17:29:48 +00:00
|
|
|
allow $1 boot_t:dir { list_dir_perms add_entry_dir_perms };
|
2006-03-02 23:41:11 +00:00
|
|
|
allow $1 system_map_t:file { rw_file_perms create };
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read system.map in the /boot directory.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_read_kernel_symbol_table',`
|
|
|
|
gen_require(`
|
|
|
|
type boot_t, system_map_t;
|
|
|
|
')
|
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
allow $1 boot_t:dir list_dir_perms;
|
2008-07-23 21:38:39 +00:00
|
|
|
read_files_pattern($1, boot_t, system_map_t)
|
2006-03-02 23:41:11 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Delete a system.map in the /boot directory.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_delete_kernel_symbol_table',`
|
|
|
|
gen_require(`
|
|
|
|
type boot_t, system_map_t;
|
|
|
|
')
|
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
allow $1 boot_t:dir list_dir_perms;
|
2008-07-23 21:38:39 +00:00
|
|
|
delete_files_pattern($1, boot_t, system_map_t)
|
2006-03-02 23:41:11 +00:00
|
|
|
')
|
|
|
|
|
2005-04-14 20:18:17 +00:00
|
|
|
########################################
|
2005-10-07 18:48:43 +00:00
|
|
|
## <summary>
|
|
|
|
## Search the contents of /var.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-10-07 18:48:43 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-10-07 18:48:43 +00:00
|
|
|
## </param>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`files_search_var',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
type var_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-10-21 19:36:49 +00:00
|
|
|
allow $1 var_t:dir search_dir_perms;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2005-12-09 20:08:10 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Do not audit attempts to write to /var.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-12-09 20:08:10 +00:00
|
|
|
## Domain to not audit.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-12-09 20:08:10 +00:00
|
|
|
## </param>
|
|
|
|
#
|
2006-01-31 19:21:01 +00:00
|
|
|
interface(`files_dontaudit_write_var_dirs',`
|
2005-12-09 20:08:10 +00:00
|
|
|
gen_require(`
|
|
|
|
type var_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
dontaudit $1 var_t:dir write;
|
|
|
|
')
|
|
|
|
|
2007-02-16 23:01:42 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Allow attempts to write to /var.dirs
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain to not audit.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_write_var_dirs',`
|
|
|
|
gen_require(`
|
|
|
|
type var_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
allow $1 var_t:dir write;
|
|
|
|
')
|
|
|
|
|
2005-05-05 17:44:11 +00:00
|
|
|
########################################
|
2005-10-07 18:48:43 +00:00
|
|
|
## <summary>
|
|
|
|
## Do not audit attempts to search
|
|
|
|
## the contents of /var.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-10-07 18:48:43 +00:00
|
|
|
## Domain to not audit.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-10-07 18:48:43 +00:00
|
|
|
## </param>
|
2005-05-05 17:44:11 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`files_dontaudit_search_var',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
type var_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2007-06-20 19:47:10 +00:00
|
|
|
dontaudit $1 var_t:dir search_dir_perms;
|
2005-05-05 17:44:11 +00:00
|
|
|
')
|
|
|
|
|
2005-10-07 18:48:43 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## List the contents of /var.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-10-07 18:48:43 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-10-07 18:48:43 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_list_var',`
|
|
|
|
gen_require(`
|
|
|
|
type var_t;
|
|
|
|
')
|
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
allow $1 var_t:dir list_dir_perms;
|
2005-10-07 18:48:43 +00:00
|
|
|
')
|
|
|
|
|
2005-08-17 14:14:07 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Create, read, write, and delete directories
|
|
|
|
## in the /var directory.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-08-17 14:14:07 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-08-17 14:14:07 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_manage_var_dirs',`
|
|
|
|
gen_require(`
|
|
|
|
type var_t;
|
|
|
|
')
|
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
allow $1 var_t:dir manage_dir_perms;
|
2005-08-17 14:14:07 +00:00
|
|
|
')
|
|
|
|
|
2005-06-27 20:59:28 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read files in the /var directory.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-03-02 23:41:11 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-27 20:59:28 +00:00
|
|
|
## </param>
|
|
|
|
#
|
2005-06-29 14:26:41 +00:00
|
|
|
interface(`files_read_var_files',`
|
2005-06-27 20:59:28 +00:00
|
|
|
gen_require(`
|
|
|
|
type var_t;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
read_files_pattern($1, var_t, var_t)
|
2005-06-27 20:59:28 +00:00
|
|
|
')
|
|
|
|
|
2006-04-28 18:30:02 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read and write files in the /var directory.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_rw_var_files',`
|
|
|
|
gen_require(`
|
|
|
|
type var_t;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
rw_files_pattern($1, var_t, var_t)
|
2006-04-28 18:30:02 +00:00
|
|
|
')
|
|
|
|
|
2005-08-17 14:14:07 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Create, read, write, and delete files in the /var directory.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-08-17 14:14:07 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-08-17 14:14:07 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_manage_var_files',`
|
|
|
|
gen_require(`
|
|
|
|
type var_t;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
manage_files_pattern($1, var_t, var_t)
|
2005-08-17 14:14:07 +00:00
|
|
|
')
|
|
|
|
|
2005-07-11 19:02:50 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read symbolic links in the /var directory.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-07-11 19:02:50 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-07-11 19:02:50 +00:00
|
|
|
## </param>
|
|
|
|
#
|
2006-01-31 19:21:01 +00:00
|
|
|
interface(`files_read_var_symlinks',`
|
2005-07-11 19:02:50 +00:00
|
|
|
gen_require(`
|
|
|
|
type var_t;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
read_lnk_files_pattern($1, var_t, var_t)
|
2005-07-11 19:02:50 +00:00
|
|
|
')
|
|
|
|
|
2005-08-17 14:14:07 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Create, read, write, and delete symbolic
|
|
|
|
## links in the /var directory.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-08-17 14:14:07 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-08-17 14:14:07 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_manage_var_symlinks',`
|
|
|
|
gen_require(`
|
|
|
|
type var_t;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
manage_lnk_files_pattern($1, var_t, var_t)
|
2005-08-17 14:14:07 +00:00
|
|
|
')
|
|
|
|
|
2005-09-16 14:54:36 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Create objects in the /var directory
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-09-16 14:54:36 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-09-16 14:54:36 +00:00
|
|
|
## </param>
|
|
|
|
## <param name="file_type">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-09-16 14:54:36 +00:00
|
|
|
## The type of the object to be created
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-09-16 14:54:36 +00:00
|
|
|
## </param>
|
2006-03-02 23:41:11 +00:00
|
|
|
## <param name="object_class">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-03-02 23:41:11 +00:00
|
|
|
## The object class.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-09-16 14:54:36 +00:00
|
|
|
## </param>
|
|
|
|
#
|
2006-02-21 18:40:44 +00:00
|
|
|
interface(`files_var_filetrans',`
|
2005-09-16 14:54:36 +00:00
|
|
|
gen_require(`
|
|
|
|
type var_t;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
filetrans_pattern($1, var_t, $2, $3)
|
2005-09-16 14:54:36 +00:00
|
|
|
')
|
|
|
|
|
2005-07-12 20:34:24 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Get the attributes of the /var/lib directory.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-03-02 23:41:11 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-07-12 20:34:24 +00:00
|
|
|
## </param>
|
|
|
|
#
|
2006-01-31 19:21:01 +00:00
|
|
|
interface(`files_getattr_var_lib_dirs',`
|
2005-07-12 20:34:24 +00:00
|
|
|
gen_require(`
|
|
|
|
type var_t, var_lib_t;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
getattr_dirs_pattern($1, var_t, var_lib_t)
|
2005-07-12 20:34:24 +00:00
|
|
|
')
|
|
|
|
|
2005-06-20 17:41:29 +00:00
|
|
|
########################################
|
2005-07-08 20:44:57 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Search the /var/lib directory.
|
2005-07-08 20:44:57 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-03-02 23:41:11 +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-20 17:41:29 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`files_search_var_lib',`
|
2005-06-20 17:41:29 +00:00
|
|
|
gen_require(`
|
|
|
|
type var_t, var_lib_t;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
search_dirs_pattern($1, var_t, var_lib_t)
|
2005-06-20 17:41:29 +00:00
|
|
|
')
|
|
|
|
|
2005-08-17 18:33:43 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## List the contents of the /var/lib directory.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-08-17 18:33:43 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-08-17 18:33:43 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_list_var_lib',`
|
|
|
|
gen_require(`
|
|
|
|
type var_t, var_lib_t;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
list_dirs_pattern($1, var_t, var_lib_t)
|
2005-08-17 18:33:43 +00:00
|
|
|
')
|
|
|
|
|
2005-07-15 19:18:55 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Create objects in the /var/lib directory
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-07-15 19:18:55 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-07-15 19:18:55 +00:00
|
|
|
## </param>
|
|
|
|
## <param name="file_type">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-07-15 19:18:55 +00:00
|
|
|
## The type of the object to be created
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-07-15 19:18:55 +00:00
|
|
|
## </param>
|
2006-03-02 23:41:11 +00:00
|
|
|
## <param name="object_class">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-03-02 23:41:11 +00:00
|
|
|
## The object class.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-07-15 19:18:55 +00:00
|
|
|
## </param>
|
|
|
|
#
|
2006-02-21 18:40:44 +00:00
|
|
|
interface(`files_var_lib_filetrans',`
|
2005-07-15 19:18:55 +00:00
|
|
|
gen_require(`
|
|
|
|
type var_t, var_lib_t;
|
|
|
|
')
|
|
|
|
|
2005-10-21 19:36:49 +00:00
|
|
|
allow $1 var_t:dir search_dir_perms;
|
2008-07-23 21:38:39 +00:00
|
|
|
filetrans_pattern($1, var_lib_t, $2, $3)
|
2005-07-15 19:18:55 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
2005-10-05 21:17:22 +00:00
|
|
|
## Read generic files in /var/lib.
|
2005-07-15 19:18:55 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-07-15 19:18:55 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-07-15 19:18:55 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_read_var_lib_files',`
|
|
|
|
gen_require(`
|
|
|
|
type var_t, var_lib_t;
|
|
|
|
')
|
|
|
|
|
2007-02-16 23:01:42 +00:00
|
|
|
allow $1 var_lib_t:dir list_dir_perms;
|
2008-07-23 21:38:39 +00:00
|
|
|
read_files_pattern($1, { var_t var_lib_t }, var_lib_t)
|
2005-07-15 19:18:55 +00:00
|
|
|
')
|
|
|
|
|
2005-10-05 21:17:22 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read generic symbolic links in /var/lib
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-10-05 21:17:22 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-10-05 21:17:22 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_read_var_lib_symlinks',`
|
|
|
|
gen_require(`
|
|
|
|
type var_t, var_lib_t;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
read_lnk_files_pattern($1, { var_t var_lib_t }, var_lib_t)
|
2005-10-05 21:17:22 +00:00
|
|
|
')
|
|
|
|
|
2005-10-27 14:08:47 +00:00
|
|
|
# cjp: the next two interfaces really need to be fixed
|
|
|
|
# in some way. They really neeed their own types.
|
|
|
|
|
2005-04-14 20:18:17 +00:00
|
|
|
########################################
|
2006-05-10 18:09:08 +00:00
|
|
|
## <summary>
|
|
|
|
## Create, read, write, and delete the
|
|
|
|
## pseudorandom number generator seed.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`files_manage_urandom_seed',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
type var_t, var_lib_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-10-21 19:36:49 +00:00
|
|
|
allow $1 var_t:dir search_dir_perms;
|
2008-07-23 21:38:39 +00:00
|
|
|
manage_files_pattern($1, var_lib_t, var_lib_t)
|
2005-10-27 14:08:47 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Allow domain to manage mount tables
|
|
|
|
## necessary for rpcd, nfsd, etc.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-10-27 14:08:47 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-10-27 14:08:47 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_manage_mounttab',`
|
|
|
|
gen_require(`
|
|
|
|
type var_t, var_lib_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
allow $1 var_t:dir search_dir_perms;
|
2008-07-23 21:38:39 +00:00
|
|
|
manage_files_pattern($1, var_lib_t, var_lib_t)
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2005-06-29 20:53:53 +00:00
|
|
|
########################################
|
2006-01-31 21:43:09 +00:00
|
|
|
## <summary>
|
|
|
|
## Search the locks directory (/var/lock).
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-01-31 21:43:09 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2006-01-31 21:43:09 +00:00
|
|
|
## </param>
|
2005-06-29 20:53:53 +00:00
|
|
|
#
|
2005-07-11 19:02:50 +00:00
|
|
|
interface(`files_search_locks',`
|
2005-06-29 20:53:53 +00:00
|
|
|
gen_require(`
|
2005-10-21 19:36:49 +00:00
|
|
|
type var_t, var_lock_t;
|
2005-06-29 20:53:53 +00:00
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
search_dirs_pattern($1, var_t, var_lock_t)
|
2005-06-29 20:53:53 +00:00
|
|
|
')
|
|
|
|
|
2005-07-11 19:02:50 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Do not audit attempts to search the
|
|
|
|
## locks directory (/var/lock).
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-07-11 19:02:50 +00:00
|
|
|
## Domain to not audit.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-07-11 19:02:50 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_dontaudit_search_locks',`
|
|
|
|
gen_require(`
|
|
|
|
type var_lock_t;
|
|
|
|
')
|
|
|
|
|
2007-06-20 19:47:10 +00:00
|
|
|
dontaudit $1 var_lock_t:dir search_dir_perms;
|
2005-07-11 19:02:50 +00:00
|
|
|
')
|
|
|
|
|
2005-10-07 19:35:36 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Add and remove entries in the /var/lock
|
|
|
|
## directories.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-10-07 19:35:36 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-10-07 19:35:36 +00:00
|
|
|
## </param>
|
|
|
|
#
|
2006-01-31 19:21:01 +00:00
|
|
|
interface(`files_rw_lock_dirs',`
|
2005-10-07 19:35:36 +00:00
|
|
|
gen_require(`
|
|
|
|
type var_t, var_lock_t;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
rw_dirs_pattern($1, var_t, var_lock_t)
|
2005-10-07 19:35:36 +00:00
|
|
|
')
|
|
|
|
|
2005-05-24 15:55:57 +00:00
|
|
|
########################################
|
2006-05-10 18:09:08 +00:00
|
|
|
## <summary>
|
|
|
|
## Get the attributes of generic lock files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2005-05-24 15:55:57 +00:00
|
|
|
#
|
2005-06-29 14:26:41 +00:00
|
|
|
interface(`files_getattr_generic_locks',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
2005-10-21 19:36:49 +00:00
|
|
|
type var_t, var_lock_t;
|
2005-06-22 16:07:14 +00:00
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-10-21 19:36:49 +00:00
|
|
|
allow $1 var_t:dir search_dir_perms;
|
2006-12-12 20:08:08 +00:00
|
|
|
allow $1 var_lock_t:dir list_dir_perms;
|
2008-07-23 21:38:39 +00:00
|
|
|
getattr_files_pattern($1, var_lock_t, var_lock_t)
|
2005-05-24 15:55:57 +00:00
|
|
|
')
|
|
|
|
|
2005-04-14 20:18:17 +00:00
|
|
|
########################################
|
2006-05-10 18:09:08 +00:00
|
|
|
## <summary>
|
|
|
|
## Create, read, write, and delete generic
|
|
|
|
## lock files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-06-29 14:26:41 +00:00
|
|
|
interface(`files_manage_generic_locks',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
2008-05-15 13:10:34 +00:00
|
|
|
type var_t, var_lock_t;
|
2005-06-22 16:07:14 +00:00
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
allow $1 var_t:dir search_dir_perms;
|
2008-07-23 21:38:39 +00:00
|
|
|
manage_files_pattern($1, var_lock_t, var_lock_t)
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2006-05-10 18:09:08 +00:00
|
|
|
## <summary>
|
|
|
|
## Delete all lock files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2006-09-06 22:07:25 +00:00
|
|
|
## <rolecap/>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-06-29 14:26:41 +00:00
|
|
|
interface(`files_delete_all_locks',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
attribute lockfile;
|
2008-05-15 13:10:34 +00:00
|
|
|
type var_t;
|
2005-06-22 16:07:14 +00:00
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
allow $1 var_t:dir search_dir_perms;
|
2008-07-23 21:38:39 +00:00
|
|
|
delete_files_pattern($1, lockfile, lockfile)
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2006-01-11 20:18:56 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read all lock files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-01-11 20:18:56 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2006-01-11 20:18:56 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_read_all_locks',`
|
|
|
|
gen_require(`
|
|
|
|
attribute lockfile;
|
|
|
|
type var_t, var_lock_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
allow $1 { var_t var_lock_t }:dir search_dir_perms;
|
2006-12-12 20:08:08 +00:00
|
|
|
allow $1 lockfile:dir list_dir_perms;
|
2008-07-23 21:38:39 +00:00
|
|
|
read_files_pattern($1, lockfile, lockfile)
|
|
|
|
read_lnk_files_pattern($1, lockfile, lockfile)
|
2006-01-11 20:18:56 +00:00
|
|
|
')
|
|
|
|
|
2005-05-12 20:50:09 +00:00
|
|
|
########################################
|
2006-05-10 18:09:08 +00:00
|
|
|
## <summary>
|
|
|
|
## Create an object in the locks directory, with a private
|
|
|
|
## type using a type transition.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
## <param name="private type">
|
|
|
|
## <summary>
|
|
|
|
## The type of the object to be created.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
## <param name="object">
|
|
|
|
## <summary>
|
|
|
|
## The object class of the object being created.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2005-05-12 20:50:09 +00:00
|
|
|
#
|
2006-02-21 18:40:44 +00:00
|
|
|
interface(`files_lock_filetrans',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
type var_t, var_lock_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
allow $1 var_t:dir search_dir_perms;
|
2008-07-23 21:38:39 +00:00
|
|
|
filetrans_pattern($1, var_lock_t, $2, $3)
|
2005-05-12 20:50:09 +00:00
|
|
|
')
|
|
|
|
|
2005-07-08 20:44:57 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Do not audit attempts to get the attributes
|
|
|
|
## of the /var/run directory.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-07-08 20:44:57 +00:00
|
|
|
## Domain to not audit.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-07-08 20:44:57 +00:00
|
|
|
## </param>
|
|
|
|
#
|
2006-01-31 19:21:01 +00:00
|
|
|
interface(`files_dontaudit_getattr_pid_dirs',`
|
2005-07-08 20:44:57 +00:00
|
|
|
gen_require(`
|
|
|
|
type var_run_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
dontaudit $1 var_run_t:dir getattr;
|
|
|
|
')
|
|
|
|
|
2005-04-14 20:18:17 +00:00
|
|
|
########################################
|
2006-05-10 18:09:08 +00:00
|
|
|
## <summary>
|
|
|
|
## Search the contents of runtime process
|
|
|
|
## ID directories (/var/run).
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`files_search_pids',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
type var_t, var_run_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
search_dirs_pattern($1, var_t, var_run_t)
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2005-05-12 20:50:09 +00:00
|
|
|
########################################
|
2005-10-07 19:35:36 +00:00
|
|
|
## <summary>
|
|
|
|
## Do not audit attempts to search
|
|
|
|
## the /var/run directory.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-10-07 19:35:36 +00:00
|
|
|
## Domain to not audit.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-10-07 19:35:36 +00:00
|
|
|
## </param>
|
2005-05-12 20:50:09 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`files_dontaudit_search_pids',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
type var_run_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2007-06-20 19:47:10 +00:00
|
|
|
dontaudit $1 var_run_t:dir search_dir_perms;
|
2005-05-12 20:50:09 +00:00
|
|
|
')
|
|
|
|
|
2005-04-14 20:18:17 +00:00
|
|
|
########################################
|
2006-05-10 18:09:08 +00:00
|
|
|
## <summary>
|
|
|
|
## List the contents of the runtime process
|
|
|
|
## ID directories (/var/run).
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`files_list_pids',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
type var_t, var_run_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
list_dirs_pattern($1, var_t, var_run_t)
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2005-04-25 16:11:21 +00:00
|
|
|
########################################
|
2006-05-10 18:09:08 +00:00
|
|
|
## <summary>
|
|
|
|
## Create an object in the process ID directory, with a private
|
|
|
|
## type using a type transition.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
## <param name="private type">
|
|
|
|
## <summary>
|
|
|
|
## The type of the object to be created.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
## <param name="object">
|
|
|
|
## <summary>
|
|
|
|
## The object class of the object being created.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2005-04-25 16:11:21 +00:00
|
|
|
#
|
2006-02-21 18:40:44 +00:00
|
|
|
interface(`files_pid_filetrans',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
type var_t, var_run_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-10-21 21:35:25 +00:00
|
|
|
allow $1 var_t:dir search_dir_perms;
|
2008-07-23 21:38:39 +00:00
|
|
|
filetrans_pattern($1, var_run_t, $2, $3)
|
2005-04-25 16:11:21 +00:00
|
|
|
')
|
|
|
|
|
2005-05-03 20:23:33 +00:00
|
|
|
########################################
|
2006-05-10 18:09:08 +00:00
|
|
|
## <summary>
|
|
|
|
## Read and write generic process ID files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2005-05-03 20:23:33 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`files_rw_generic_pids',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
type var_t, var_run_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
list_dirs_pattern($1,var_t,var_run_t)
|
2008-07-23 21:38:39 +00:00
|
|
|
rw_files_pattern($1, var_run_t, var_run_t)
|
2005-05-03 20:23:33 +00:00
|
|
|
')
|
|
|
|
|
2005-05-24 15:55:57 +00:00
|
|
|
########################################
|
2005-07-08 20:44:57 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Do not audit attempts to write to daemon runtime data files.
|
2005-07-08 20:44:57 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-03-02 23:41:11 +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-24 15:55:57 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`files_dontaudit_write_all_pids',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
attribute pidfile;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
dontaudit $1 pidfile:file write;
|
2005-05-24 15:55:57 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-07-08 20:44:57 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Do not audit attempts to ioctl daemon runtime data files.
|
2005-07-08 20:44:57 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-03-02 23:41:11 +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-24 15:55:57 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`files_dontaudit_ioctl_all_pids',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
attribute pidfile;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
dontaudit $1 pidfile:file ioctl;
|
2005-05-24 15:55:57 +00:00
|
|
|
')
|
|
|
|
|
2005-05-31 23:02:11 +00:00
|
|
|
########################################
|
2006-05-10 18:09:08 +00:00
|
|
|
## <summary>
|
|
|
|
## Read all process ID files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2006-09-06 22:07:25 +00:00
|
|
|
## <rolecap/>
|
2005-05-31 23:02:11 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`files_read_all_pids',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
attribute pidfile;
|
|
|
|
type var_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
list_dirs_pattern($1, var_t, pidfile)
|
|
|
|
read_files_pattern($1, pidfile, pidfile)
|
2005-05-31 23:02:11 +00:00
|
|
|
')
|
|
|
|
|
2006-01-10 21:03:16 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Mount filesystems on all polyinstantiation
|
|
|
|
## member directories.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-01-10 21:03:16 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2006-01-10 21:03:16 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_mounton_all_poly_members',`
|
|
|
|
gen_require(`
|
|
|
|
attribute polymember;
|
|
|
|
')
|
|
|
|
|
|
|
|
allow $1 polymember:dir mounton;
|
|
|
|
')
|
|
|
|
|
2005-05-03 20:23:33 +00:00
|
|
|
########################################
|
2006-05-10 18:09:08 +00:00
|
|
|
## <summary>
|
|
|
|
## Delete all process IDs.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </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(`files_delete_all_pids',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
attribute pidfile;
|
|
|
|
type var_t, var_run_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
allow $1 var_t:dir search_dir_perms;
|
2005-06-03 12:25:14 +00:00
|
|
|
allow $1 var_run_t:dir rmdir;
|
2006-12-12 20:08:08 +00:00
|
|
|
allow $1 var_run_t:lnk_file delete_lnk_file_perms;
|
2008-07-23 21:38:39 +00:00
|
|
|
delete_files_pattern($1, pidfile, pidfile)
|
|
|
|
delete_fifo_files_pattern($1, pidfile, pidfile)
|
|
|
|
delete_sock_files_pattern($1, pidfile, { pidfile var_run_t })
|
2005-05-03 20:23:33 +00:00
|
|
|
')
|
2005-04-25 16:11:21 +00:00
|
|
|
|
2005-09-19 21:17:45 +00:00
|
|
|
########################################
|
2006-05-10 18:09:08 +00:00
|
|
|
## <summary>
|
|
|
|
## Delete all process ID directories.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2005-09-19 21:17:45 +00:00
|
|
|
#
|
|
|
|
interface(`files_delete_all_pid_dirs',`
|
|
|
|
gen_require(`
|
|
|
|
attribute pidfile;
|
|
|
|
type var_t;
|
|
|
|
')
|
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
allow $1 var_t:dir search_dir_perms;
|
2008-07-23 21:38:39 +00:00
|
|
|
delete_dirs_pattern($1, pidfile, pidfile)
|
2005-09-19 21:17:45 +00:00
|
|
|
')
|
|
|
|
|
2005-05-13 14:37:13 +00:00
|
|
|
########################################
|
2006-05-10 18:09:08 +00:00
|
|
|
## <summary>
|
|
|
|
## Search the contents of generic spool
|
|
|
|
## directories (/var/spool).
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2005-05-13 14:37:13 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`files_search_spool',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
type var_t, var_spool_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
search_dirs_pattern($1, var_t, var_spool_t)
|
2005-05-13 14:37:13 +00:00
|
|
|
')
|
|
|
|
|
2006-01-30 22:51:35 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Do not audit attempts to search generic
|
|
|
|
## spool directories.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-01-30 22:51:35 +00:00
|
|
|
## Domain to not audit.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2006-01-30 22:51:35 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_dontaudit_search_spool',`
|
|
|
|
gen_require(`
|
|
|
|
type var_spool_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
dontaudit $1 var_spool_t:dir search_dir_perms;
|
|
|
|
')
|
|
|
|
|
2005-05-13 14:37:13 +00:00
|
|
|
########################################
|
2006-05-10 18:09:08 +00:00
|
|
|
## <summary>
|
|
|
|
## List the contents of generic spool
|
|
|
|
## (/var/spool) directories.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2005-05-13 14:37:13 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`files_list_spool',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
type var_t, var_spool_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
list_dirs_pattern($1, var_t, var_spool_t)
|
2005-05-13 14:37:13 +00:00
|
|
|
')
|
|
|
|
|
2005-06-28 20:54:49 +00:00
|
|
|
########################################
|
2006-05-10 18:09:08 +00:00
|
|
|
## <summary>
|
|
|
|
## Create, read, write, and delete generic
|
|
|
|
## spool directories (/var/spool).
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2005-06-28 20:54:49 +00:00
|
|
|
#
|
2005-06-29 14:26:41 +00:00
|
|
|
interface(`files_manage_generic_spool_dirs',`
|
2005-06-28 20:54:49 +00:00
|
|
|
gen_require(`
|
|
|
|
type var_t, var_spool_t;
|
|
|
|
')
|
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
allow $1 var_t:dir search_dir_perms;
|
2008-07-23 21:38:39 +00:00
|
|
|
manage_dirs_pattern($1, var_spool_t, var_spool_t)
|
2005-06-28 20:54:49 +00:00
|
|
|
')
|
|
|
|
|
2005-05-25 20:58:21 +00:00
|
|
|
########################################
|
2006-05-10 18:09:08 +00:00
|
|
|
## <summary>
|
|
|
|
## Read generic spool files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2005-05-25 20:58:21 +00:00
|
|
|
#
|
2006-01-31 19:21:01 +00:00
|
|
|
interface(`files_read_generic_spool',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
type var_t, var_spool_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
list_dirs_pattern($1, var_t, var_spool_t)
|
|
|
|
read_files_pattern($1, var_spool_t, var_spool_t)
|
2005-05-25 20:58:21 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2006-05-10 18:09:08 +00:00
|
|
|
## <summary>
|
|
|
|
## Create, read, write, and delete generic
|
|
|
|
## spool files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2005-05-25 20:58:21 +00:00
|
|
|
#
|
2006-01-31 19:21:01 +00:00
|
|
|
interface(`files_manage_generic_spool',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
type var_t, var_spool_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
allow $1 var_t:dir search_dir_perms;
|
2008-07-23 21:38:39 +00:00
|
|
|
manage_files_pattern($1, var_spool_t, var_spool_t)
|
2005-05-25 20:58:21 +00:00
|
|
|
')
|
2005-07-05 20:59:51 +00:00
|
|
|
|
2006-04-12 17:41:09 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Create objects in the spool directory
|
|
|
|
## with a private type with a type transition.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2008-05-15 13:10:34 +00:00
|
|
|
## <param name="file">
|
|
|
|
## <summary>
|
|
|
|
## Type to which the created node will be transitioned.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
## <param name="class">
|
|
|
|
## <summary>
|
|
|
|
## Object class(es) (single or set including {}) for which this
|
|
|
|
## the transition will occur.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2006-04-12 17:41:09 +00:00
|
|
|
#
|
|
|
|
interface(`files_spool_filetrans',`
|
|
|
|
gen_require(`
|
|
|
|
type var_t, var_spool_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
allow $1 var_t:dir search_dir_perms;
|
2008-07-23 21:38:39 +00:00
|
|
|
filetrans_pattern($1, var_spool_t, $2, $3)
|
2006-04-12 17:41:09 +00:00
|
|
|
')
|
|
|
|
|
2006-01-10 21:03:16 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Allow access to manage all polyinstantiated
|
|
|
|
## directories on the system.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-01-10 21:03:16 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2006-01-10 21:03:16 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_polyinstantiate_all',`
|
|
|
|
gen_require(`
|
|
|
|
attribute polydir, polymember, polyparent;
|
|
|
|
type poly_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
# Need to give access to /selinux/member
|
|
|
|
selinux_compute_member($1)
|
|
|
|
|
|
|
|
# Need sys_admin capability for mounting
|
2007-02-16 23:01:42 +00:00
|
|
|
allow $1 self:capability { chown fsetid sys_admin };
|
2006-01-10 21:03:16 +00:00
|
|
|
|
|
|
|
# Need to give access to the directories to be polyinstantiated
|
2006-12-04 20:10:56 +00:00
|
|
|
allow $1 polydir:dir { create getattr search write add_name setattr mounton rmdir };
|
2006-01-10 21:03:16 +00:00
|
|
|
|
|
|
|
# Need to give access to the polyinstantiated subdirectories
|
|
|
|
allow $1 polymember:dir search_dir_perms;
|
|
|
|
|
|
|
|
# Need to give access to parent directories where original
|
|
|
|
# is remounted for polyinstantiation aware programs (like gdm)
|
|
|
|
allow $1 polyparent:dir { getattr mounton };
|
|
|
|
|
|
|
|
# Need to give permission to create directories where applicable
|
|
|
|
allow $1 self:process setfscreate;
|
2006-03-23 19:19:38 +00:00
|
|
|
allow $1 polymember: dir { create setattr relabelto };
|
2006-01-10 21:03:16 +00:00
|
|
|
allow $1 polydir: dir { write add_name };
|
2007-02-16 23:01:42 +00:00
|
|
|
allow $1 polyparent:dir { read write remove_name add_name relabelfrom relabelto };
|
2006-01-10 21:03:16 +00:00
|
|
|
|
|
|
|
# Default type for mountpoints
|
|
|
|
allow $1 poly_t:dir { create mounton };
|
2006-03-23 19:19:38 +00:00
|
|
|
fs_unmount_xattr_fs($1)
|
2007-10-29 18:35:32 +00:00
|
|
|
|
|
|
|
ifdef(`distro_redhat',`
|
|
|
|
# namespace.init
|
|
|
|
files_search_home($1)
|
|
|
|
corecmd_exec_bin($1)
|
|
|
|
seutil_domtrans_setfiles($1)
|
2007-10-29 22:08:34 +00:00
|
|
|
mount_domtrans($1)
|
2007-10-29 18:35:32 +00:00
|
|
|
')
|
2006-01-10 21:03:16 +00:00
|
|
|
')
|
|
|
|
|
2005-07-05 20:59:51 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Unconfined access to files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-07-05 20:59:51 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-07-05 20:59:51 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`files_unconfined',`
|
|
|
|
gen_require(`
|
2006-04-10 21:04:51 +00:00
|
|
|
attribute files_unconfined_type;
|
2006-01-11 15:28:14 +00:00
|
|
|
')
|
|
|
|
|
2006-04-10 21:04:51 +00:00
|
|
|
typeattribute $1 files_unconfined_type;
|
2006-01-11 20:18:56 +00:00
|
|
|
')
|