Chris PeBenito e181fe
# Copyright (C) 2005 Tresys Technology, LLC
Chris PeBenito e181fe
Chris PeBenito 85bd7f
#######################################
Chris PeBenito daa0e0
## <interface name="selinux_checkpolicy_transition">
Chris PeBenito daa0e0
##	<description>
Chris PeBenito daa0e0
##		Execute checkpolicy in the checkpolicy domain.
Chris PeBenito daa0e0
##	</description>
Chris PeBenito daa0e0
##	<parameter name="domain">
Chris PeBenito daa0e0
##		The type of the process performing this action.
Chris PeBenito daa0e0
##	</parameter>
Chris PeBenito daa0e0
##	<infoflow type="write" weight="10"/>
Chris PeBenito daa0e0
## </interface>
Chris PeBenito 85bd7f
#
Chris PeBenito 85bd7f
define(`selinux_checkpolicy_transition',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito 85bd7f
allow $1 checkpolicy_exec_t:file { getattr read execute };
Chris PeBenito 85bd7f
allow $1 checkpolicy_t:process transition;
Chris PeBenito 85bd7f
type_transition $1 checkpolicy_exec_t:file checkpolicy_t;
Chris PeBenito 85bd7f
dontaudit $1 checkpolicy_t:process { noatsecure siginh rlimitinh };
Chris PeBenito 85bd7f
')
Chris PeBenito 85bd7f
Chris PeBenito 85bd7f
define(`selinux_checkpolicy_transition_depend',`
Chris PeBenito 85bd7f
type checkpolicy_t, checkpolicy_exec_t;
Chris PeBenito 85bd7f
class file { getattr read execute };
Chris PeBenito 85bd7f
class process { transition noatsecure siginh rlimitinh };
Chris PeBenito 85bd7f
')
Chris PeBenito 85bd7f
Chris PeBenito daa0e0
########################################
Chris PeBenito daa0e0
## <interface name="selinux_checkpolicy_transition_add_role_use_terminal">
Chris PeBenito daa0e0
##	<description>
Chris PeBenito daa0e0
##		Execute checkpolicy in the checkpolicy domain, and
Chris PeBenito daa0e0
##		allow the specified role the checkpolicy domain,
Chris PeBenito daa0e0
##		and use the caller's terminal.
Chris PeBenito daa0e0
##	</description>
Chris PeBenito daa0e0
##	<parameter name="domain">
Chris PeBenito daa0e0
##		The type of the process performing this action.
Chris PeBenito daa0e0
##	</parameter>
Chris PeBenito daa0e0
##	<parameter name="role">
Chris PeBenito daa0e0
##		The role to be allowed the checkpolicy domain.
Chris PeBenito daa0e0
##	</parameter>
Chris PeBenito daa0e0
##	<parameter name="terminal">
Chris PeBenito daa0e0
##		The type of the terminal allow the checkpolicy domain to use.
Chris PeBenito daa0e0
##	</parameter>
Chris PeBenito daa0e0
##	<infoflow type="write" weight="10"/>
Chris PeBenito daa0e0
## </interface>
Chris PeBenito daa0e0
#
Chris PeBenito daa0e0
define(`selinux_checkpolicy_transition_add_role_use_terminal',`
Chris PeBenito daa0e0
requires_block_template(`$0'_depend)
Chris PeBenito daa0e0
selinux_checkpolicy_transition($1)
Chris PeBenito daa0e0
role $2 types checkpolicy_t;
Chris PeBenito daa0e0
allow checkpolicy_t $3:chr_file { getattr read write ioctl };
Chris PeBenito daa0e0
')
Chris PeBenito daa0e0
Chris PeBenito daa0e0
define(`selinux_checkpolicy_transition_add_role_use_terminal_depend',`
Chris PeBenito daa0e0
type checkpolicy_t;
Chris PeBenito daa0e0
class chr_file { getattr read write ioctl };
Chris PeBenito daa0e0
')
Chris PeBenito daa0e0
Chris PeBenito 85bd7f
#######################################
Chris PeBenito 85bd7f
#
Chris PeBenito 85bd7f
# selinux_checkpolicy_execute(domain)
Chris PeBenito 85bd7f
#
Chris PeBenito 85bd7f
define(`selinux_checkpolicy_execute',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito 85bd7f
allow $1 checkpolicy_exec_t:file { getattr read execute execute_no_trans };
Chris PeBenito 85bd7f
')
Chris PeBenito 85bd7f
Chris PeBenito 85bd7f
define(`selinux_checkpolicy_execute_depend',`
Chris PeBenito fc83db
type checkpolicy_exec_t;
Chris PeBenito 85bd7f
class file { getattr read execute execute_no_trans };
Chris PeBenito 85bd7f
')
Chris PeBenito 85bd7f
Chris PeBenito 85bd7f
#######################################
Chris PeBenito daa0e0
## <interface name="selinux_load_policy_transition">
Chris PeBenito daa0e0
##	<description>
Chris PeBenito daa0e0
##		Execute load_policy in the load_policy domain.
Chris PeBenito daa0e0
##	</description>
Chris PeBenito daa0e0
##	<parameter name="domain">
Chris PeBenito daa0e0
##		The type of the process performing this action.
Chris PeBenito daa0e0
##	</parameter>
Chris PeBenito daa0e0
##	<infoflow type="write" weight="10"/>
Chris PeBenito daa0e0
## </interface>
Chris PeBenito 85bd7f
#
Chris PeBenito 85bd7f
define(`selinux_load_policy_transition',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito 85bd7f
allow $1 load_policy_exec_t:file { getattr read execute };
Chris PeBenito 85bd7f
allow $1 load_policy_t:process transition;
Chris PeBenito 85bd7f
type_transition $1 load_policy_exec_t:file load_policy_t;
Chris PeBenito 85bd7f
dontaudit $1 load_policy_t:process { noatsecure siginh rlimitinh };
Chris PeBenito 85bd7f
')
Chris PeBenito 85bd7f
Chris PeBenito 85bd7f
define(`selinux_load_policy_transition_depend',`
Chris PeBenito 85bd7f
type load_policy_t, load_policy_exec_t;
Chris PeBenito 85bd7f
class file { getattr read execute };
Chris PeBenito 85bd7f
class process { transition noatsecure siginh rlimitinh };
Chris PeBenito 85bd7f
')
Chris PeBenito 85bd7f
Chris PeBenito daa0e0
########################################
Chris PeBenito daa0e0
## <interface name="selinux_load_policy_transition_add_role_use_terminal">
Chris PeBenito daa0e0
##	<description>
Chris PeBenito daa0e0
##		Execute load_policy in the load_policy domain, and
Chris PeBenito daa0e0
##		allow the specified role the load_policy domain,
Chris PeBenito daa0e0
##		and use the caller's terminal.
Chris PeBenito daa0e0
##	</description>
Chris PeBenito daa0e0
##	<parameter name="domain">
Chris PeBenito daa0e0
##		The type of the process performing this action.
Chris PeBenito daa0e0
##	</parameter>
Chris PeBenito daa0e0
##	<parameter name="role">
Chris PeBenito daa0e0
##		The role to be allowed the load_policy domain.
Chris PeBenito daa0e0
##	</parameter>
Chris PeBenito daa0e0
##	<parameter name="terminal">
Chris PeBenito daa0e0
##		The type of the terminal allow the load_policy domain to use.
Chris PeBenito daa0e0
##	</parameter>
Chris PeBenito daa0e0
##	<infoflow type="write" weight="10"/>
Chris PeBenito daa0e0
## </interface>
Chris PeBenito daa0e0
#
Chris PeBenito daa0e0
define(`selinux_load_policy_transition_add_role_use_terminal',`
Chris PeBenito daa0e0
requires_block_template(`$0'_depend)
Chris PeBenito daa0e0
selinux_load_policy_transition($1)
Chris PeBenito daa0e0
role $2 types load_policy_t;
Chris PeBenito daa0e0
allow load_policy_t $3:chr_file { getattr read write ioctl };
Chris PeBenito daa0e0
')
Chris PeBenito daa0e0
Chris PeBenito daa0e0
define(`selinux_load_policy_transition_add_role_use_terminal_depend',`
Chris PeBenito daa0e0
type load_policy_t;
Chris PeBenito daa0e0
class chr_file { getattr read write ioctl };
Chris PeBenito daa0e0
')
Chris PeBenito daa0e0
Chris PeBenito 85bd7f
#######################################
Chris PeBenito 85bd7f
#
Chris PeBenito 85bd7f
# selinux_load_policy_execute(domain)
Chris PeBenito 85bd7f
#
Chris PeBenito 85bd7f
define(`selinux_load_policy_execute',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito 85bd7f
allow $1 load_policy_exec_t:file { getattr read execute execute_no_trans };
Chris PeBenito 85bd7f
')
Chris PeBenito 85bd7f
Chris PeBenito 85bd7f
define(`selinux_load_policy_execute_depend',`
Chris PeBenito fc83db
type load_policy_exec_t;
Chris PeBenito 85bd7f
class file { getattr read execute execute_no_trans };
Chris PeBenito 85bd7f
')
Chris PeBenito 85bd7f
Chris PeBenito 85bd7f
#######################################
Chris PeBenito 85bd7f
#
Chris PeBenito 85bd7f
# selinux_read_load_policy_binary(domain)
Chris PeBenito 85bd7f
#
Chris PeBenito 85bd7f
define(`selinux_read_load_policy_binary',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito 85bd7f
allow $1 load_policy_exec_t:file { getattr read };
Chris PeBenito 85bd7f
')
Chris PeBenito 85bd7f
Chris PeBenito 85bd7f
define(`selinux_read_load_policy_binary_depend',`
Chris PeBenito 85bd7f
type load_policy_exec_t;
Chris PeBenito 85bd7f
class file { getattr read };
Chris PeBenito 85bd7f
')
Chris PeBenito 85bd7f
Chris PeBenito 85bd7f
#######################################
Chris PeBenito daa0e0
## <interface name="selinux_newrole_transition">
Chris PeBenito daa0e0
##	<description>
Chris PeBenito daa0e0
##		Execute newrole in the load_policy domain.
Chris PeBenito daa0e0
##	</description>
Chris PeBenito daa0e0
##	<parameter name="domain">
Chris PeBenito daa0e0
##		The type of the process performing this action.
Chris PeBenito daa0e0
##	</parameter>
Chris PeBenito daa0e0
##	<infoflow type="write" weight="10"/>
Chris PeBenito daa0e0
## </interface>
Chris PeBenito 85bd7f
#
Chris PeBenito 85bd7f
define(`selinux_newrole_transition',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito 85bd7f
allow $1 newrole_exec_t:file { getattr read execute };
Chris PeBenito 85bd7f
allow $1 newrole_t:process transition;
Chris PeBenito 85bd7f
type_transition $1 newrole_exec_t:file newrole_t;
Chris PeBenito 85bd7f
dontaudit $1 newrole_t:process { noatsecure siginh rlimitinh };
Chris PeBenito 85bd7f
')
Chris PeBenito 85bd7f
Chris PeBenito 85bd7f
define(`selinux_newrole_transition_depend',`
Chris PeBenito daa0e0
type newrole_t, newrole_exec_t;
Chris PeBenito 85bd7f
class file { getattr read execute };
Chris PeBenito 85bd7f
class process { transition noatsecure siginh rlimitinh };
Chris PeBenito 85bd7f
')
Chris PeBenito 85bd7f
Chris PeBenito daa0e0
########################################
Chris PeBenito daa0e0
## <interface name="selinux_newrole_transition_add_role_use_terminal">
Chris PeBenito daa0e0
##	<description>
Chris PeBenito daa0e0
##		Execute newrole in the newrole domain, and
Chris PeBenito daa0e0
##		allow the specified role the newrole domain,
Chris PeBenito daa0e0
##		and use the caller's terminal.
Chris PeBenito daa0e0
##	</description>
Chris PeBenito daa0e0
##	<parameter name="domain">
Chris PeBenito daa0e0
##		The type of the process performing this action.
Chris PeBenito daa0e0
##	</parameter>
Chris PeBenito daa0e0
##	<parameter name="role">
Chris PeBenito daa0e0
##		The role to be allowed the newrole domain.
Chris PeBenito daa0e0
##	</parameter>
Chris PeBenito daa0e0
##	<parameter name="terminal">
Chris PeBenito daa0e0
##		The type of the terminal allow the newrole domain to use.
Chris PeBenito daa0e0
##	</parameter>
Chris PeBenito daa0e0
##	<infoflow type="write" weight="10"/>
Chris PeBenito daa0e0
## </interface>
Chris PeBenito daa0e0
#
Chris PeBenito daa0e0
define(`selinux_newrole_transition_add_role_use_terminal',`
Chris PeBenito daa0e0
requires_block_template(`$0'_depend)
Chris PeBenito daa0e0
selinux_newrole_transition($1)
Chris PeBenito daa0e0
role $2 types newrole_t;
Chris PeBenito daa0e0
allow newrole_t $3:chr_file { getattr read write ioctl };
Chris PeBenito daa0e0
')
Chris PeBenito daa0e0
Chris PeBenito daa0e0
define(`selinux_newrole_transition_add_role_use_terminal_depend',`
Chris PeBenito daa0e0
type newrole_t;
Chris PeBenito daa0e0
class chr_file { getattr read write ioctl };
Chris PeBenito daa0e0
')
Chris PeBenito daa0e0
Chris PeBenito 85bd7f
#######################################
Chris PeBenito 85bd7f
#
Chris PeBenito 85bd7f
# selinux_newrole_execute(domain)
Chris PeBenito 85bd7f
#
Chris PeBenito 85bd7f
define(`selinux_newrole_execute',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito 85bd7f
allow $1 newrole_exec_t:file { getattr read execute execute_no_trans };
Chris PeBenito 85bd7f
')
Chris PeBenito 85bd7f
Chris PeBenito 85bd7f
define(`selinux_newrole_execute_depend',`
Chris PeBenito 85bd7f
type newrole_t, newrole_exec_t;
Chris PeBenito 85bd7f
class file { getattr read execute execute_no_trans };
Chris PeBenito 85bd7f
')
Chris PeBenito 85bd7f
Chris PeBenito daa0e0
########################################
Chris PeBenito daa0e0
## <interface name="selinux_newrole_ignore_signal">
Chris PeBenito daa0e0
##	<description>
Chris PeBenito daa0e0
##		Do not audit the caller attempts to send
Chris PeBenito daa0e0
##		a signal to newrole.
Chris PeBenito daa0e0
##	</description>
Chris PeBenito daa0e0
##	<parameter name="domain">
Chris PeBenito daa0e0
##		The type of the process performing this action.
Chris PeBenito daa0e0
##	</parameter>
Chris PeBenito daa0e0
##	<infoflow type="none"/>
Chris PeBenito daa0e0
## </interface>
Chris PeBenito daa0e0
#
Chris PeBenito daa0e0
define(`selinux_newrole_ignore_signal',`
Chris PeBenito daa0e0
requires_block_template(`$0'_depend)
Chris PeBenito daa0e0
dontaudit $1 newrole_t:process signal;
Chris PeBenito daa0e0
')
Chris PeBenito daa0e0
Chris PeBenito daa0e0
define(`selinux_newrole_ignore_signal_depend',`
Chris PeBenito daa0e0
type newrole_t;
Chris PeBenito daa0e0
class process signal;
Chris PeBenito daa0e0
')
Chris PeBenito daa0e0
Chris PeBenito 85bd7f
#######################################
Chris PeBenito 85bd7f
#
Chris PeBenito 85bd7f
# selinux_newrole_sigchld(domain)
Chris PeBenito 85bd7f
#
Chris PeBenito 85bd7f
define(`selinux_newrole_sigchld',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito 85bd7f
allow $1 newrole_t:process sigchld;
Chris PeBenito 85bd7f
')
Chris PeBenito 85bd7f
Chris PeBenito 85bd7f
define(`selinux_newrole_sigchld_depend',`
Chris PeBenito 85bd7f
type newrole_t;
Chris PeBenito 85bd7f
class process sigchld;
Chris PeBenito 85bd7f
')
Chris PeBenito 85bd7f
Chris PeBenito 85bd7f
#######################################
Chris PeBenito 85bd7f
#
Chris PeBenito ab64c3
# selinux_newrole_use_file_descriptors(domain)
Chris PeBenito ab64c3
#
Chris PeBenito ab64c3
define(`selinux_newrole_use_file_descriptors',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito ab64c3
allow $1 newrole_t:fd use;
Chris PeBenito ab64c3
')
Chris PeBenito ab64c3
Chris PeBenito ab64c3
define(`selinux_newrole_use_file_descriptors_depend',`
Chris PeBenito ab64c3
type newrole_t;
Chris PeBenito ab64c3
class fd use;
Chris PeBenito ab64c3
')
Chris PeBenito ab64c3
Chris PeBenito ab64c3
#######################################
Chris PeBenito daa0e0
## <interface name="selinux_restorecon_transition">
Chris PeBenito daa0e0
##	<description>
Chris PeBenito daa0e0
##		Execute restorecon in the restorecon domain.
Chris PeBenito daa0e0
##	</description>
Chris PeBenito daa0e0
##	<parameter name="domain">
Chris PeBenito daa0e0
##		The type of the process performing this action.
Chris PeBenito daa0e0
##	</parameter>
Chris PeBenito daa0e0
##	<infoflow type="write" weight="10"/>
Chris PeBenito daa0e0
## </interface>
Chris PeBenito 85bd7f
#
Chris PeBenito 85bd7f
define(`selinux_restorecon_transition',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito 85bd7f
allow $1 restorecon_exec_t:file { getattr read execute };
Chris PeBenito 85bd7f
allow $1 restorecon_t:process transition;
Chris PeBenito 85bd7f
type_transition $1 restorecon_exec_t:file restorecon_t;
Chris PeBenito 85bd7f
dontaudit $1 restorecon_t:process { noatsecure siginh rlimitinh };
Chris PeBenito 85bd7f
')
Chris PeBenito 85bd7f
Chris PeBenito 85bd7f
define(`selinux_restorecon_transition_depend',`
Chris PeBenito fc83db
type restorecon_exec_t;
Chris PeBenito 85bd7f
class file { getattr read execute };
Chris PeBenito 85bd7f
class process { transition noatsecure siginh rlimitinh };
Chris PeBenito 85bd7f
')
Chris PeBenito 85bd7f
Chris PeBenito daa0e0
########################################
Chris PeBenito daa0e0
## <interface name="selinux_restorecon_transition_add_role_use_terminal">
Chris PeBenito daa0e0
##	<description>
Chris PeBenito daa0e0
##		Execute restorecon in the restorecon domain, and
Chris PeBenito daa0e0
##		allow the specified role the restorecon domain,
Chris PeBenito daa0e0
##		and use the caller's terminal.
Chris PeBenito daa0e0
##	</description>
Chris PeBenito daa0e0
##	<parameter name="domain">
Chris PeBenito daa0e0
##		The type of the process performing this action.
Chris PeBenito daa0e0
##	</parameter>
Chris PeBenito daa0e0
##	<parameter name="role">
Chris PeBenito daa0e0
##		The role to be allowed the restorecon domain.
Chris PeBenito daa0e0
##	</parameter>
Chris PeBenito daa0e0
##	<parameter name="terminal">
Chris PeBenito daa0e0
##		The type of the terminal allow the restorecon domain to use.
Chris PeBenito daa0e0
##	</parameter>
Chris PeBenito daa0e0
##	<infoflow type="write" weight="10"/>
Chris PeBenito daa0e0
## </interface>
Chris PeBenito daa0e0
#
Chris PeBenito daa0e0
define(`selinux_restorecon_transition_add_role_use_terminal',`
Chris PeBenito daa0e0
requires_block_template(`$0'_depend)
Chris PeBenito daa0e0
selinux_restorecon_transition($1)
Chris PeBenito daa0e0
role $2 types restorecon_t;
Chris PeBenito daa0e0
allow restorecon_t $3:chr_file { getattr read write ioctl };
Chris PeBenito daa0e0
')
Chris PeBenito daa0e0
Chris PeBenito daa0e0
define(`selinux_restorecon_transition_add_role_use_terminal_depend',`
Chris PeBenito daa0e0
type restorecon_t;
Chris PeBenito daa0e0
class chr_file { getattr read write ioctl };
Chris PeBenito daa0e0
')
Chris PeBenito daa0e0
Chris PeBenito 85bd7f
#######################################
Chris PeBenito 85bd7f
#
Chris PeBenito 85bd7f
# selinux_restorecon_execute(domain)
Chris PeBenito 85bd7f
#
Chris PeBenito 85bd7f
define(`selinux_restorecon_execute',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito 85bd7f
allow $1 restorecon_exec_t:file { getattr read execute execute_no_trans };
Chris PeBenito 85bd7f
')
Chris PeBenito 85bd7f
Chris PeBenito 85bd7f
define(`selinux_restorecon_execute_depend',`
Chris PeBenito 85bd7f
type restorecon_t, restorecon_exec_t;
Chris PeBenito 85bd7f
class file { getattr read execute execute_no_trans };
Chris PeBenito 85bd7f
')
Chris PeBenito 85bd7f
Chris PeBenito 8623d5
########################################
Chris PeBenito daa0e0
## <interface name="selinux_run_init_transition">
Chris PeBenito daa0e0
##	<description>
Chris PeBenito daa0e0
##		Execute run_init in the run_init domain.
Chris PeBenito daa0e0
##	</description>
Chris PeBenito daa0e0
##	<parameter name="domain">
Chris PeBenito daa0e0
##		The type of the process performing this action.
Chris PeBenito daa0e0
##	</parameter>
Chris PeBenito daa0e0
##	<infoflow type="write" weight="10"/>
Chris PeBenito daa0e0
## </interface>
Chris PeBenito 8623d5
#
Chris PeBenito 8623d5
define(`selinux_run_init_transition',`
Chris PeBenito 8623d5
requires_block_template(`$0'_depend)
Chris PeBenito 8623d5
allow $1 run_init_exec_t:file { getattr read execute };
Chris PeBenito 8623d5
allow $1 run_init_t:process transition;
Chris PeBenito 8623d5
type_transition $1 run_init_exec_t:file run_init_t;
Chris PeBenito 8623d5
dontaudit $1 run_init_t:process { noatsecure siginh rlimitinh };
Chris PeBenito 8623d5
')
Chris PeBenito 8623d5
Chris PeBenito 8623d5
define(`selinux_run_init_transition_depend',`
Chris PeBenito 8623d5
type run_init_t, run_init_exec_t;
Chris PeBenito 8623d5
class file { getattr read execute };
Chris PeBenito 8623d5
class process { transition noatsecure siginh rlimitinh };
Chris PeBenito 8623d5
')
Chris PeBenito 8623d5
Chris PeBenito 8623d5
########################################
Chris PeBenito daa0e0
## <interface name="selinux_run_init_transition_add_role_use_terminal">
Chris PeBenito daa0e0
##	<description>
Chris PeBenito daa0e0
##		Execute run_init in the run_init domain, and
Chris PeBenito daa0e0
##		allow the specified role the run_init domain,
Chris PeBenito daa0e0
##		and use the caller's terminal.
Chris PeBenito daa0e0
##	</description>
Chris PeBenito daa0e0
##	<parameter name="domain">
Chris PeBenito daa0e0
##		The type of the process performing this action.
Chris PeBenito daa0e0
##	</parameter>
Chris PeBenito daa0e0
##	<parameter name="role">
Chris PeBenito daa0e0
##		The role to be allowed the run_init domain.
Chris PeBenito daa0e0
##	</parameter>
Chris PeBenito daa0e0
##	<parameter name="terminal">
Chris PeBenito daa0e0
##		The type of the terminal allow the run_init domain to use.
Chris PeBenito daa0e0
##	</parameter>
Chris PeBenito daa0e0
##	<infoflow type="write" weight="10"/>
Chris PeBenito daa0e0
## </interface>
Chris PeBenito daa0e0
#
Chris PeBenito daa0e0
define(`selinux_run_init_transition_add_role_use_terminal',`
Chris PeBenito daa0e0
requires_block_template(`$0'_depend)
Chris PeBenito daa0e0
selinux_run_init_transition($1)
Chris PeBenito daa0e0
role $2 types run_init_t;
Chris PeBenito daa0e0
allow run_init_t $3:chr_file { getattr read write ioctl };
Chris PeBenito daa0e0
')
Chris PeBenito daa0e0
Chris PeBenito daa0e0
define(`selinux_run_init_transition_add_role_use_terminal_depend',`
Chris PeBenito daa0e0
type run_init_t;
Chris PeBenito daa0e0
class chr_file { getattr read write ioctl };
Chris PeBenito daa0e0
')
Chris PeBenito daa0e0
Chris PeBenito daa0e0
########################################
Chris PeBenito 8623d5
#
Chris PeBenito 8623d5
# selinux_run_init_use_file_descriptors(domain)
Chris PeBenito 8623d5
#
Chris PeBenito 8623d5
define(`selinux_run_init_use_file_descriptors',`
Chris PeBenito 8623d5
requires_block_template(`$0'_depend)
Chris PeBenito 8623d5
allow $1 run_init_t:fd use;
Chris PeBenito 8623d5
')
Chris PeBenito 8623d5
Chris PeBenito 8623d5
define(`selinux_run_init_use_file_descriptors_depend',`
Chris PeBenito 8623d5
type run_init_t;
Chris PeBenito 8623d5
class fd use;
Chris PeBenito 8623d5
')
Chris PeBenito 8623d5
Chris PeBenito daa0e0
########################################
Chris PeBenito daa0e0
## <interface name="selinux_setfiles_transition">
Chris PeBenito daa0e0
##	<description>
Chris PeBenito daa0e0
##		Execute setfiles in the setfiles domain.
Chris PeBenito daa0e0
##	</description>
Chris PeBenito daa0e0
##	<parameter name="domain">
Chris PeBenito daa0e0
##		The type of the process performing this action.
Chris PeBenito daa0e0
##	</parameter>
Chris PeBenito daa0e0
##	<infoflow type="write" weight="10"/>
Chris PeBenito daa0e0
## </interface>
Chris PeBenito 85bd7f
#
Chris PeBenito 85bd7f
define(`selinux_setfiles_transition',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito 85bd7f
allow $1 setfiles_exec_t:file { getattr read execute };
Chris PeBenito 85bd7f
allow $1 setfiles_t:process transition;
Chris PeBenito 85bd7f
type_transition $1 setfiles_exec_t:file setfiles_t;
Chris PeBenito 85bd7f
dontaudit $1 setfiles_t:process { noatsecure siginh rlimitinh };
Chris PeBenito 85bd7f
')
Chris PeBenito 85bd7f
Chris PeBenito 85bd7f
define(`selinux_setfiles_transition_depend',`
Chris PeBenito 85bd7f
type setfiles_t, setfiles_exec_t;
Chris PeBenito 85bd7f
class file { getattr read execute };
Chris PeBenito 85bd7f
class process { transition noatsecure siginh rlimitinh };
Chris PeBenito 85bd7f
')
Chris PeBenito 85bd7f
Chris PeBenito daa0e0
########################################
Chris PeBenito daa0e0
## <interface name="selinux_setfiles_transition_add_role_use_terminal">
Chris PeBenito daa0e0
##	<description>
Chris PeBenito daa0e0
##		Execute setfiles in the setfiles domain, and
Chris PeBenito daa0e0
##		allow the specified role the setfiles domain,
Chris PeBenito daa0e0
##		and use the caller's terminal.
Chris PeBenito daa0e0
##	</description>
Chris PeBenito daa0e0
##	<parameter name="domain">
Chris PeBenito daa0e0
##		The type of the process performing this action.
Chris PeBenito daa0e0
##	</parameter>
Chris PeBenito daa0e0
##	<parameter name="role">
Chris PeBenito daa0e0
##		The role to be allowed the setfiles domain.
Chris PeBenito daa0e0
##	</parameter>
Chris PeBenito daa0e0
##	<parameter name="terminal">
Chris PeBenito daa0e0
##		The type of the terminal allow the setfiles domain to use.
Chris PeBenito daa0e0
##	</parameter>
Chris PeBenito daa0e0
##	<infoflow type="write" weight="10"/>
Chris PeBenito daa0e0
## </interface>
Chris PeBenito daa0e0
#
Chris PeBenito daa0e0
define(`selinux_setfiles_transition_add_role_use_terminal',`
Chris PeBenito daa0e0
requires_block_template(`$0'_depend)
Chris PeBenito daa0e0
selinux_setfiles_transition($1)
Chris PeBenito daa0e0
role $2 types setfiles_t;
Chris PeBenito daa0e0
allow setfiles_t $3:chr_file { getattr read write ioctl };
Chris PeBenito daa0e0
')
Chris PeBenito daa0e0
Chris PeBenito daa0e0
define(`selinux_setfiles_transition_add_role_use_terminal_depend',`
Chris PeBenito daa0e0
type setfiles_t;
Chris PeBenito daa0e0
class chr_file { getattr read write ioctl };
Chris PeBenito daa0e0
')
Chris PeBenito daa0e0
Chris PeBenito 85bd7f
#######################################
Chris PeBenito 85bd7f
#
Chris PeBenito 85bd7f
# selinux_setfiles_execute(domain)
Chris PeBenito 85bd7f
#
Chris PeBenito 85bd7f
define(`selinux_setfiles_execute',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito 85bd7f
allow $1 setfiles_exec_t:file { getattr read execute execute_no_trans };
Chris PeBenito 85bd7f
')
Chris PeBenito 85bd7f
Chris PeBenito 85bd7f
define(`selinux_setfiles_execute_depend',`
Chris PeBenito fc83db
type setfiles_exec_t;
Chris PeBenito 85bd7f
class file { getattr read execute execute_no_trans };
Chris PeBenito 85bd7f
')
Chris PeBenito 85bd7f
Chris PeBenito b4cd15
########################################
Chris PeBenito b4cd15
#
Chris PeBenito bd202f
# selinux_read_config(domain)
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
define(`selinux_read_config',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito b4cd15
allow $1 selinux_config_t:dir { getattr search read };
Chris PeBenito b4cd15
allow $1 selinux_config_t:file { getattr read };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
define(`selinux_read_config_depend',`
Chris PeBenito b4cd15
type selinux_config_t;
Chris PeBenito b4cd15
class dir { getattr search read };
Chris PeBenito b4cd15
class file { getattr read };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
########################################
Chris PeBenito b4cd15
#
Chris PeBenito bd202f
# selinux_read_default_contexts(domain)
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
define(`selinux_read_default_contexts',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito b4cd15
allow $1 selinux_config_t:dir search;
Chris PeBenito b4cd15
allow $1 default_context_t:dir { getattr search read };
Chris PeBenito b4cd15
allow $1 default_context_t:file { getattr read };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
define(`selinux_read_default_contexts_depend',`
Chris PeBenito b4cd15
type selinux_config_t, default_context_t;
Chris PeBenito b4cd15
class dir { getattr search read };
Chris PeBenito b4cd15
class file { getattr read };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
########################################
Chris PeBenito b4cd15
#
Chris PeBenito bd202f
# selinux_read_file_contexts(domain)
Chris PeBenito ee5772
#
Chris PeBenito ee5772
define(`selinux_read_file_contexts',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito ee5772
allow $1 selinux_config_t:dir search;
Chris PeBenito ee5772
allow $1 file_context_t:dir { getattr search read };
Chris PeBenito ee5772
allow $1 file_context_t:file { getattr read };
Chris PeBenito ee5772
')
Chris PeBenito ee5772
Chris PeBenito ee5772
define(`selinux_read_file_contexts_depend',`
Chris PeBenito ee5772
type selinux_config_t, file_context_t;
Chris PeBenito ee5772
class dir { getattr search read };
Chris PeBenito ee5772
class file { getattr read };
Chris PeBenito ee5772
')
Chris PeBenito ee5772
Chris PeBenito ee5772
########################################
Chris PeBenito ee5772
#
Chris PeBenito bd202f
# selinux_read_binary_policy(domain)
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
define(`selinux_read_binary_policy',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito b4cd15
allow $1 policy_config_t:dir { getattr search read };
Chris PeBenito b4cd15
allow $1 policy_config_t:file { getattr read };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito a266e3
define(`selinux_read_binary_policy_depend',`
Chris PeBenito b4cd15
type policy_config_t;
Chris PeBenito b4cd15
class dir { getattr search read };
Chris PeBenito b4cd15
class file { getattr read };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
########################################
Chris PeBenito b4cd15
#
Chris PeBenito bd202f
# selinux_write_binary_policy(domain)
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
define(`selinux_write_binary_policy',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito b4cd15
allow $1 policy_config_t:dir { getattr search read write add_name remove_name };
Chris PeBenito b4cd15
allow $1 policy_config_t:file { getattr create write unlink };
Chris PeBenito b4cd15
typeattribute $1 can_write_binary_policy;
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
define(`selinux_write_binary_policy_depend',`
Chris PeBenito b4cd15
attribute can_write_binary_policy;
Chris PeBenito ef3734
type policy_config_t;
Chris PeBenito b4cd15
class dir { getattr search read write add_name remove_name };
Chris PeBenito b4cd15
class file { getattr create write unlink };
Chris PeBenito b4cd15
')
Chris PeBenito ef3734
Chris PeBenito ef3734
########################################
Chris PeBenito ef3734
#
Chris PeBenito ef3734
# selinux_manage_binary_policy(domain)
Chris PeBenito ef3734
#
Chris PeBenito ef3734
define(`selinux_manage_binary_policy',`
Chris PeBenito ef3734
requires_block_template(`$0'_depend)
Chris PeBenito ef3734
# FIXME: search etc_t:dir
Chris PeBenito ef3734
allow $1 selinux_config_t:dir search;
Chris PeBenito ef3734
allow $1 policy_config_t:dir { getattr search read };
Chris PeBenito ef3734
allow $1 policy_config_t:file { create ioctl read getattr lock write setattr append link unlink rename };
Chris PeBenito ef3734
typeattribute $1 can_write_binary_policy;
Chris PeBenito ef3734
')
Chris PeBenito ef3734
Chris PeBenito ef3734
define(`selinux_manage_binary_policy_depend',`
Chris PeBenito ef3734
attribute can_write_binary_policy;
Chris PeBenito ef3734
type selinux_config_t, policy_config_t;
Chris PeBenito ef3734
class dir { create read getattr lock setattr ioctl link unlink rename search add_name remove_name reparent write rmdir };
Chris PeBenito ef3734
class file { create ioctl read getattr lock write setattr append link unlink rename };
Chris PeBenito ef3734
')
Chris PeBenito ef3734
Chris PeBenito ef3734
########################################
Chris PeBenito ef3734
#
Chris PeBenito ef3734
# selinux_read_source_policy(domain)
Chris PeBenito ef3734
#
Chris PeBenito ef3734
define(`selinux_read_source_policy',`
Chris PeBenito ef3734
requires_block_template(`$0'_depend)
Chris PeBenito ef3734
# FIXME: search etc_t:dir
Chris PeBenito ef3734
allow $1 selinux_config_t:dir search;
Chris PeBenito ef3734
allow $1 policy_src_t:dir { getattr search read };
Chris PeBenito ef3734
allow $1 policy_src_t:file { getattr read };
Chris PeBenito ef3734
')
Chris PeBenito ef3734
Chris PeBenito ef3734
define(`selinux_read_source_policy_depend',`
Chris PeBenito ef3734
type selinux_config_t, policy_src_t;
Chris PeBenito ef3734
class dir { getattr search read };
Chris PeBenito ef3734
class file { getattr read };
Chris PeBenito ef3734
')
Chris PeBenito ef3734
Chris PeBenito ef3734
########################################
Chris PeBenito ef3734
#
Chris PeBenito ef3734
# selinux_manage_source_policy(domain)
Chris PeBenito ef3734
#
Chris PeBenito ef3734
define(`selinux_manage_source_policy',`
Chris PeBenito ef3734
requires_block_template(`$0'_depend)
Chris PeBenito ef3734
# FIXME: search etc_t:dir
Chris PeBenito ef3734
allow $1 selinux_config_t:dir search;
Chris PeBenito ef3734
allow $1 policy_src_t:dir { create read getattr lock setattr ioctl link unlink rename search add_name remove_name reparent write rmdir };
Chris PeBenito ef3734
allow $1 policy_src_t:file { create ioctl read getattr lock write setattr append link unlink rename };
Chris PeBenito ef3734
')
Chris PeBenito ef3734
Chris PeBenito ef3734
define(`selinux_manage_source_policy_depend',`
Chris PeBenito ef3734
type selinux_config_t, policy_src_t;
Chris PeBenito ef3734
class dir { create read getattr lock setattr ioctl link unlink rename search add_name remove_name reparent write rmdir };
Chris PeBenito ef3734
class file { create ioctl read getattr lock write setattr append link unlink rename };
Chris PeBenito ef3734
')