2005-05-18 21:00:00 +00:00
|
|
|
## <module name="files" layer="system">
|
2005-06-13 19:22:00 +00:00
|
|
|
## <summary>
|
|
|
|
## Basic filesystem types and interfaces.
|
|
|
|
## </summary>
|
|
|
|
## <description>
|
|
|
|
## <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>
|
|
|
|
## </description>
|
2005-04-20 19:07:16 +00:00
|
|
|
|
2005-04-14 20:18:17 +00:00
|
|
|
########################################
|
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
# files_file_type(type)
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_file_type',`
|
2005-06-13 20:47:04 +00:00
|
|
|
gen_require(`$0'_depend)
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-08 13:12:00 +00:00
|
|
|
fs_associate($1)
|
2005-06-10 01:01:13 +00:00
|
|
|
fs_associate_noxattr($1)
|
2005-06-03 12:25:14 +00:00
|
|
|
typeattribute $1 file_type;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_file_type_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
attribute file_type;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2005-05-12 20:50:09 +00:00
|
|
|
########################################
|
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
# files_lock_file(type)
|
2005-05-12 20:50:09 +00:00
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_lock_file',`
|
2005-06-13 20:47:04 +00:00
|
|
|
gen_require(`$0'_depend)
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-13 17:35:46 +00:00
|
|
|
files_file_type($1)
|
2005-06-03 12:25:14 +00:00
|
|
|
typeattribute $1 lockfile;
|
2005-05-12 20:50:09 +00:00
|
|
|
')
|
|
|
|
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_lock_file_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
attribute lockfile;
|
2005-05-12 20:50:09 +00:00
|
|
|
')
|
|
|
|
|
2005-05-11 19:21:40 +00:00
|
|
|
########################################
|
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
# files_mountpoint(type)
|
2005-05-11 19:21:40 +00:00
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_mountpoint',`
|
2005-06-13 20:47:04 +00:00
|
|
|
gen_require(`$0'_depend)
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-13 17:35:46 +00:00
|
|
|
files_file_type($1)
|
2005-06-03 12:25:14 +00:00
|
|
|
typeattribute $1 mountpoint;
|
2005-05-11 19:21:40 +00:00
|
|
|
')
|
|
|
|
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_mountpoint_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
attribute mountpoint;
|
2005-05-11 19:21:40 +00:00
|
|
|
')
|
|
|
|
|
2005-04-28 21:41:09 +00:00
|
|
|
########################################
|
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
# files_pid_file(type)
|
2005-04-28 21:41:09 +00:00
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_pid_file',`
|
2005-06-13 20:47:04 +00:00
|
|
|
gen_require(`$0'_depend)
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-13 17:35:46 +00:00
|
|
|
files_file_type($1)
|
2005-06-03 12:25:14 +00:00
|
|
|
typeattribute $1 pidfile;
|
2005-04-28 21:41:09 +00:00
|
|
|
')
|
|
|
|
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_pid_file_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
attribute pidfile;
|
2005-05-11 19:36:36 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
# files_tmp_file(type)
|
2005-05-11 19:36:36 +00:00
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_tmp_file',`
|
2005-06-13 20:47:04 +00:00
|
|
|
gen_require(`$0'_depend)
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-13 17:35:46 +00:00
|
|
|
files_file_type($1)
|
2005-06-03 12:25:14 +00:00
|
|
|
typeattribute $1 tmpfile;
|
2005-05-11 19:36:36 +00:00
|
|
|
')
|
|
|
|
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_tmp_file_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
attribute tmpfile;
|
2005-04-28 21:41:09 +00:00
|
|
|
')
|
|
|
|
|
2005-05-23 15:49:31 +00:00
|
|
|
########################################
|
2005-06-13 17:35:46 +00:00
|
|
|
## <interface name="files_tmpfs_file">
|
2005-05-23 15:49:31 +00:00
|
|
|
## <description>
|
|
|
|
## Transform the type into a file, for use on a
|
|
|
|
## virtual memory filesystem (tmpfs).
|
|
|
|
## </description>
|
|
|
|
## <parameter name="type">
|
|
|
|
## The type to be transformed.
|
|
|
|
## </parameter>
|
|
|
|
## </interface>
|
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_tmpfs_file',`
|
2005-06-13 20:47:04 +00:00
|
|
|
gen_require(`$0'_depend)
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-13 17:35:46 +00:00
|
|
|
files_file_type($1)
|
2005-06-10 01:01:13 +00:00
|
|
|
fs_associate_tmpfs($1)
|
2005-06-03 12:25:14 +00:00
|
|
|
typeattribute $1 tmpfsfile;
|
2005-05-23 15:49:31 +00:00
|
|
|
')
|
|
|
|
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_tmpfs_file_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
attribute tmpfsfile;
|
2005-05-23 15:49:31 +00:00
|
|
|
')
|
|
|
|
|
2005-04-14 20:18:17 +00:00
|
|
|
########################################
|
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
# files_getattr_all_files(domain)
|
2005-05-25 20:58:21 +00:00
|
|
|
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_getattr_all_files',`
|
2005-06-13 20:47:04 +00:00
|
|
|
gen_require(`$0'_depend)
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
allow $1 file_type:dir { search getattr };
|
|
|
|
allow $1 file_type:file getattr;
|
|
|
|
allow $1 file_type:lnk_file getattr;
|
|
|
|
allow $1 file_type:fifo_file getattr;
|
|
|
|
allow $1 file_type:sock_file getattr;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_getattr_all_files_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
attribute file_type;
|
|
|
|
|
|
|
|
class dir { search getattr };
|
|
|
|
class file getattr;
|
|
|
|
class lnk_file getattr;
|
|
|
|
class fifo_file getattr;
|
|
|
|
class sock_file getattr;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2005-04-28 18:59:01 +00:00
|
|
|
########################################
|
2005-05-25 20:58:21 +00:00
|
|
|
## <interface name="files_relabel_all_files">
|
|
|
|
## <description>
|
|
|
|
## Relabel all files on the filesystem, except
|
|
|
|
## the listed exceptions.
|
|
|
|
## </description>
|
|
|
|
## <parameter name="domain">
|
|
|
|
## The type of the domain perfoming this action.
|
|
|
|
## </parameter>
|
|
|
|
## <parameter name="exception_types" optional="true">
|
|
|
|
## The types to be excluded. Each type or attribute
|
|
|
|
## must be negated by the caller.
|
|
|
|
## </parameter>
|
|
|
|
## </interface>
|
2005-04-28 18:59:01 +00:00
|
|
|
#
|
2005-05-25 20:58:21 +00:00
|
|
|
define(`files_relabel_all_files',`
|
2005-06-13 20:47:04 +00:00
|
|
|
gen_require(`$0'_depend)
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
allow $1 { file_type $2 }:dir { r_dir_perms relabelfrom relabelto };
|
|
|
|
allow $1 { file_type $2 }:file { getattr relabelfrom relabelto };
|
|
|
|
allow $1 { file_type $2 }:lnk_file { getattr relabelfrom relabelto };
|
|
|
|
allow $1 { file_type $2 }:fifo_file { getattr relabelfrom relabelto };
|
|
|
|
allow $1 { file_type $2 }:sock_file { getattr relabelfrom relabelto };
|
|
|
|
allow $1 { file_type $2 }:blk_file { getattr relabelfrom };
|
|
|
|
allow $1 { file_type $2 }:chr_file { getattr relabelfrom };
|
|
|
|
|
|
|
|
# satisfy the assertions:
|
2005-06-13 17:35:46 +00:00
|
|
|
selinux_relabelto_binary_pol($1)
|
2005-05-25 20:58:21 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
define(`files_relabel_all_files_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
attribute file_type;
|
|
|
|
|
|
|
|
class dir { r_dir_perms relabelfrom relabelto };
|
|
|
|
class file { relabelfrom relabelto };
|
|
|
|
class lnk_file { relabelfrom relabelto };
|
|
|
|
class fifo_file { relabelfrom relabelto };
|
|
|
|
class sock_file { relabelfrom relabelto };
|
|
|
|
class blk_file relabelfrom;
|
|
|
|
class chr_file relabelfrom;
|
2005-04-28 18:59:01 +00:00
|
|
|
')
|
|
|
|
|
2005-05-25 20:58:21 +00:00
|
|
|
########################################
|
|
|
|
## <interface name="files_manage_all_files">
|
|
|
|
## <description>
|
|
|
|
## Manage all files on the filesystem, except
|
|
|
|
## the listed exceptions.
|
|
|
|
## </description>
|
|
|
|
## <parameter name="domain">
|
|
|
|
## The type of the domain perfoming this action.
|
|
|
|
## </parameter>
|
|
|
|
## <parameter name="exception_types" optional="true">
|
|
|
|
## The types to be excluded. Each type or attribute
|
|
|
|
## must be negated by the caller.
|
|
|
|
## </parameter>
|
|
|
|
## </interface>
|
|
|
|
#
|
|
|
|
define(`files_manage_all_files',`
|
2005-06-13 20:47:04 +00:00
|
|
|
gen_require(`$0'_depend)
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-09 14:50:48 +00:00
|
|
|
allow $1 { file_type $2 }:dir create_dir_perms;
|
|
|
|
allow $1 { file_type $2 }:file create_file_perms;
|
|
|
|
allow $1 { file_type $2 }:lnk_file create_lnk_perms;
|
|
|
|
allow $1 { file_type $2 }:fifo_file create_file_perms;
|
|
|
|
allow $1 { file_type $2 }:sock_file create_file_perms;
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
# satisfy the assertions:
|
2005-06-13 17:35:46 +00:00
|
|
|
selinux_write_binary_pol($1)
|
2005-06-03 12:25:14 +00:00
|
|
|
bootloader_manage_kernel_modules($1)
|
2005-05-25 20:58:21 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
define(`files_manage_all_files_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
attribute file_type;
|
|
|
|
|
2005-06-09 14:50:48 +00:00
|
|
|
class dir create_dir_perms;
|
|
|
|
class file create_file_perms;
|
|
|
|
class lnk_file create_lnk_perms;
|
|
|
|
class fifo_file create_file_perms;
|
|
|
|
class sock_file create_file_perms;
|
2005-05-25 20:58:21 +00:00
|
|
|
')
|
|
|
|
|
2005-04-14 20:18:17 +00:00
|
|
|
########################################
|
2005-04-26 21:12:32 +00:00
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
# files_search_all_dirs(domain)
|
2005-04-26 21:12:32 +00:00
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_search_all_dirs',`
|
2005-06-13 20:47:04 +00:00
|
|
|
gen_require(`$0'_depend)
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
allow $1 file_type:dir search;
|
2005-04-26 21:12:32 +00:00
|
|
|
')
|
|
|
|
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_search_all_dirs_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
attribute file_type;
|
|
|
|
|
|
|
|
class dir search;
|
2005-04-26 21:12:32 +00:00
|
|
|
')
|
|
|
|
|
2005-05-11 19:05:15 +00:00
|
|
|
########################################
|
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
# files_list_all_dirs(domain)
|
2005-05-11 19:05:15 +00:00
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_list_all_dirs',`
|
2005-06-13 20:47:04 +00:00
|
|
|
gen_require(`$0'_depend)
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
allow $1 file_type:dir r_dir_perms;
|
2005-05-11 19:05:15 +00:00
|
|
|
')
|
|
|
|
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_list_all_dirs_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
attribute file_type;
|
|
|
|
|
|
|
|
class dir r_dir_perms;
|
2005-05-11 19:05:15 +00:00
|
|
|
')
|
|
|
|
|
2005-05-02 18:40:42 +00:00
|
|
|
########################################
|
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
# files_dontaudit_search_all_dirs(domain)
|
2005-05-02 18:40:42 +00:00
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_dontaudit_search_all_dirs',`
|
2005-06-13 20:47:04 +00:00
|
|
|
gen_require(`$0'_depend)
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
dontaudit $1 file_type:dir search;
|
2005-05-02 18:40:42 +00:00
|
|
|
')
|
|
|
|
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_dontaudit_search_all_dirs_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
attribute file_type;
|
|
|
|
|
|
|
|
class dir search;
|
2005-05-02 18:40:42 +00:00
|
|
|
')
|
|
|
|
|
2005-05-24 15:55:57 +00:00
|
|
|
#######################################
|
|
|
|
#
|
2005-06-08 13:12:00 +00:00
|
|
|
# files_relabelto_all_file_type_fs(domain)
|
2005-05-24 15:55:57 +00:00
|
|
|
#
|
2005-06-08 13:12:00 +00:00
|
|
|
define(`files_relabelto_all_file_type_fs',`
|
2005-06-13 20:47:04 +00:00
|
|
|
gen_require(`$0'_depend)
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
allow $1 file_type:filesystem relabelto;
|
2005-05-24 15:55:57 +00:00
|
|
|
')
|
|
|
|
|
2005-06-08 13:12:00 +00:00
|
|
|
define(`files_relabelto_all_file_type_fs_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
attribute file_type;
|
|
|
|
|
|
|
|
filesystem relabelto;
|
2005-05-24 15:55:57 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
#######################################
|
|
|
|
#
|
2005-06-08 13:12:00 +00:00
|
|
|
# files_mount_all_file_type_fs(domain)
|
2005-05-24 15:55:57 +00:00
|
|
|
#
|
2005-06-08 13:12:00 +00:00
|
|
|
define(`files_mount_all_file_type_fs',`
|
2005-06-13 20:47:04 +00:00
|
|
|
gen_require(`$0'_depend)
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
allow $1 file_type:filesystem mount;
|
2005-05-24 15:55:57 +00:00
|
|
|
')
|
|
|
|
|
2005-06-08 13:12:00 +00:00
|
|
|
define(`files_mount_all_file_type_fs_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
attribute file_type;
|
|
|
|
|
|
|
|
filesystem mount;
|
2005-05-24 15:55:57 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
#######################################
|
|
|
|
#
|
2005-06-08 13:12:00 +00:00
|
|
|
# files_unmount_all_file_type_fs(domain)
|
2005-05-24 15:55:57 +00:00
|
|
|
#
|
2005-06-08 13:12:00 +00:00
|
|
|
define(`files_unmount_all_file_type_fs',`
|
2005-06-13 20:47:04 +00:00
|
|
|
gen_require(`$0'_depend)
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
allow $1 file_type:filesystem mount;
|
2005-05-24 15:55:57 +00:00
|
|
|
')
|
|
|
|
|
2005-06-08 13:12:00 +00:00
|
|
|
define(`files_unmount_all_file_type_fs_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
attribute file_type;
|
|
|
|
|
|
|
|
filesystem mount;
|
2005-05-24 15:55:57 +00:00
|
|
|
')
|
|
|
|
|
2005-04-28 21:41:09 +00:00
|
|
|
########################################
|
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
# files_mounton_all_mountpoints(domain)
|
2005-04-28 21:41:09 +00:00
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_mounton_all_mountpoints',`
|
2005-06-13 20:47:04 +00:00
|
|
|
gen_require(`$0'_depend)
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
allow $1 mountpoint:dir { getattr search mounton };
|
2005-04-28 21:41:09 +00:00
|
|
|
')
|
|
|
|
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_mounton_all_mountpoints_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
attribute mountpoint;
|
|
|
|
|
|
|
|
class dir { getattr search mounton };
|
2005-04-28 21:41:09 +00:00
|
|
|
')
|
|
|
|
|
2005-04-28 18:59:01 +00:00
|
|
|
########################################
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
# files_list_root(domain)
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_list_root',`
|
2005-06-13 20:47:04 +00:00
|
|
|
gen_require(`$0'_depend)
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
allow $1 root_t:dir r_dir_perms;
|
2005-06-09 14:50:48 +00:00
|
|
|
allow $1 root_t:lnk_file r_file_perms;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_list_root_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
type root_t;
|
|
|
|
|
|
|
|
class dir r_dir_perms;
|
2005-06-09 14:50:48 +00:00
|
|
|
class lnk_file r_file_perms;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-06-13 17:35:46 +00:00
|
|
|
## <interface name="files_create_root">
|
|
|
|
## <description>
|
|
|
|
## Create an object in the root directory, with a private
|
|
|
|
## type. If no object class is specified, the
|
|
|
|
## default is file.
|
|
|
|
## </description>
|
|
|
|
## <parameter name="domain">
|
|
|
|
## The type of the process performing this action.
|
|
|
|
## </parameter>
|
|
|
|
## <parameter name="private type" optional="true">
|
|
|
|
## The type of the object to be created. If no type
|
|
|
|
## is specified, the type of the root directory will
|
|
|
|
## be used.
|
|
|
|
## </parameter>
|
|
|
|
## <parameter name="object" optional="true">
|
|
|
|
## The object class of the object being created. If
|
|
|
|
## no class is specified, file will be used.
|
|
|
|
## </parameter>
|
|
|
|
## </interface>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_create_root',`
|
2005-06-13 20:47:04 +00:00
|
|
|
gen_require(`$0'_depend)
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-13 17:35:46 +00:00
|
|
|
allow $1 root_t:dir rw_dir_perms;
|
|
|
|
|
|
|
|
ifelse(`$3',`',`
|
|
|
|
ifelse(`$2',`',`
|
|
|
|
allow $1 root_t:file create_file_perms;
|
|
|
|
',`
|
|
|
|
type_transition $1 root_t:file $2;
|
|
|
|
')
|
|
|
|
',`
|
|
|
|
ifelse(`$2',`',`
|
|
|
|
allow $1 root_t:$3 create_file_perms;
|
|
|
|
',`
|
|
|
|
type_transition $1 root_t:$3 $2;
|
|
|
|
')
|
|
|
|
')
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_create_root_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
type root_t;
|
|
|
|
|
2005-06-13 17:35:46 +00:00
|
|
|
class dir create_dir_perms;
|
|
|
|
class file create_file_perms;
|
|
|
|
class lnk_file create_lnk_perms;
|
|
|
|
class fifo_file create_file_perms;
|
|
|
|
class sock_file create_file_perms;
|
|
|
|
class blk_file create_file_perms;
|
|
|
|
class chr_file create_file_perms;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2005-05-02 18:40:42 +00:00
|
|
|
########################################
|
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
# files_dontaudit_read_root_file(domain)
|
2005-05-02 18:40:42 +00:00
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_dontaudit_read_root_file',`
|
2005-06-13 20:47:04 +00:00
|
|
|
gen_require(`$0'_depend)
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
dontaudit $1 root_t:file read;
|
2005-05-02 18:40:42 +00:00
|
|
|
')
|
|
|
|
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_dontaudit_read_root_file_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
type root_t;
|
|
|
|
|
|
|
|
class file read;
|
2005-05-02 18:40:42 +00:00
|
|
|
')
|
|
|
|
|
2005-04-19 18:57:13 +00:00
|
|
|
########################################
|
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
# files_dontaudit_rw_root_file(domain)
|
2005-04-19 18:57:13 +00:00
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_dontaudit_rw_root_file',`
|
2005-06-13 20:47:04 +00:00
|
|
|
gen_require(`$0'_depend)
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
dontaudit $1 root_t:file { read write };
|
2005-04-19 18:57:13 +00:00
|
|
|
')
|
|
|
|
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_dontaudit_rw_root_file_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
type root_t;
|
|
|
|
|
|
|
|
class file { read write };
|
2005-04-19 18:57:13 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
# files_dontaudit_rw_root_chr_dev(domain)
|
2005-04-19 18:57:13 +00:00
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_dontaudit_rw_root_chr_dev',`
|
2005-06-13 20:47:04 +00:00
|
|
|
gen_require(`$0'_depend)
|
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-06-13 17:35:46 +00:00
|
|
|
define(`files_dontaudit_rw_root_chr_dev_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
type root_t;
|
|
|
|
|
|
|
|
class chr_file { read write };
|
2005-04-19 18:57:13 +00:00
|
|
|
')
|
|
|
|
|
2005-04-14 20:18:17 +00:00
|
|
|
########################################
|
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
# files_delete_root_dir_entry(domain)
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_delete_root_dir_entry',`
|
2005-06-13 20:47:04 +00:00
|
|
|
gen_require(`$0'_depend)
|
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-06-13 17:35:46 +00:00
|
|
|
define(`files_delete_root_dir_entry_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
type root_t;
|
|
|
|
|
2005-06-09 14:50:48 +00:00
|
|
|
class dir rw_dir_perms;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2005-04-28 21:41:09 +00:00
|
|
|
########################################
|
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
# files_unmount_rootfs(domain)
|
2005-04-28 21:41:09 +00:00
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_unmount_rootfs',`
|
2005-06-13 20:47:04 +00:00
|
|
|
gen_require(`$0'_depend)
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
allow $1 root_t:filesystem unmount;
|
2005-04-28 21:41:09 +00:00
|
|
|
')
|
|
|
|
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_unmount_rootfs_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
type root_t;
|
|
|
|
|
|
|
|
class filesystem unmount;
|
2005-04-28 21:41:09 +00:00
|
|
|
')
|
|
|
|
|
2005-05-11 16:48:10 +00:00
|
|
|
########################################
|
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
# files_search_etc(domain)
|
2005-05-11 16:48:10 +00:00
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_search_etc',`
|
2005-06-13 20:47:04 +00:00
|
|
|
gen_require(`$0'_depend)
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
allow $1 etc_t:dir search;
|
2005-05-11 16:48:10 +00:00
|
|
|
')
|
|
|
|
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_search_etc_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
type etc_t;
|
|
|
|
|
|
|
|
class dir search;
|
2005-05-11 16:48:10 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
# files_read_generic_etc_files_directory(domain)
|
2005-05-11 16:48:10 +00:00
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_read_generic_etc_files_directory',`
|
2005-06-13 20:47:04 +00:00
|
|
|
gen_require(`$0'_depend)
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-09 14:50:48 +00:00
|
|
|
allow $1 etc_t:dir r_dir_perms;
|
2005-05-11 16:48:10 +00:00
|
|
|
')
|
|
|
|
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_read_generic_etc_files_directory_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
type etc_t;
|
|
|
|
|
2005-06-09 14:50:48 +00:00
|
|
|
class dir r_dir_perms;
|
2005-05-11 16:48:10 +00:00
|
|
|
')
|
|
|
|
|
2005-04-14 20:18:17 +00:00
|
|
|
########################################
|
2005-06-09 17:23:53 +00:00
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
# files_read_generic_etc_files(domain)
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_read_generic_etc_files',`
|
2005-06-13 20:47:04 +00:00
|
|
|
gen_require(`$0'_depend)
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-09 14:50:48 +00:00
|
|
|
allow $1 etc_t:dir r_dir_perms;
|
|
|
|
allow $1 etc_t:file r_file_perms;
|
|
|
|
allow $1 etc_t:lnk_file r_file_perms;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_read_generic_etc_files_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
type etc_t;
|
|
|
|
|
2005-06-09 14:50:48 +00:00
|
|
|
class dir r_dir_perms;
|
|
|
|
class file r_file_perms;
|
|
|
|
class lnk_file r_file_perms;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
# files_rw_generic_etc_files(domain)
|
2005-05-04 19:15:13 +00:00
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_rw_generic_etc_files',`
|
2005-06-13 20:47:04 +00:00
|
|
|
gen_require(`$0'_depend)
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-09 14:50:48 +00:00
|
|
|
allow $1 etc_t:dir r_dir_perms;
|
|
|
|
allow $1 etc_t:file rw_file_perms;
|
|
|
|
allow $1 etc_t:lnk_file r_file_perms;
|
2005-05-04 19:15:13 +00:00
|
|
|
')
|
|
|
|
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_rw_generic_etc_files_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
type etc_t;
|
|
|
|
|
2005-06-09 14:50:48 +00:00
|
|
|
class dir r_dir_perms;
|
|
|
|
class file rw_file_perms;
|
|
|
|
class lnk_file r_file_perms;
|
2005-05-04 19:15:13 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
# files_manage_generic_etc_files(domain)
|
2005-05-04 19:15:13 +00:00
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_manage_generic_etc_files',`
|
2005-06-13 20:47:04 +00:00
|
|
|
gen_require(`$0'_depend)
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-09 14:50:48 +00:00
|
|
|
allow $1 etc_t:dir rw_dir_perms;
|
|
|
|
allow $1 etc_t:file create_file_perms;
|
|
|
|
allow $1 etc_t:lnk_file r_file_perms;
|
2005-05-04 19:15:13 +00:00
|
|
|
')
|
|
|
|
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_manage_generic_etc_files_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
type etc_t;
|
|
|
|
|
2005-06-09 14:50:48 +00:00
|
|
|
class dir rw_dir_perms;
|
|
|
|
class file create_file_perms;
|
|
|
|
class lnk_file r_file_perms;
|
2005-05-04 19:15:13 +00:00
|
|
|
')
|
|
|
|
|
2005-05-23 15:49:31 +00:00
|
|
|
########################################
|
2005-06-13 17:35:46 +00:00
|
|
|
## <interface name="files_delete_generic_etc_files">
|
2005-05-23 15:49:31 +00:00
|
|
|
## <description>
|
|
|
|
## Delete system configuration files in /etc.
|
|
|
|
## </description>
|
|
|
|
## <parameter name="domain">
|
|
|
|
## The type of the process performing this action.
|
|
|
|
## </parameter>
|
|
|
|
## </interface>
|
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_delete_generic_etc_files',`
|
2005-06-13 20:47:04 +00:00
|
|
|
gen_require(`$0'_depend)
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-09 14:50:48 +00:00
|
|
|
allow $1 etc_t:dir rw_dir_perms;
|
2005-06-03 12:25:14 +00:00
|
|
|
allow $1 etc_t:file unlink;
|
2005-05-23 15:49:31 +00:00
|
|
|
')
|
|
|
|
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_delete_generic_etc_files_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
type etc_t;
|
|
|
|
|
2005-06-09 14:50:48 +00:00
|
|
|
class dir rw_dir_perms;
|
2005-06-03 12:25:14 +00:00
|
|
|
class file unlink;
|
2005-05-23 15:49:31 +00:00
|
|
|
')
|
|
|
|
|
2005-05-04 19:15:13 +00:00
|
|
|
########################################
|
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
# files_exec_generic_etc_files(domain)
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_exec_generic_etc_files',`
|
2005-06-13 20:47:04 +00:00
|
|
|
gen_require(`$0'_depend)
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-09 14:50:48 +00:00
|
|
|
allow $1 etc_t:dir r_dir_perms;
|
|
|
|
allow $1 etc_t:lnk_file r_file_perms;
|
|
|
|
can_exec($1,etc_t)
|
|
|
|
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_exec_generic_etc_files_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
type etc_t;
|
|
|
|
|
2005-06-09 14:50:48 +00:00
|
|
|
class dir r_dir_perms;
|
|
|
|
class lnk_file r_file_perms;
|
2005-06-03 12:25:14 +00:00
|
|
|
class file { getattr read execute execute_no_trans };
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
2005-06-03 12:25:14 +00:00
|
|
|
# files_create_boot_flag(domain)
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
|
|
|
# /halt, /.autofsck, etc
|
|
|
|
#
|
|
|
|
define(`files_create_boot_flag',`
|
2005-06-13 20:47:04 +00:00
|
|
|
gen_require(`$0'_depend)
|
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-06-03 12:25:14 +00:00
|
|
|
allow $1 etc_runtime_t:file { create read write setattr unlink };
|
|
|
|
type_transition $1 root_t:file etc_runtime_t;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
define(`files_create_boot_flag_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
type root_t, etc_runtime_t;
|
|
|
|
|
2005-06-09 14:50:48 +00:00
|
|
|
class dir rw_dir_perms;
|
|
|
|
class file { create read write setattr unlink};
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
# files_manage_etc_runtime_files(type)
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_manage_etc_runtime_files',`
|
2005-06-13 20:47:04 +00:00
|
|
|
gen_require(`$0'_depend)
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-09 14:50:48 +00:00
|
|
|
allow $1 etc_t:dir rw_dir_perms;
|
|
|
|
allow $1 etc_runtime_t:file create_file_perms;
|
2005-06-03 12:25:14 +00:00
|
|
|
type_transition $1 etc_t:file etc_runtime_t;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_manage_etc_runtime_files_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
type etc_t, etc_runtime_t;
|
|
|
|
|
2005-06-09 14:50:48 +00:00
|
|
|
class dir rw_dir_perms;
|
|
|
|
class file create_file_perms;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
# files_read_etc_runtime_files(domain)
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_read_etc_runtime_files',`
|
2005-06-13 20:47:04 +00:00
|
|
|
gen_require(`$0'_depend)
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-09 14:50:48 +00:00
|
|
|
allow $1 etc_t:dir r_dir_perms;
|
|
|
|
allow $1 etc_runtime_t:file r_file_perms;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_read_etc_runtime_files_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
type etc_t, etc_runtime_t;
|
|
|
|
|
2005-06-09 14:50:48 +00:00
|
|
|
class dir r_dir_perms;
|
|
|
|
class file r_file_perms;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
# files_create_etc_config(domain,privatetype,[class(es)])
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_create_etc_config',`
|
2005-06-13 20:47:04 +00:00
|
|
|
gen_require(`$0'_depend)
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
allow $1 etc_t:dir rw_dir_perms;
|
|
|
|
ifelse(`$3',`',`
|
|
|
|
type_transition $1 etc_t:file $2;
|
|
|
|
',`
|
|
|
|
type_transition $1 etc_t:$3 $2;
|
|
|
|
')
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_create_etc_config_depend',`
|
2005-04-14 20:18:17 +00:00
|
|
|
type etc_t;
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
class dir rw_dir_perms;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2005-06-01 13:51:54 +00:00
|
|
|
########################################
|
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
# files_rw_isid_type_dir(domain)
|
2005-06-01 13:51:54 +00:00
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_rw_isid_type_dir',`
|
2005-06-13 20:47:04 +00:00
|
|
|
gen_require(`$0'_depend)
|
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-06-13 17:35:46 +00:00
|
|
|
define(`files_rw_isid_type_dir_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
type file_t;
|
|
|
|
|
|
|
|
class dir rw_dir_perms;
|
2005-06-01 13:51:54 +00:00
|
|
|
')
|
|
|
|
|
2005-05-31 21:25:45 +00:00
|
|
|
########################################
|
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
# files_dontaudit_getattr_isid_type_dir(domain)
|
2005-05-31 21:25:45 +00:00
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_dontaudit_getattr_isid_type_dir',`
|
2005-06-13 20:47:04 +00:00
|
|
|
gen_require(`$0'_depend)
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
dontaudit $1 file_t:dir search;
|
2005-05-31 21:25:45 +00:00
|
|
|
')
|
|
|
|
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_dontaudit_getattr_isid_type_dir_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
type file_t;
|
|
|
|
|
|
|
|
class dir search;
|
2005-05-31 21:25:45 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
# files_dontaudit_search_isid_type_dir(domain)
|
2005-05-31 21:25:45 +00:00
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_dontaudit_search_isid_type_dir',`
|
2005-06-13 20:47:04 +00:00
|
|
|
gen_require(`$0'_depend)
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
dontaudit $1 file_t:dir search;
|
2005-05-31 21:25:45 +00:00
|
|
|
')
|
|
|
|
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_dontaudit_search_isid_type_dir_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
type file_t;
|
|
|
|
|
|
|
|
class dir search;
|
2005-05-31 21:25:45 +00:00
|
|
|
')
|
|
|
|
|
2005-04-14 20:18:17 +00:00
|
|
|
########################################
|
2005-06-13 17:35:46 +00:00
|
|
|
## <interface name="files_list_home">
|
2005-05-19 21:06:06 +00:00
|
|
|
## <description>
|
|
|
|
## Get listing home home directories.
|
|
|
|
## </description>
|
|
|
|
## <parameter name="domain">
|
|
|
|
## The type of the process performing this action.
|
|
|
|
## </parameter>
|
|
|
|
## </interface>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_list_home',`
|
2005-06-13 20:47:04 +00:00
|
|
|
gen_require(`$0'_depend)
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-09 14:50:48 +00:00
|
|
|
allow $1 home_root_t:dir r_dir_perms;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_list_home_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
type home_root_t;
|
|
|
|
|
2005-06-09 14:50:48 +00:00
|
|
|
class dir r_dir_perms;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2005-05-26 20:38:45 +00:00
|
|
|
########################################
|
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
# files_list_mnt(domain)
|
2005-05-26 20:38:45 +00:00
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_list_mnt',`
|
2005-06-13 20:47:04 +00:00
|
|
|
gen_require(`$0'_depend)
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-09 14:50:48 +00:00
|
|
|
allow $1 mnt_t:dir r_dir_perms;
|
2005-05-26 20:38:45 +00:00
|
|
|
')
|
|
|
|
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_read_etc_runtime_files_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
type mnt_t;
|
|
|
|
|
2005-06-09 14:50:48 +00:00
|
|
|
class dir r_dir_perms;
|
2005-05-26 20:38:45 +00:00
|
|
|
')
|
|
|
|
|
2005-04-14 20:18:17 +00:00
|
|
|
########################################
|
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
# files_create_tmp_files(domain,private_type,[object class(es)])
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_create_tmp_files',`
|
2005-06-13 20:47:04 +00:00
|
|
|
gen_require(`$0'_depend)
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-09 14:50:48 +00:00
|
|
|
allow $1 tmp_t:dir rw_dir_perms;
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
ifelse(`$3',`',`
|
|
|
|
type_transition $1 tmp_t:file $2;
|
|
|
|
',`
|
|
|
|
type_transition $1 tmp_t:$3 $2;
|
|
|
|
')
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_create_tmp_files_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
type tmp_t;
|
|
|
|
|
2005-06-09 14:50:48 +00:00
|
|
|
class dir rw_dir_perms;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
# files_delete_all_tmp_files(domain)
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_delete_all_tmp_files',`
|
2005-06-13 20:47:04 +00:00
|
|
|
gen_require(`$0'_depend)
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
allow $1 tmpfile:dir { getattr search read write add_name remove_name rmdir };
|
|
|
|
allow $1 tmpfile:file { getattr unlink };
|
|
|
|
allow $1 tmpfile:lnk_file { getattr unlink };
|
|
|
|
allow $1 tmpfile:fifo_file { getattr unlink };
|
|
|
|
allow $1 tmpfile:sock_file { getattr unlink };
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_delete_all_tmp_files_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
attribute tmpfile;
|
|
|
|
|
|
|
|
class dir { getattr search read write add_name remove_name rmdir };
|
|
|
|
class file { getattr unlink };
|
|
|
|
class lnk_file { getattr unlink };
|
|
|
|
class fifo_file { getattr unlink };
|
|
|
|
class sock_file { getattr unlink };
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2005-05-25 20:58:21 +00:00
|
|
|
########################################
|
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
# files_search_usr(domain)
|
2005-05-25 20:58:21 +00:00
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_search_usr',`
|
2005-06-13 20:47:04 +00:00
|
|
|
gen_require(`$0'_depend)
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
allow $1 usr_t:dir search;
|
2005-05-25 20:58:21 +00:00
|
|
|
')
|
|
|
|
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_search_usr_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
type usr_t;
|
|
|
|
|
|
|
|
class dir search;
|
2005-05-25 20:58:21 +00:00
|
|
|
')
|
|
|
|
|
2005-04-14 20:18:17 +00:00
|
|
|
########################################
|
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
# files_read_usr_files(domain)
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_read_usr_files',`
|
2005-06-13 20:47:04 +00:00
|
|
|
gen_require(`$0'_depend)
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-09 14:50:48 +00:00
|
|
|
allow $1 usr_t:dir r_dir_perms;
|
|
|
|
allow $1 usr_t:{ file lnk_file } r_file_perms;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_read_usr_files_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
type usr_t;
|
|
|
|
|
2005-06-09 14:50:48 +00:00
|
|
|
class dir r_dir_perms;
|
|
|
|
class file r_file_perms;
|
|
|
|
class lnk_file r_file_perms;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2005-05-19 21:06:06 +00:00
|
|
|
########################################
|
2005-06-13 17:35:46 +00:00
|
|
|
## <interface name="files_exec_usr_files">
|
2005-05-19 21:06:06 +00:00
|
|
|
## <description>
|
|
|
|
## Execute programs in /usr/src in the caller domain.
|
|
|
|
## </description>
|
|
|
|
## <parameter name="domain">
|
|
|
|
## The type of the process performing this action.
|
|
|
|
## </parameter>
|
|
|
|
## </interface>
|
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_exec_usr_files',`
|
2005-06-13 20:47:04 +00:00
|
|
|
gen_require(`$0'_depend)
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
allow $1 usr_t:dir search;
|
2005-06-09 14:50:48 +00:00
|
|
|
allow $1 src_t:dir r_dir_perms;
|
|
|
|
allow $1 src_t:lnk_file r_file_perms;
|
|
|
|
can_exec($1,src_t)
|
|
|
|
|
2005-05-19 21:06:06 +00:00
|
|
|
')
|
|
|
|
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_read_usr_src_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
type usr_t, src_t;
|
|
|
|
|
2005-06-09 14:50:48 +00:00
|
|
|
class dir r_dir_perms;
|
2005-06-03 12:25:14 +00:00
|
|
|
class file { getattr read execute execute_no_trans };
|
2005-06-09 14:50:48 +00:00
|
|
|
class lnk_file r_file_perms;
|
2005-05-19 21:06:06 +00:00
|
|
|
')
|
|
|
|
|
2005-04-14 20:18:17 +00:00
|
|
|
########################################
|
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
# files_read_usr_src(domain)
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_read_usr_src',`
|
2005-06-13 20:47:04 +00:00
|
|
|
gen_require(`$0'_depend)
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
allow $1 usr_t:dir search;
|
2005-06-09 14:50:48 +00:00
|
|
|
allow $1 src_t:dir r_dir_perms;
|
|
|
|
allow $1 src_t:{ file lnk_file } r_file_perms;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_read_usr_src_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
type usr_t, src_t;
|
|
|
|
|
2005-06-09 14:50:48 +00:00
|
|
|
class dir r_dir_perms;
|
|
|
|
class file r_file_perms;
|
|
|
|
class lnk_file r_file_perms;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
# files_search_var(domain)
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_search_var',`
|
2005-06-13 20:47:04 +00:00
|
|
|
gen_require(`$0'_depend)
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
allow $1 var_t:dir search;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_search_var_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
type var_t;
|
|
|
|
|
|
|
|
class dir search;
|
2005-05-05 17:44:11 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
# files_dontaudit_search_var(domain)
|
2005-05-05 17:44:11 +00:00
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_dontaudit_search_var',`
|
2005-06-13 20:47:04 +00:00
|
|
|
gen_require(`$0'_depend)
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
dontaudit $1 var_t:dir search;
|
2005-05-05 17:44:11 +00:00
|
|
|
')
|
|
|
|
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_dontaudit_search_var_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
type var_t;
|
|
|
|
|
|
|
|
class dir search;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
# files_manage_urandom_seed(domain)
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_manage_urandom_seed',`
|
2005-06-13 20:47:04 +00:00
|
|
|
gen_require(`$0'_depend)
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
allow $1 var_t:dir search;
|
2005-06-10 01:01:13 +00:00
|
|
|
allow $1 var_lib_t:dir rw_dir_perms;
|
2005-06-03 12:25:14 +00:00
|
|
|
allow $1 var_lib_t:file { getattr create read write setattr unlink };
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_manage_urandom_seed_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
type var_t, var_lib_t;
|
|
|
|
|
2005-06-09 14:50:48 +00:00
|
|
|
class dir rw_file_perms;
|
2005-06-03 12:25:14 +00:00
|
|
|
class file { getattr create read write setattr unlink };
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2005-05-24 15:55:57 +00:00
|
|
|
########################################
|
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
# files_getattr_generic_lock_files(domain)
|
2005-05-24 15:55:57 +00:00
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_getattr_generic_lock_files',`
|
2005-06-13 20:47:04 +00:00
|
|
|
gen_require(`$0'_depend)
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-09 14:50:48 +00:00
|
|
|
allow $1 var_lock_t:dir r_dir_perms;
|
2005-06-03 12:25:14 +00:00
|
|
|
allow $1 var_lock_t:file getattr;
|
2005-05-24 15:55:57 +00:00
|
|
|
')
|
|
|
|
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_getattr_generic_lock_files_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
type var_lock_t;
|
|
|
|
|
2005-06-09 14:50:48 +00:00
|
|
|
class dir r_dir_perms;
|
2005-06-03 12:25:14 +00:00
|
|
|
class file getattr;
|
2005-05-24 15:55:57 +00:00
|
|
|
')
|
|
|
|
|
2005-04-14 20:18:17 +00:00
|
|
|
########################################
|
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
# files_manage_generic_lock_files(domain)
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_manage_generic_lock_files',`
|
2005-06-13 20:47:04 +00:00
|
|
|
gen_require(`$0'_depend)
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
allow $1 var_lock_t:dir { getattr search create read write setattr add_name remove_name rmdir };
|
|
|
|
allow $1 var_lock_t:file { getattr create read write setattr unlink };
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_manage_generic_lock_files_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
type var_lock_t;
|
|
|
|
|
|
|
|
class dir { getattr search create read write setattr add_name remove_name rmdir };
|
|
|
|
class file { getattr create read write setattr unlink };
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
# files_delete_all_lock_files(domain)
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_delete_all_lock_files',`
|
2005-06-13 20:47:04 +00:00
|
|
|
gen_require(`$0'_depend)
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-10 01:01:13 +00:00
|
|
|
allow $1 lockfile:dir rw_dir_perms;
|
2005-06-03 12:25:14 +00:00
|
|
|
allow $1 lockfile:file { getattr unlink };
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_delete_all_lock_files_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
attribute lockfile;
|
|
|
|
|
2005-06-09 14:50:48 +00:00
|
|
|
class dir rw_dir_perms;
|
2005-06-03 12:25:14 +00:00
|
|
|
class file { getattr unlink };
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2005-05-12 20:50:09 +00:00
|
|
|
########################################
|
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
# files_create_lock_file(domain,private_type,[object class(es)])
|
2005-05-12 20:50:09 +00:00
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_create_lock_file',`
|
2005-06-13 20:47:04 +00:00
|
|
|
gen_require(`$0'_depend)
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
allow $1 var_t:dir search;
|
|
|
|
allow $1 var_lock_t:dir rw_dir_perms;
|
|
|
|
|
|
|
|
ifelse(`$3',`',`
|
|
|
|
type_transition $1 var_lock_t:file $2;
|
|
|
|
',`
|
|
|
|
type_transition $1 var_lock_t:$3 $2;
|
|
|
|
')
|
2005-05-12 20:50:09 +00:00
|
|
|
')
|
|
|
|
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_create_lock_file_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
type var_t, var_lock_t;
|
|
|
|
|
|
|
|
class dir rw_dir_perms;
|
2005-05-12 20:50:09 +00:00
|
|
|
')
|
|
|
|
|
2005-04-14 20:18:17 +00:00
|
|
|
########################################
|
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
# files_search_pids(domain)
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_search_pids',`
|
2005-06-13 20:47:04 +00:00
|
|
|
gen_require(`$0'_depend)
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
allow $1 var_t:dir search;
|
|
|
|
allow $1 var_run_t:dir search;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_search_pids_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
type var_t, var_run_t;
|
|
|
|
|
|
|
|
class dir search;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2005-05-12 20:50:09 +00:00
|
|
|
########################################
|
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
# files_dontaudit_search_pids(domain)
|
2005-05-12 20:50:09 +00:00
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_dontaudit_search_pids',`
|
2005-06-13 20:47:04 +00:00
|
|
|
gen_require(`$0'_depend)
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
allow $1 var_run_t:dir search;
|
2005-05-12 20:50:09 +00:00
|
|
|
')
|
|
|
|
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_dontaudit_search_pids_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
type var_run_t;
|
|
|
|
|
|
|
|
class dir search;
|
2005-05-12 20:50:09 +00:00
|
|
|
')
|
|
|
|
|
2005-04-14 20:18:17 +00:00
|
|
|
########################################
|
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
# files_list_pids(domain)
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_list_pids',`
|
2005-06-13 20:47:04 +00:00
|
|
|
gen_require(`$0'_depend)
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
allow $1 var_t:dir search;
|
2005-06-09 14:50:48 +00:00
|
|
|
allow $1 var_run_t:dir r_dir_perms;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_list_pids_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
type var_t, var_run_t;
|
|
|
|
|
2005-06-09 14:50:48 +00:00
|
|
|
class dir r_dir_perms;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
2005-04-25 16:11:21 +00:00
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
# files_create_pid(domain,pidfile,[object class(es)])
|
2005-04-25 16:11:21 +00:00
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_create_pid',`
|
2005-06-13 20:47:04 +00:00
|
|
|
gen_require(`$0'_depend)
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
allow $1 var_t:dir search;
|
|
|
|
allow $1 var_run_t:dir rw_dir_perms;
|
|
|
|
|
|
|
|
ifelse(`$3',`',`
|
|
|
|
type_transition $1 var_run_t:file $2;
|
|
|
|
',`
|
|
|
|
type_transition $1 var_run_t:$3 $2;
|
|
|
|
')
|
2005-04-25 16:11:21 +00:00
|
|
|
')
|
|
|
|
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_create_pid_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
type var_t, var_run_t;
|
|
|
|
|
|
|
|
class dir rw_dir_perms;
|
2005-05-03 20:23:33 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
# files_rw_generic_pids(domain)
|
2005-05-03 20:23:33 +00:00
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_rw_generic_pids',`
|
2005-06-13 20:47:04 +00:00
|
|
|
gen_require(`$0'_depend)
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
allow $1 var_t:dir search;
|
2005-06-09 14:50:48 +00:00
|
|
|
allow $1 var_run_t:dir r_dir_perms;
|
|
|
|
allow $1 var_run_t:file rw_file_perms;
|
2005-05-03 20:23:33 +00:00
|
|
|
')
|
|
|
|
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_rw_generic_pids_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
type var_t, var_run_t;
|
|
|
|
|
2005-06-09 14:50:48 +00:00
|
|
|
class dir r_dir_perms;
|
|
|
|
class file rw_file_perms;
|
2005-05-03 20:23:33 +00:00
|
|
|
')
|
|
|
|
|
2005-05-24 15:55:57 +00:00
|
|
|
########################################
|
2005-06-13 17:35:46 +00:00
|
|
|
## <interface name="files_dontaudit_write_all_pids">
|
2005-05-24 15:55:57 +00:00
|
|
|
## <description>
|
|
|
|
## Do not audit attempts to write to daemon runtime data files.
|
|
|
|
## </description>
|
|
|
|
## <parameter name="domain">
|
|
|
|
## The type of the process performing this action.
|
|
|
|
## </parameter>
|
|
|
|
## </interface>
|
|
|
|
#
|
|
|
|
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_dontaudit_write_all_pids',`
|
2005-06-13 20:47:04 +00:00
|
|
|
gen_require(`$0'_depend)
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
dontaudit $1 pidfile:file write;
|
2005-05-24 15:55:57 +00:00
|
|
|
')
|
|
|
|
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_dontaudit_write_all_pids_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
attribute pidfile;
|
|
|
|
|
|
|
|
class file write;
|
2005-05-24 15:55:57 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-06-13 17:35:46 +00:00
|
|
|
## <interface name="files_dontaudit_ioctl_all_pids">
|
2005-05-24 15:55:57 +00:00
|
|
|
## <description>
|
|
|
|
## Do not audit attempts to ioctl daemon runtime data files.
|
|
|
|
## </description>
|
|
|
|
## <parameter name="domain">
|
|
|
|
## The type of the process performing this action.
|
|
|
|
## </parameter>
|
|
|
|
## </interface>
|
|
|
|
#
|
|
|
|
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_dontaudit_ioctl_all_pids',`
|
2005-06-13 20:47:04 +00:00
|
|
|
gen_require(`$0'_depend)
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
dontaudit $1 pidfile:file ioctl;
|
2005-05-24 15:55:57 +00:00
|
|
|
')
|
|
|
|
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_dontaudit_ioctl_all_pids_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
attribute pidfile;
|
|
|
|
|
|
|
|
class file ioctl;
|
2005-05-24 15:55:57 +00:00
|
|
|
')
|
|
|
|
|
2005-05-31 23:02:11 +00:00
|
|
|
########################################
|
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
# files_read_all_pids(domain)
|
2005-05-31 23:02:11 +00:00
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_read_all_pids',`
|
2005-06-13 20:47:04 +00:00
|
|
|
gen_require(`$0'_depend)
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
allow $1 var_t:dir search;
|
|
|
|
allow $1 pidfile:dir r_dir_perms;
|
|
|
|
allow $1 pidfile:file r_file_perms;
|
2005-05-31 23:02:11 +00:00
|
|
|
')
|
|
|
|
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_read_all_pids_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
attribute pidfile;
|
|
|
|
|
|
|
|
type var_t;
|
|
|
|
class dir r_dir_perms;
|
|
|
|
class file r_file_perms;
|
2005-05-31 23:02:11 +00:00
|
|
|
')
|
|
|
|
|
2005-05-03 20:23:33 +00:00
|
|
|
########################################
|
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
# files_delete_all_pids(domain)
|
2005-05-03 20:23:33 +00:00
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_delete_all_pids',`
|
2005-06-13 20:47:04 +00:00
|
|
|
gen_require(`$0'_depend)
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
allow $1 var_t:dir search;
|
|
|
|
allow $1 var_run_t:{ sock_file lnk_file } { getattr unlink };
|
|
|
|
allow $1 var_run_t:dir rmdir;
|
|
|
|
allow $1 pidfile:dir rw_dir_perms;
|
|
|
|
allow $1 pidfile:file { getattr unlink };
|
|
|
|
allow $1 pidfile:sock_file { getattr unlink };
|
2005-05-03 20:23:33 +00:00
|
|
|
')
|
2005-04-25 16:11:21 +00:00
|
|
|
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_delete_all_pids_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
attribute pidfile;
|
|
|
|
|
|
|
|
type var_t, var_run_t;
|
|
|
|
|
|
|
|
class dir rw_dir_perms;
|
|
|
|
class file { getattr unlink };
|
|
|
|
class lnk_file { getattr unlink };
|
|
|
|
class sock_file { getattr unlink };
|
2005-04-25 16:11:21 +00:00
|
|
|
')
|
2005-05-13 14:37:13 +00:00
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
# files_search_spool(domain)
|
2005-05-13 14:37:13 +00:00
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_search_spool',`
|
2005-06-13 20:47:04 +00:00
|
|
|
gen_require(`$0'_depend)
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
allow $1 var_t:dir search;
|
|
|
|
allow $1 var_spool_t:dir search;
|
2005-05-13 14:37:13 +00:00
|
|
|
')
|
|
|
|
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_search_spool_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
type var_t, var_spool_t;
|
|
|
|
|
|
|
|
class dir search;
|
2005-05-13 14:37:13 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
# files_list_spool(domain)
|
2005-05-13 14:37:13 +00:00
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_list_spool',`
|
2005-06-13 20:47:04 +00:00
|
|
|
gen_require(`$0'_depend)
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
allow $1 var_t:dir search;
|
2005-06-09 14:50:48 +00:00
|
|
|
allow $1 var_spool_t:dir r_dir_perms;
|
2005-05-13 14:37:13 +00:00
|
|
|
')
|
|
|
|
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_list_spool_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
type var_t, var_spool_t;
|
|
|
|
|
2005-06-09 14:50:48 +00:00
|
|
|
class dir r_dir_perms;
|
2005-05-13 14:37:13 +00:00
|
|
|
')
|
2005-05-18 21:00:00 +00:00
|
|
|
|
2005-05-25 20:58:21 +00:00
|
|
|
########################################
|
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
# files_read_spools(domain)
|
2005-05-25 20:58:21 +00:00
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_read_spools',`
|
2005-06-13 20:47:04 +00:00
|
|
|
gen_require(`$0'_depend)
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
allow $1 var_t:dir search;
|
2005-06-09 14:50:48 +00:00
|
|
|
allow $1 var_spool_t:dir r_dir_perms;
|
|
|
|
allow $1 var_spool_t:file r_file_perms;
|
2005-05-25 20:58:21 +00:00
|
|
|
')
|
|
|
|
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_read_spools_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
type var_t, var_spool_t;
|
|
|
|
|
2005-06-09 14:50:48 +00:00
|
|
|
class dir r_dir_perms;
|
|
|
|
class file r_file_perms;
|
2005-05-25 20:58:21 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
# files_manage_spools(domain)
|
2005-05-25 20:58:21 +00:00
|
|
|
#
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_manage_spools',`
|
2005-06-13 20:47:04 +00:00
|
|
|
gen_require(`$0'_depend)
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
allow $1 var_t:dir search;
|
2005-06-10 01:01:13 +00:00
|
|
|
allow $1 var_spool_t:dir rw_dir_perms;
|
|
|
|
allow $1 var_spool_t:file create_file_perms;
|
2005-05-25 20:58:21 +00:00
|
|
|
')
|
|
|
|
|
2005-06-13 17:35:46 +00:00
|
|
|
define(`files_manage_spools_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
type var_t, var_spool_t;
|
|
|
|
|
2005-06-10 01:01:13 +00:00
|
|
|
class dir rw_dir_perms;
|
|
|
|
class file create_file_perms;
|
2005-05-25 20:58:21 +00:00
|
|
|
')
|
|
|
|
|
2005-05-18 21:00:00 +00:00
|
|
|
## </module>
|