Chris PeBenito 1c9f9a
## <module name="domain" layer="system">
Chris PeBenito 1c9f9a
## <summary>Core policy for domains.</summary>
Chris PeBenito e181fe
Chris PeBenito b4cd15
########################################
Chris PeBenito b4cd15
#
Chris PeBenito c9428d
# domain_base_domain_type(domain)
Chris PeBenito b4cd15
#
Chris PeBenito c9428d
define(`domain_base_domain_type',`
Chris PeBenito 0c73cd
	requires_block_template(`$0'_depend)
Chris PeBenito b4cd15
Chris PeBenito 0c73cd
	# mark as a domain
Chris PeBenito 0c73cd
	typeattribute $1 domain;
Chris PeBenito b4cd15
Chris PeBenito 0c73cd
	# allow the domain to read its /proc/pid entries
Chris PeBenito dd8229
	allow $1 self:dir r_dir_perms;
Chris PeBenito dd8229
	allow $1 self:{ file lnk_file } rw_file_perms;
Chris PeBenito b4cd15
Chris PeBenito 0c73cd
	# allow $1 to create child processes in this domain
Chris PeBenito 0c73cd
	allow $1 self:process { fork sigchld };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito c9428d
define(`domain_base_domain_type_depend',`
Chris PeBenito 0c73cd
	attribute domain;
Chris PeBenito 0c73cd
Chris PeBenito dd8229
	class dir r_dir_perms;
Chris PeBenito dd8229
	class file rw_file_perms;
Chris PeBenito dd8229
	class lnk_file r_file_perms;
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
########################################
Chris PeBenito b4cd15
#
Chris PeBenito c9428d
# domain_type(domain)
Chris PeBenito b4cd15
#
Chris PeBenito c9428d
define(`domain_type',`
Chris PeBenito 0c73cd
	# start with basic domain
Chris PeBenito c9428d
	domain_base_domain_type($1)
Chris PeBenito a9a20d
Chris PeBenito 0c73cd
	# Use trusted objects in /dev
Karl MacMillan f0c985
	dev_rw_null_dev($1)
Karl MacMillan f0c985
	dev_rw_zero_dev($1)
Chris PeBenito 0fd9dc
	term_use_controlling_term($1)
Chris PeBenito a9a20d
Chris PeBenito 0c73cd
	# read the root directory
Chris PeBenito c9428d
	files_list_root($1)
Chris PeBenito a9a20d
Chris PeBenito 0c73cd
	# send init a sigchld
Chris PeBenito 0c73cd
	init_sigchld($1)
Chris PeBenito 6b48fd
Chris PeBenito 0c73cd
	# this seems highly questionable:
Chris PeBenito 0c73cd
	optional_policy(`rpm.te',`
Chris PeBenito c9428d
		rpm_use_fd($1)
Chris PeBenito 0c73cd
		rpm_read_pipe($1)
Chris PeBenito 0c73cd
	')
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
########################################
Chris PeBenito b4cd15
#
Chris PeBenito c9428d
# domain_entry_file(domain,entrypointfile)
Chris PeBenito b4cd15
#
Chris PeBenito c9428d
define(`domain_entry_file',`
Chris PeBenito 0c73cd
	requires_block_template(`$0'_depend)
Chris PeBenito 0c73cd
Chris PeBenito c9428d
	files_file_type($2)
Chris PeBenito 0c73cd
	allow $1 $2:file entrypoint;
Chris PeBenito 0c73cd
	typeattribute $2 entry_type;
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito c9428d
define(`domain_entry_file_depend',`
Chris PeBenito 0c73cd
	attribute entry_type;
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	class file entrypoint;
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
########################################
Chris PeBenito b4cd15
#
Chris PeBenito c9428d
# domain_wide_inherit_fd(domain)
Chris PeBenito 8a0da1
#
Chris PeBenito c9428d
define(`domain_wide_inherit_fd',`
Chris PeBenito 0c73cd
	requires_block_template(`$0'_depend)
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	typeattribute $1 privfd;
Chris PeBenito 8a0da1
')
Chris PeBenito 8a0da1
Chris PeBenito c9428d
define(`domain_wide_inherit_fd_depend',`
Chris PeBenito 0c73cd
	attribute privfd;
Chris PeBenito 8a0da1
')
Chris PeBenito 8a0da1
Chris PeBenito 8a0da1
########################################
Chris PeBenito 8a0da1
#
Chris PeBenito c9428d
# domain_use_wide_inherit_fd(domain)
Chris PeBenito a2d824
#
Chris PeBenito c9428d
define(`domain_use_wide_inherit_fd',`
Chris PeBenito 0c73cd
	requires_block_template(`$0'_depend)
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	allow $1 privfd:fd use;
Chris PeBenito a2d824
')
Chris PeBenito a2d824
Chris PeBenito c9428d
define(`domain_use_wide_inherit_fd_depend',`
Chris PeBenito 0c73cd
	attribute privfd;
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	class fd use;
Chris PeBenito a2d824
')
Chris PeBenito a2d824
Chris PeBenito a2d824
########################################
Chris PeBenito a2d824
#
Chris PeBenito c9428d
# domain_dontaudit_use_wide_inherit_fd(domain)
Chris PeBenito 3ce6cb
#
Chris PeBenito c9428d
define(`domain_dontaudit_use_wide_inherit_fd',`
Chris PeBenito 0c73cd
	requires_block_template(`$0'_depend)
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	dontaudit $1 privfd:fd use;
Chris PeBenito 3ce6cb
')
Chris PeBenito 3ce6cb
Chris PeBenito c9428d
define(`domain_dontaudit_use_wide_inherit_fd_depend',`
Chris PeBenito 0c73cd
	attribute privfd;
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	class fd use;
Chris PeBenito 3ce6cb
')
Chris PeBenito 3ce6cb
Chris PeBenito 3ce6cb
########################################
Chris PeBenito 3ce6cb
#
Chris PeBenito c9428d
# domain_setpriority_all_domains(domain)
Chris PeBenito 5817e3
#
Chris PeBenito c9428d
define(`domain_setpriority_all_domains',`
Chris PeBenito 0c73cd
	requires_block_template(`$0'_depend)
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	allow $1 domain:process setsched;
Chris PeBenito 5817e3
')
Chris PeBenito 5817e3
Chris PeBenito c9428d
define(`domain_setpriority_all_domains_depend',`
Chris PeBenito 0c73cd
	attribute domain;
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	class process setsched;
Chris PeBenito 5817e3
')
Chris PeBenito 5817e3
Chris PeBenito 5817e3
########################################
Chris PeBenito c6fd1f
## <interface name="domain_signal_all_domains">
Chris PeBenito c6fd1f
##	<description>
Chris PeBenito c6fd1f
##		Send general signals to all domains.
Chris PeBenito c6fd1f
##	</description>
Chris PeBenito c6fd1f
##	<parameter name="domain">
Chris PeBenito c6fd1f
##		The type of the process performing this action.
Chris PeBenito c6fd1f
##	</parameter>
Chris PeBenito c6fd1f
## </interface>
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
define(`domain_signal_all_domains',`
Chris PeBenito 0c73cd
	requires_block_template(`$0'_depend)
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	allow $1 domain:process signal;
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
define(`domain_signal_all_domains_depend',`
Chris PeBenito 0c73cd
	attribute domain;
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	class process signal;
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
########################################
Chris PeBenito 1c9f9a
## <interface name="domain_signull_all_domains">
Chris PeBenito 1c9f9a
##	<description>
Chris PeBenito 1c9f9a
##		Send a null signal to all domains.
Chris PeBenito 1c9f9a
##	</description>
Chris PeBenito 1c9f9a
##	<parameter name="domain">
Chris PeBenito 1c9f9a
##		The type of the process performing this action.
Chris PeBenito 1c9f9a
##	</parameter>
Chris PeBenito 1c9f9a
## </interface>
Chris PeBenito 1c9f9a
#
Chris PeBenito 1c9f9a
define(`domain_signull_all_domains',`
Chris PeBenito 0c73cd
	requires_block_template(`$0'_depend)
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	allow $1 domain:process signull;
Chris PeBenito 1c9f9a
')
Chris PeBenito 1c9f9a
Chris PeBenito 1c9f9a
define(`domain_signull_all_domains_depend',`
Chris PeBenito 0c73cd
	attribute domain;
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	class process signull;
Chris PeBenito 1c9f9a
')
Chris PeBenito 1c9f9a
Chris PeBenito 1c9f9a
########################################
Chris PeBenito c6fd1f
## <interface name="domain_sigstop_all_domains">
Chris PeBenito c6fd1f
##	<description>
Chris PeBenito c6fd1f
##		Send a stop signal to all domains.
Chris PeBenito c6fd1f
##	</description>
Chris PeBenito c6fd1f
##	<parameter name="domain">
Chris PeBenito c6fd1f
##		The type of the process performing this action.
Chris PeBenito c6fd1f
##	</parameter>
Chris PeBenito c6fd1f
## </interface>
Chris PeBenito c6fd1f
#
Chris PeBenito c6fd1f
define(`domain_sigstop_all_domains',`
Chris PeBenito 0c73cd
	requires_block_template(`$0'_depend)
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	allow $1 domain:process sigstop;
Chris PeBenito c6fd1f
')
Chris PeBenito c6fd1f
Chris PeBenito c6fd1f
define(`domain_sigstop_all_domains_depend',`
Chris PeBenito 0c73cd
	attribute domain;
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	class process sigstop;
Chris PeBenito c6fd1f
')
Chris PeBenito c6fd1f
Chris PeBenito c6fd1f
########################################
Chris PeBenito c6fd1f
## <interface name="domain_sigchld_all_domains">
Chris PeBenito c6fd1f
##	<description>
Chris PeBenito c6fd1f
##		Send a child terminated signal to all domains.
Chris PeBenito c6fd1f
##	</description>
Chris PeBenito c6fd1f
##	<parameter name="domain">
Chris PeBenito c6fd1f
##		The type of the process performing this action.
Chris PeBenito c6fd1f
##	</parameter>
Chris PeBenito c6fd1f
## </interface>
Chris PeBenito b4cd15
#
Chris PeBenito c6fd1f
define(`domain_sigchld_all_domains',`
Chris PeBenito 0c73cd
	requires_block_template(`$0'_depend)
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	allow $1 domain:process sigchld;
Chris PeBenito c6fd1f
')
Chris PeBenito c6fd1f
Chris PeBenito c6fd1f
define(`domain_sigchld_all_domains_depend',`
Chris PeBenito 0c73cd
	attribute domain;
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	class process sigchld;
Chris PeBenito c6fd1f
')
Chris PeBenito c6fd1f
Chris PeBenito c6fd1f
########################################
Chris PeBenito c6fd1f
## <interface name="domain_kill_all_domains">
Chris PeBenito c6fd1f
##	<description>
Chris PeBenito c6fd1f
##		Send a kill signal to all domains.
Chris PeBenito c6fd1f
##	</description>
Chris PeBenito c6fd1f
##	<parameter name="domain">
Chris PeBenito c6fd1f
##		The type of the process performing this action.
Chris PeBenito c6fd1f
##	</parameter>
Chris PeBenito c6fd1f
## </interface>
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
define(`domain_kill_all_domains',`
Chris PeBenito 0c73cd
	requires_block_template(`$0'_depend)
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	allow $1 domain:process sigkill;
Chris PeBenito 0c73cd
	allow $1 self:capability kill;
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
define(`domain_kill_all_domains_depend',`
Chris PeBenito 0c73cd
	attribute domain;
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	class process sigkill;
Chris PeBenito 0c73cd
	class capability kill;
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
########################################
Chris PeBenito c9428d
## <interface name="domain_read_all_domains_state">
Chris PeBenito daa0e0
##	<description>
Chris PeBenito daa0e0
##		Read the process state (/proc/pid) of all domains.
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
## </interface>
Chris PeBenito b4cd15
#
Chris PeBenito c9428d
define(`domain_read_all_domains_state',`
Chris PeBenito 0c73cd
	requires_block_template(`$0'_depend)
Chris PeBenito 0c73cd
Chris PeBenito dd8229
	allow $1 domain:dir r_dir_perms;
Chris PeBenito dd8229
	allow $1 domain:lnk_file r_file_perms;
Chris PeBenito dd8229
	allow $1 domain:file r_file_perms;
Chris PeBenito 0c73cd
	allow $1 domain:process getattr;
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	# We need to suppress this denial because procps tries to access
Chris PeBenito 0c73cd
	# /proc/pid/environ and this now triggers a ptrace check in recent kernels
Chris PeBenito 0c73cd
	# (2.4 and 2.6).  Might want to change procps to not do this, or only if
Chris PeBenito 0c73cd
	# running in a privileged domain.
Chris PeBenito 0c73cd
	dontaudit $1 domain:process ptrace;
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito c9428d
define(`domain_read_all_domains_state_depend',`
Chris PeBenito 0c73cd
	attribute domain;
Chris PeBenito 0c73cd
Chris PeBenito dd8229
	class dir r_dir_perms;
Chris PeBenito dd8229
	class lnk_file r_file_perms;
Chris PeBenito dd8229
	class file r_file_perms;
Chris PeBenito 0c73cd
	class process { getattr ptrace };
Chris PeBenito d490eb
')
Chris PeBenito d490eb
Chris PeBenito d490eb
########################################
Chris PeBenito c9428d
## <interface name="domain_dontaudit_list_all_domains_proc">
Chris PeBenito d490eb
##	<description>
Chris PeBenito d490eb
##		Do not audit attempts to read the process state
Chris PeBenito d490eb
##		directories of all domains.
Chris PeBenito d490eb
##	</description>
Chris PeBenito d490eb
##	<parameter name="domain">
Chris PeBenito d490eb
##		The type of the process performing this action.
Chris PeBenito d490eb
##	</parameter>
Chris PeBenito d490eb
## </interface>
Chris PeBenito d490eb
#
Chris PeBenito c9428d
define(`domain_dontaudit_list_all_domains_proc',`
Chris PeBenito 0c73cd
	requires_block_template(`$0'_depend)
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	dontaudit $1 domain:dir r_dir_perms;
Chris PeBenito d490eb
')
Chris PeBenito d490eb
Chris PeBenito c9428d
define(`domain_dontaudit_list_all_domains_proc_depend',`
Chris PeBenito 0c73cd
	attribute domain;
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	class dir r_dir_perms;
Chris PeBenito d490eb
')
Chris PeBenito d490eb
Chris PeBenito d490eb
Chris PeBenito d490eb
########################################
Chris PeBenito c9428d
## <interface name="domain_getsession_all_domains">
Chris PeBenito d490eb
##	<description>
Chris PeBenito d490eb
##		Get the session ID of all domains.
Chris PeBenito d490eb
##	</description>
Chris PeBenito d490eb
##	<parameter name="domain">
Chris PeBenito d490eb
##		The type of the process performing this action.
Chris PeBenito d490eb
##	</parameter>
Chris PeBenito d490eb
## </interface>
Chris PeBenito d490eb
#
Chris PeBenito c9428d
define(`domain_getsession_all_domains',`
Chris PeBenito 0c73cd
	requires_block_template(`$0'_depend)
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	allow $1 domain:process getsession;
Chris PeBenito d490eb
')
Chris PeBenito d490eb
Chris PeBenito c9428d
define(`domain_getsession_all_domains_depend',`
Chris PeBenito 0c73cd
	attribute domain;
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	class process getsession;
Chris PeBenito b4cd15
')
Chris PeBenito 960373
Chris PeBenito 960373
########################################
Chris PeBenito c9428d
## <interface name="domain_dontaudit_getattr_all_udp_sockets">
Chris PeBenito f5c42b
##	<description>
Chris PeBenito f5c42b
##		Do not audit attempts to get the attributes
Chris PeBenito f5c42b
##		of all domains UDP sockets.
Chris PeBenito f5c42b
##	</description>
Chris PeBenito f5c42b
##	<parameter name="domain">
Chris PeBenito f5c42b
##		The type of the process performing this action.
Chris PeBenito f5c42b
##	</parameter>
Chris PeBenito f5c42b
## </interface>
Chris PeBenito f5c42b
#
Chris PeBenito c9428d
define(`domain_dontaudit_getattr_all_udp_sockets',`
Chris PeBenito 0c73cd
	requires_block_template(`$0'_depend)
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	dontaudit $1 domain:udp_socket getattr;
Chris PeBenito f5c42b
')
Chris PeBenito f5c42b
Chris PeBenito c9428d
define(`domain_dontaudit_getattr_all_udp_sockets_depend',`
Chris PeBenito 0c73cd
	attribute domain;
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	class udp_socket getattr;
Chris PeBenito f5c42b
')
Chris PeBenito f5c42b
Chris PeBenito f5c42b
########################################
Chris PeBenito c9428d
## <interface name="domain_dontaudit_getattr_all_tcp_sockets">
Chris PeBenito f5c42b
##	<description>
Chris PeBenito f5c42b
##		Do not audit attempts to get the attributes
Chris PeBenito f5c42b
##		of all domains TCP sockets.
Chris PeBenito f5c42b
##	</description>
Chris PeBenito f5c42b
##	<parameter name="domain">
Chris PeBenito f5c42b
##		The type of the process performing this action.
Chris PeBenito f5c42b
##	</parameter>
Chris PeBenito f5c42b
## </interface>
Chris PeBenito f5c42b
#
Chris PeBenito c9428d
define(`domain_dontaudit_getattr_all_tcp_sockets',`
Chris PeBenito 0c73cd
	requires_block_template(`$0'_depend)
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	dontaudit $1 domain:tcp_socket getattr;
Chris PeBenito f5c42b
')
Chris PeBenito f5c42b
Chris PeBenito c9428d
define(`domain_dontaudit_getattr_all_tcp_sockets_depend',`
Chris PeBenito 0c73cd
	attribute domain;
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	class tcp_socket getattr;
Chris PeBenito f5c42b
')
Chris PeBenito f5c42b
Chris PeBenito f5c42b
########################################
Chris PeBenito c9428d
## <interface name="domain_dontaudit_getattr_all_unix_dgram_sockets">
Chris PeBenito f5c42b
##	<description>
Chris PeBenito f5c42b
##		Do not audit attempts to get the attributes
Chris PeBenito f5c42b
##		of all domains unix datagram sockets.
Chris PeBenito f5c42b
##	</description>
Chris PeBenito f5c42b
##	<parameter name="domain">
Chris PeBenito f5c42b
##		The type of the process performing this action.
Chris PeBenito f5c42b
##	</parameter>
Chris PeBenito f5c42b
## </interface>
Chris PeBenito f5c42b
#
Chris PeBenito c9428d
define(`domain_dontaudit_getattr_all_unix_dgram_sockets',`
Chris PeBenito 0c73cd
	requires_block_template(`$0'_depend)
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	dontaudit $1 domain:unix_dgram_socket getattr;
Chris PeBenito f5c42b
')
Chris PeBenito f5c42b
Chris PeBenito c9428d
define(`domain_dontaudit_getattr_all_unix_dgram_sockets_depend',`
Chris PeBenito 0c73cd
	attribute domain;
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	class unix_dgram_socket getattr;
Chris PeBenito f5c42b
')
Chris PeBenito f5c42b
Chris PeBenito f5c42b
########################################
Chris PeBenito c9428d
## <interface name="domain_dontaudit_getattr_all_unnamed_pipes">
Chris PeBenito f5c42b
##	<description>
Chris PeBenito f5c42b
##		Do not audit attempts to get the attributes
Chris PeBenito f5c42b
##		of all domains unnamed pipes.
Chris PeBenito f5c42b
##	</description>
Chris PeBenito f5c42b
##	<parameter name="domain">
Chris PeBenito f5c42b
##		The type of the process performing this action.
Chris PeBenito f5c42b
##	</parameter>
Chris PeBenito f5c42b
## </interface>
Chris PeBenito f5c42b
#
Chris PeBenito c9428d
define(`domain_dontaudit_getattr_all_unnamed_pipes',`
Chris PeBenito 0c73cd
	requires_block_template(`$0'_depend)
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	dontaudit $1 domain:fifo_file getattr;
Chris PeBenito f5c42b
')
Chris PeBenito f5c42b
Chris PeBenito c9428d
define(`domain_dontaudit_getattr_all_unnamed_pipes_depend',`
Chris PeBenito 0c73cd
	attribute domain;
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	class fifo_file getattr;
Chris PeBenito f5c42b
')
Chris PeBenito f5c42b
Chris PeBenito f5c42b
########################################
Chris PeBenito 960373
#
Chris PeBenito c9428d
# domain_exec_all_entry_files(domain)
Chris PeBenito 960373
#
Chris PeBenito c9428d
define(`domain_exec_all_entry_files',`
Chris PeBenito 0c73cd
	requires_block_template(`$0'_depend)
Chris PeBenito dd8229
	
Chris PeBenito dd8229
	can_exec($1,entry_type)
Chris PeBenito 0c73cd
Chris PeBenito 960373
')
Chris PeBenito 960373
Chris PeBenito c9428d
define(`domain_exec_all_entry_files_depend',`
Chris PeBenito 0c73cd
	attribute entry_type;
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	class file { getattr read ioctl lock execute execute_no_trans };
Chris PeBenito 960373
')
Chris PeBenito f1470e
Chris PeBenito f1470e
########################################
Chris PeBenito f1470e
#
Chris PeBenito c9428d
# domain_read_all_entry_files(domain)
Chris PeBenito f1470e
#
Chris PeBenito c9428d
define(`domain_read_all_entry_files',`
Chris PeBenito 0c73cd
	requires_block_template(`$0'_depend)
Chris PeBenito 0c73cd
Chris PeBenito dd8229
	allow $1 entry_type:lnk_file r_file_perms;
Chris PeBenito 0c73cd
	allow $1 entry_type:file r_file_perms;
Chris PeBenito f1470e
')
Chris PeBenito f1470e
Chris PeBenito c9428d
define(`domain_read_all_entry_files_depend',`
Chris PeBenito 0c73cd
	attribute entry_type;
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	class file r_file_perms;
Chris PeBenito dd8229
	class lnk_file r_file_perms;
Chris PeBenito f1470e
')
Chris PeBenito 1c9f9a
Chris PeBenito 1c9f9a
## </module>
Chris PeBenito a1d2e8
Chris PeBenito a1d2e8
#
Chris PeBenito a1d2e8
# These next macros are not interfaces, but actually are 
Chris PeBenito 066d46
# support macros.  Due to the domain_ prefix, they 
Chris PeBenito a1d2e8
# are placed in this module.
Chris PeBenito a1d2e8
#
Chris PeBenito a1d2e8
Chris PeBenito a1d2e8
########################################
Chris PeBenito a1d2e8
#
Chris PeBenito a1d2e8
# domain_trans(source_domain,entrypoint_file,target_domain)
Chris PeBenito a1d2e8
#
Chris PeBenito 763c44
define(`domain_trans',`
Chris PeBenito a1d2e8
	requires_block_template(`$0'_depend)
Chris PeBenito a1d2e8
Chris PeBenito dd8229
	allow $1 $2:file rx_file_perms;
Chris PeBenito a1d2e8
	allow $1 $3:process transition;
Chris PeBenito a1d2e8
	dontaudit $1 $3:process { noatsecure siginh rlimitinh };
Chris PeBenito a1d2e8
')
Chris PeBenito a1d2e8
Chris PeBenito a1d2e8
define(`domain_trans_depend',`
Chris PeBenito dd8229
	class file rx_file_perms;
Chris PeBenito 2d6893
	process { transition noatsecure siginh rlimitinh };
Chris PeBenito 2d6893
')
Chris PeBenito a1d2e8
Chris PeBenito a1d2e8
########################################
Chris PeBenito a1d2e8
#
Chris PeBenito a1d2e8
# domain_auto_trans(source_domain,entrypoint_file,target_domain)
Chris PeBenito a1d2e8
#
Chris PeBenito a1d2e8
define(`domain_auto_trans',`
Chris PeBenito a1d2e8
	domain_trans($1,$2,$3)
Chris PeBenito a1d2e8
	type_transition $1 $2:process $3;
Chris PeBenito a1d2e8
')