2005-06-01 14:17:43 +00:00
|
|
|
## <module name="init" layer="system">
|
|
|
|
## <summary>System initialization programs (init and init scripts).</summary>
|
2005-04-20 19:07:16 +00:00
|
|
|
|
2005-05-13 20:21:50 +00:00
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# init_make_init_domain(domain,entrypointfile)
|
|
|
|
#
|
|
|
|
define(`init_make_init_domain',`
|
2005-05-31 21:25:45 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
|
|
|
|
|
|
|
domain_make_domain($1)
|
|
|
|
domain_make_entrypoint_file($1,$2)
|
|
|
|
|
|
|
|
role system_r types $1;
|
|
|
|
|
|
|
|
allow init_t $1:process transition;
|
2005-06-09 14:50:48 +00:00
|
|
|
allow init_t $2:file rx_file_perms;
|
2005-05-31 21:25:45 +00:00
|
|
|
dontaudit init_t $1:process { noatsecure siginh rlimitinh };
|
|
|
|
type_transition init_t $2:process $1;
|
|
|
|
|
|
|
|
allow $1 init_t:fd use;
|
|
|
|
allow init_t $1:fd use;
|
|
|
|
allow $1 init_t:fifo_file rw_file_perms;
|
|
|
|
allow $1 init_t:process sigchld;
|
|
|
|
|
|
|
|
# Red Hat systems seem to have a stray
|
|
|
|
# fd open from the initrd
|
|
|
|
optional_policy(`distro_redhat',`
|
|
|
|
kernel_ignore_use_file_descriptors($1)
|
|
|
|
files_ignore_read_rootfs_file($1)
|
|
|
|
')
|
2005-05-13 20:21:50 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
define(`init_make_init_domain_depend',`
|
2005-05-31 21:25:45 +00:00
|
|
|
type init_t;
|
2005-06-09 14:50:48 +00:00
|
|
|
class file rx_file_perms;
|
2005-05-31 21:25:45 +00:00
|
|
|
class fd use;
|
|
|
|
class fifo_file rw_file_perms;
|
|
|
|
class process { transition noatsecure siginh rlimitinh sigchld };
|
|
|
|
role system_r;
|
2005-05-13 20:21:50 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# init_make_daemon_domain(domain,entrypointfile)
|
|
|
|
#
|
|
|
|
define(`init_make_daemon_domain',`
|
2005-05-31 21:25:45 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
|
|
|
|
|
|
|
domain_make_domain($1)
|
|
|
|
domain_make_entrypoint_file($1,$2)
|
|
|
|
|
|
|
|
role system_r types $1;
|
|
|
|
|
|
|
|
allow initrc_t $1:process transition;
|
2005-06-09 14:50:48 +00:00
|
|
|
allow initrc_t $2:file rx_file_perms;
|
2005-05-31 21:25:45 +00:00
|
|
|
dontaudit initrc_t $1:process { noatsecure siginh rlimitinh };
|
|
|
|
type_transition initrc_t $2:process $1;
|
|
|
|
|
|
|
|
allow initrc_t $1:fd use;
|
|
|
|
allow $1 initrc_t:fd use;
|
|
|
|
allow $1 initrc_t:fifo_file rw_file_perms;
|
|
|
|
allow $1 initrc_t:process sigchld;
|
|
|
|
|
|
|
|
# Red Hat systems seem to have a stray
|
|
|
|
# fd open from the initrd
|
|
|
|
optional_policy(`distro_redhat',`
|
|
|
|
kernel_ignore_use_file_descriptors($1)
|
|
|
|
files_ignore_read_rootfs_file($1)
|
|
|
|
')
|
2005-05-13 20:21:50 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
define(`init_make_daemon_domain_depend',`
|
2005-05-31 23:02:11 +00:00
|
|
|
type initrc_t;
|
|
|
|
|
|
|
|
role system_r;
|
|
|
|
|
2005-06-09 14:50:48 +00:00
|
|
|
class file rx_file_perms;
|
2005-05-31 23:02:11 +00:00
|
|
|
class fifo_file rw_file_perms;
|
|
|
|
class fd use;
|
|
|
|
class process { transition noatsecure siginh rlimitinh sigchld };
|
2005-05-13 20:21:50 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# init_make_system_domain(domain,entrypointfile)
|
|
|
|
#
|
|
|
|
define(`init_make_system_domain',`
|
2005-05-31 23:02:11 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
|
|
|
|
|
|
|
domain_make_domain($1)
|
|
|
|
domain_make_entrypoint_file($1,$2)
|
|
|
|
|
|
|
|
role system_r types $1;
|
|
|
|
|
|
|
|
allow initrc_t $1:process transition;
|
2005-06-09 14:50:48 +00:00
|
|
|
allow initrc_t $2:file rx_file_perms;
|
2005-05-31 23:02:11 +00:00
|
|
|
dontaudit initrc_t $1:process { noatsecure siginh rlimitinh };
|
|
|
|
type_transition initrc_t $2:process $1;
|
|
|
|
|
|
|
|
allow initrc_t $1:fd use;
|
|
|
|
allow $1 initrc_t:fd use;
|
|
|
|
allow $1 initrc_t:fifo_file rw_file_perms;
|
|
|
|
allow $1 initrc_t:process sigchld;
|
|
|
|
|
|
|
|
# Red Hat systems seem to have a stray
|
|
|
|
# fd open from the initrd
|
|
|
|
optional_policy(`distro_redhat',`
|
|
|
|
kernel_ignore_use_file_descriptors($1)
|
|
|
|
files_ignore_read_rootfs_file($1)
|
|
|
|
')
|
2005-05-13 20:21:50 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
define(`init_make_system_domain_depend',`
|
2005-05-31 23:02:11 +00:00
|
|
|
type initrc_t;
|
|
|
|
role system_r;
|
|
|
|
|
2005-06-09 14:50:48 +00:00
|
|
|
class file rx_file_perms;
|
2005-05-31 23:02:11 +00:00
|
|
|
class fd use;
|
|
|
|
class fifo_file rw_file_perms;
|
|
|
|
class process { transition noatsecure siginh rlimitinh sigchld };
|
2005-05-13 20:21:50 +00:00
|
|
|
')
|
|
|
|
|
2005-04-14 20:18:17 +00:00
|
|
|
########################################
|
|
|
|
#
|
2005-05-03 20:23:33 +00:00
|
|
|
# init_transition(domain)
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
|
|
|
define(`init_transition',`
|
2005-06-03 12:25:14 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
|
|
|
|
2005-06-09 14:50:48 +00:00
|
|
|
allow $1 init_exec_t:file rx_file_perms;
|
2005-06-03 12:25:14 +00:00
|
|
|
allow $1 init_t:process transition;
|
|
|
|
type_transition $1 init_exec_t:process init_t;
|
|
|
|
dontaudit $1 init_t:process { noatsecure siginh rlimitinh };
|
|
|
|
|
|
|
|
allow $1 init_t:fd use;
|
|
|
|
allow init_t $1:fd use;
|
|
|
|
allow init_t $1:fifo_file rw_file_perms;
|
|
|
|
allow init_t $1:process sigchld;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
define(`init_transition_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
type init_t, init_exec_t;
|
|
|
|
|
2005-06-09 14:50:48 +00:00
|
|
|
class file rx_file_perms;
|
2005-06-03 12:25:14 +00:00
|
|
|
class process { transition noatsecure siginh rlimitinh sigchld };
|
|
|
|
class fd use;
|
|
|
|
class fifo_file rw_file_perms;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2005-05-09 15:38:06 +00:00
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# init_get_process_group(domain)
|
|
|
|
#
|
|
|
|
define(`init_get_process_group',`
|
2005-06-03 12:25:14 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
|
|
|
|
|
|
|
allow $1 init_t:process getpgid;
|
2005-05-09 15:38:06 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
define(`init_get_process_group_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
type init_t;
|
|
|
|
|
|
|
|
class process getpgid;
|
2005-05-09 15:38:06 +00:00
|
|
|
')
|
|
|
|
|
2005-04-28 21:41:09 +00:00
|
|
|
########################################
|
|
|
|
#
|
2005-05-03 20:23:33 +00:00
|
|
|
# init_get_control_channel_attributes(domain)
|
2005-04-28 21:41:09 +00:00
|
|
|
#
|
|
|
|
define(`init_get_control_channel_attributes',`
|
2005-06-03 12:25:14 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
|
|
|
|
|
|
|
allow $1 initctl_t:fifo_file getattr;
|
2005-04-28 21:41:09 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
define(`init_get_control_channel_attributes_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
type initctl_t;
|
|
|
|
|
|
|
|
class fifo_file getattr;
|
2005-04-28 21:41:09 +00:00
|
|
|
')
|
|
|
|
|
2005-05-26 20:38:45 +00:00
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# init_ignore_get_control_channel_attributes(domain)
|
|
|
|
#
|
|
|
|
define(`init_ignore_get_control_channel_attributes',`
|
2005-06-03 12:25:14 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
|
|
|
|
|
|
|
dontaudit $1 initctl_t:fifo_file getattr;
|
2005-05-26 20:38:45 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
define(`init_get_control_channel_attributes_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
type initctl_t;
|
|
|
|
|
|
|
|
class fifo_file getattr;
|
2005-05-26 20:38:45 +00:00
|
|
|
')
|
|
|
|
|
2005-05-02 18:40:05 +00:00
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# init_use_control_channel(domain)
|
|
|
|
#
|
|
|
|
define(`init_use_control_channel',`
|
2005-06-03 12:25:14 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
|
|
|
|
|
|
|
devices_list_device_nodes($1)
|
2005-06-09 14:50:48 +00:00
|
|
|
allow $1 initctl_t:fifo_file rw_file_perms;
|
2005-05-02 18:40:05 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
define(`init_use_control_channel_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
type initctl_t;
|
|
|
|
|
2005-06-09 14:50:48 +00:00
|
|
|
class fifo_file rw_file_perms;
|
2005-05-02 18:40:05 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# init_ignore_use_control_channel(domain)
|
|
|
|
#
|
|
|
|
define(`init_ignore_use_control_channel',`
|
2005-06-03 12:25:14 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
|
|
|
|
|
|
|
dontaudit $1 initctl_t:fifo_file { read write };
|
2005-05-02 18:40:05 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
define(`init_ignore_use_control_channel_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
type initctl_t;
|
|
|
|
|
|
|
|
class fifo_file { read write };
|
2005-05-02 18:40:05 +00:00
|
|
|
')
|
|
|
|
|
2005-04-14 20:18:17 +00:00
|
|
|
########################################
|
|
|
|
#
|
2005-05-03 20:23:33 +00:00
|
|
|
# init_sigchld(domain)
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
|
|
|
define(`init_sigchld',`
|
2005-06-03 12:25:14 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
|
|
|
|
|
|
|
allow $1 init_t:process sigchld;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
define(`init_sigchld_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
type init_t;
|
|
|
|
|
|
|
|
class process sigchld;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2005-04-27 21:56:12 +00:00
|
|
|
########################################
|
|
|
|
#
|
2005-05-03 20:23:33 +00:00
|
|
|
# init_use_file_descriptors(domain)
|
2005-04-27 21:56:12 +00:00
|
|
|
#
|
|
|
|
define(`init_use_file_descriptors',`
|
2005-06-03 12:25:14 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
|
|
|
|
|
|
|
allow $1 init_t:fd use;
|
2005-04-27 21:56:12 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
define(`init_use_file_descriptors_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
type init_t;
|
|
|
|
|
|
|
|
class fd use;
|
2005-04-27 21:56:12 +00:00
|
|
|
')
|
|
|
|
|
2005-04-28 19:50:58 +00:00
|
|
|
########################################
|
|
|
|
#
|
2005-05-03 20:23:33 +00:00
|
|
|
# init_ignore_use_file_descriptors(domain)
|
2005-04-28 19:50:58 +00:00
|
|
|
#
|
|
|
|
define(`init_ignore_use_file_descriptors',`
|
2005-06-03 12:25:14 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
|
|
|
|
|
|
|
dontaudit $1 init_t:fd use;
|
2005-04-28 19:50:58 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
define(`init_ignore_use_file_descriptors_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
type init_t;
|
|
|
|
|
|
|
|
class fd use;
|
2005-04-28 19:50:58 +00:00
|
|
|
')
|
|
|
|
|
2005-04-14 20:18:17 +00:00
|
|
|
########################################
|
|
|
|
#
|
2005-05-03 20:23:33 +00:00
|
|
|
# init_script_transition(domain)
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
|
|
|
define(`init_script_transition',`
|
2005-06-03 12:25:14 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
|
|
|
|
2005-06-09 14:50:48 +00:00
|
|
|
allow $1 initrc_exec_t:file rx_file_perms;
|
2005-06-03 12:25:14 +00:00
|
|
|
allow $1 initrc_t:process transition;
|
|
|
|
type_transition $1 initrc_exec_t:process init_t;
|
|
|
|
dontaudit $1 init_t:process { noatsecure siginh rlimitinh };
|
|
|
|
|
|
|
|
allow $1 initrc_t:fd use;
|
|
|
|
allow initrc_t $1:fd use;
|
|
|
|
allow initrc_t $1:fifo_file rw_file_perms;
|
|
|
|
allow initrc_t $1:process sigchld;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
define(`init_script_transition_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
type initrc_t, initrc_exec_t;
|
|
|
|
|
2005-06-09 14:50:48 +00:00
|
|
|
class file rx_file_perms;
|
2005-06-03 12:25:14 +00:00
|
|
|
class process { transition noatsecure siginh rlimitinh sigchld };
|
|
|
|
class fd use;
|
|
|
|
class fifo_file rw_file_perms;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2005-05-04 13:19:47 +00:00
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# init_script_execute(domain)
|
|
|
|
#
|
|
|
|
define(`init_script_execute',`
|
2005-06-03 12:25:14 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
|
|
|
|
2005-06-09 14:50:48 +00:00
|
|
|
can_exec($1,initrc_exec_t)
|
|
|
|
|
2005-05-04 13:19:47 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
define(`init_script_execute_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
type initrc_exec_t;
|
|
|
|
|
|
|
|
class file { getattr read execute execute_no_trans };
|
2005-05-04 13:19:47 +00:00
|
|
|
')
|
|
|
|
|
2005-05-19 21:06:06 +00:00
|
|
|
########################################
|
|
|
|
## <interface name="init_script_read_process_state">
|
|
|
|
## <description>
|
|
|
|
## Read the process state (/proc/pid) of the init scripts.
|
|
|
|
## </description>
|
|
|
|
## <parameter name="domain">
|
|
|
|
## The type of the process performing this action.
|
|
|
|
## </parameter>
|
|
|
|
## <infoflow type="read" weight="10"/>
|
|
|
|
## </interface>
|
|
|
|
#
|
|
|
|
define(`init_script_read_process_state',`
|
2005-06-03 12:25:14 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
|
|
|
|
2005-06-09 14:50:48 +00:00
|
|
|
allow $1 initrc_t:dir r_dir_perms;
|
|
|
|
allow $1 initrc_t:{ file lnk_file } r_file_perms;
|
2005-06-03 12:25:14 +00:00
|
|
|
allow $1 initrc_t:process getattr;
|
|
|
|
|
|
|
|
# We need to suppress this denial because procps tries to access
|
|
|
|
# /proc/pid/environ and this now triggers a ptrace check in recent kernels
|
|
|
|
# (2.4 and 2.6). Might want to change procps to not do this, or only if
|
|
|
|
# running in a privileged domain.
|
|
|
|
dontaudit $1 initrc_t:process ptrace;
|
2005-05-19 21:06:06 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
define(`init_script_read_process_state_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
type initrc_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-06-03 12:25:14 +00:00
|
|
|
class process { getattr ptrace };
|
2005-05-19 21:06:06 +00:00
|
|
|
')
|
|
|
|
|
2005-05-03 20:23:33 +00:00
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# init_script_use_file_descriptors(domain)
|
2005-04-28 18:59:01 +00:00
|
|
|
#
|
|
|
|
define(`init_script_use_file_descriptors',`
|
2005-06-03 12:25:14 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
|
|
|
|
|
|
|
allow $1 initrc_t:fd use;
|
2005-04-28 18:59:01 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
define(`init_script_use_file_descriptors_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
type initrc_t;
|
|
|
|
|
|
|
|
class fd use;
|
2005-04-28 18:59:01 +00:00
|
|
|
')
|
|
|
|
|
2005-05-19 21:06:06 +00:00
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# init_script_ignore_use_file_descriptors(domain)
|
|
|
|
#
|
|
|
|
define(`init_script_ignore_use_file_descriptors',`
|
2005-06-03 12:25:14 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
|
|
|
|
|
|
|
dontaudit $1 initrc_t:fd use;
|
2005-05-19 21:06:06 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
define(`init_script_ignore_use_file_descriptors_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
type initrc_t;
|
|
|
|
|
|
|
|
class fd use;
|
2005-05-19 21:06:06 +00:00
|
|
|
')
|
|
|
|
|
2005-05-16 21:10:33 +00:00
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# init_script_get_process_group(domain)
|
|
|
|
#
|
|
|
|
define(`init_script_get_process_group',`
|
2005-06-03 12:25:14 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
|
|
|
|
|
|
|
allow $1 initrc_t:process getpgid;
|
2005-05-16 21:10:33 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
define(`init_script_get_process_group_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
type initrc_t;
|
|
|
|
|
|
|
|
class process getpgid;
|
2005-05-16 21:10:33 +00:00
|
|
|
')
|
|
|
|
|
2005-04-27 21:56:12 +00:00
|
|
|
########################################
|
|
|
|
#
|
2005-05-03 20:23:33 +00:00
|
|
|
# init_script_use_pseudoterminal(domain)
|
2005-04-27 21:56:12 +00:00
|
|
|
#
|
|
|
|
define(`init_script_use_pseudoterminal',`
|
2005-06-03 12:25:14 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
|
|
|
|
|
|
|
terminal_list_pseudoterminals($1)
|
|
|
|
allow $1 initrc_devpts_t:chr_file { getattr read write ioctl };
|
2005-04-27 21:56:12 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
define(`init_script_use_pseudoterminal_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
type initrc_devpts_t;
|
|
|
|
|
|
|
|
class chr_file { getattr read write ioctl };
|
2005-04-27 21:56:12 +00:00
|
|
|
')
|
|
|
|
|
2005-05-09 15:38:06 +00:00
|
|
|
########################################
|
|
|
|
#
|
2005-05-16 21:10:33 +00:00
|
|
|
# init_script_ignore_use_pseudoterminal(domain)
|
2005-05-09 15:38:06 +00:00
|
|
|
#
|
2005-05-16 21:10:33 +00:00
|
|
|
define(`init_script_ignore_use_pseudoterminal',`
|
2005-06-03 12:25:14 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
|
|
|
|
2005-06-09 14:50:48 +00:00
|
|
|
dontaudit $1 initrc_devpts_t:chr_file { read write ioctl };
|
2005-05-09 15:38:06 +00:00
|
|
|
')
|
|
|
|
|
2005-05-16 21:10:33 +00:00
|
|
|
define(`init_script_ignore_use_pseudoterminal_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
type initrc_devpts_t;
|
|
|
|
|
|
|
|
class chr_file { read write ioctl };
|
2005-05-09 15:38:06 +00:00
|
|
|
')
|
|
|
|
|
2005-05-19 21:06:06 +00:00
|
|
|
########################################
|
|
|
|
## <interface name="init_script_modify_temporary_data">
|
|
|
|
## <description>
|
|
|
|
## Read and write init script temporary data.
|
|
|
|
## </description>
|
|
|
|
## <parameter name="domain">
|
|
|
|
## The type of the process performing this action.
|
|
|
|
## </parameter>
|
|
|
|
## <infoflow type="read" weight="10"/>
|
|
|
|
## </interface>
|
|
|
|
#
|
|
|
|
define(`init_script_modify_temporary_data',`
|
2005-06-03 12:25:14 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
|
|
|
|
|
|
|
# FIXME: read tmp_t
|
2005-06-09 14:50:48 +00:00
|
|
|
allow $1 initrc_tmp_t:file rw_file_perms;
|
2005-05-19 21:06:06 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
define(`init_script_modify_temporary_data_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
type initrc_var_run_t;
|
|
|
|
|
2005-06-09 14:50:48 +00:00
|
|
|
class file rw_file_perms;
|
2005-05-19 21:06:06 +00:00
|
|
|
')
|
|
|
|
|
2005-04-14 20:18:17 +00:00
|
|
|
########################################
|
|
|
|
#
|
2005-05-03 20:23:33 +00:00
|
|
|
# init_script_read_runtime_data(domain)
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-05-03 20:23:33 +00:00
|
|
|
define(`init_script_read_runtime_data',`
|
2005-06-03 12:25:14 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
|
|
|
|
|
|
|
files_read_runtime_data_directory($1)
|
2005-06-09 14:50:48 +00:00
|
|
|
allow $1 initrc_var_run_t:file r_file_perms;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2005-05-03 20:23:33 +00:00
|
|
|
define(`init_script_read_runtime_data_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
type initrc_var_run_t;
|
|
|
|
|
2005-06-09 14:50:48 +00:00
|
|
|
class file r_file_perms;
|
2005-05-03 20:23:33 +00:00
|
|
|
')
|
|
|
|
|
2005-05-13 14:37:13 +00:00
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# init_script_ignore_write_runtime_data(domain)
|
|
|
|
#
|
|
|
|
define(`init_script_ignore_write_runtime_data',`
|
2005-06-03 12:25:14 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
|
|
|
|
|
|
|
dontaudit $1 initrc_var_run_t:file { write lock };
|
2005-05-13 14:37:13 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
define(`init_script_ignore_write_runtime_data_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
type initrc_var_run_t;
|
|
|
|
|
|
|
|
class file { write lock };
|
2005-05-13 14:37:13 +00:00
|
|
|
')
|
|
|
|
|
2005-05-03 20:23:33 +00:00
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# init_script_modify_runtime_data(domain)
|
|
|
|
#
|
|
|
|
define(`init_script_modify_runtime_data',`
|
2005-06-03 12:25:14 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
|
|
|
|
|
|
|
files_read_runtime_data_directory($1)
|
2005-06-09 14:50:48 +00:00
|
|
|
allow $1 initrc_var_run_t:file rw_file_perms;
|
2005-05-03 20:23:33 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
define(`init_script_modify_runtime_data_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
type initrc_var_run_t;
|
|
|
|
|
2005-06-09 14:50:48 +00:00
|
|
|
class file rw_file_perms;
|
2005-05-03 20:23:33 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# init_script_ignore_modify_runtime_data(domain)
|
|
|
|
#
|
|
|
|
define(`init_script_ignore_modify_runtime_data',`
|
2005-06-03 12:25:14 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
|
|
|
|
|
|
|
dontaudit $1 initrc_var_run_t:file { getattr read write append };
|
2005-05-03 20:23:33 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
define(`init_script_ignore_modify_runtime_data_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
type initrc_var_run_t;
|
|
|
|
|
2005-06-09 14:50:48 +00:00
|
|
|
class file rw_file_perms;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
2005-06-01 14:17:43 +00:00
|
|
|
|
|
|
|
## </module>
|