Chris PeBenito d46cfe
## <summary>Policy for user executable applications.</summary>
Chris PeBenito d46cfe
Chris PeBenito d46cfe
########################################
Chris PeBenito d46cfe
## <summary>
Chris PeBenito d46cfe
##	Make the specified type usable as an application domain.
Chris PeBenito d46cfe
## </summary>
Chris PeBenito d46cfe
## <param name="type">
Chris PeBenito d46cfe
##	<summary>
Chris PeBenito d46cfe
##	Type to be used as a domain type.
Chris PeBenito d46cfe
##	</summary>
Chris PeBenito d46cfe
## </param>
Chris PeBenito d46cfe
#
Chris PeBenito d46cfe
interface(`application_type',`
Chris PeBenito d46cfe
	gen_require(`
Chris PeBenito d46cfe
		attribute application_domain_type;
Chris PeBenito d46cfe
	')
Chris PeBenito d46cfe
Chris PeBenito d46cfe
	typeattribute $1 application_domain_type;
Chris PeBenito d46cfe
Chris PeBenito d46cfe
	# start with basic domain
Chris PeBenito d46cfe
	domain_type($1)
Chris PeBenito d46cfe
')
Chris PeBenito d46cfe
Chris PeBenito d46cfe
########################################
Chris PeBenito d46cfe
## <summary>
Chris PeBenito d46cfe
##	Make the specified type usable for files
Chris PeBenito d46cfe
##	that are exectuables, such as binary programs.
Chris PeBenito d46cfe
##	This does not include shared libraries.
Chris PeBenito d46cfe
## </summary>
Chris PeBenito d46cfe
## <param name="type">
Chris PeBenito d46cfe
##	<summary>
Chris PeBenito d46cfe
##	Type to be used for files.
Chris PeBenito d46cfe
##	</summary>
Chris PeBenito d46cfe
## </param>
Chris PeBenito d46cfe
#
Chris PeBenito d46cfe
interface(`application_executable_file',`
Chris PeBenito d46cfe
	gen_require(`
Chris PeBenito d46cfe
		attribute application_exec_type;
Chris PeBenito d46cfe
	')
Chris PeBenito d46cfe
Chris PeBenito d46cfe
	typeattribute $1 application_exec_type;
Chris PeBenito d46cfe
Chris PeBenito d46cfe
	corecmd_executable_file($1)
Chris PeBenito d46cfe
')
Chris PeBenito d46cfe
Chris PeBenito d46cfe
########################################
Chris PeBenito d46cfe
## <summary>
Chris PeBenito d46cfe
## Execute application executables in the caller domain.
Chris PeBenito d46cfe
## </summary>
Chris PeBenito d46cfe
## <param name="type">
Chris PeBenito d46cfe
##	<summary>
Chris PeBenito d46cfe
##	Domain allowed access.
Chris PeBenito d46cfe
##	</summary>
Chris PeBenito d46cfe
## </param>
Chris PeBenito d46cfe
#
Chris PeBenito d46cfe
interface(`application_exec',`
Chris PeBenito d46cfe
	gen_require(`
Chris PeBenito d46cfe
		attribute application_exec_type;
Chris PeBenito d46cfe
	')
Chris PeBenito d46cfe
Chris PeBenito d46cfe
	can_exec($1, application_exec_type)
Chris PeBenito d46cfe
')
Chris PeBenito d46cfe
Chris PeBenito d46cfe
########################################
Chris PeBenito d46cfe
## <summary>
Chris PeBenito 7d4161
##	Execute all executable files.
Chris PeBenito 7d4161
## </summary>
Chris PeBenito 7d4161
## <param name="domain">
Chris PeBenito 7d4161
##	<summary>
Chris PeBenito 7d4161
##	Domain allowed access.
Chris PeBenito 7d4161
##	</summary>
Chris PeBenito 7d4161
## </param>
Chris PeBenito 7d4161
## <rolecap/>
Chris PeBenito 7d4161
#
Chris PeBenito 7d4161
interface(`application_exec_all',`
Chris PeBenito 7d4161
	corecmd_dontaudit_exec_all_executables($1)
Chris PeBenito 7d4161
	corecmd_exec_bin($1)
Chris PeBenito 7d4161
	corecmd_exec_shell($1)
Chris PeBenito 7d4161
	corecmd_exec_chroot($1)
Chris PeBenito 7d4161
Chris PeBenito 7d4161
	application_exec($1)
Chris PeBenito 7d4161
')
Chris PeBenito 7d4161
Chris PeBenito 7d4161
########################################
Chris PeBenito 7d4161
## <summary>
Chris PeBenito b58db3
##	Create a domain for applications.
Chris PeBenito d46cfe
## </summary>
Chris PeBenito b58db3
## <desc>
Chris PeBenito b58db3
##	

Chris PeBenito b58db3
##	Create a domain for applications.  Typically these are
Chris PeBenito b58db3
##	programs that are run interactively.
Chris PeBenito b58db3
##	

Chris PeBenito b58db3
##	

Chris PeBenito b58db3
##	The types will be made usable as a domain and file, making
Chris PeBenito b58db3
##	calls to domain_type() and files_type() redundant.
Chris PeBenito b58db3
##	

Chris PeBenito b58db3
## </desc>
Chris PeBenito d46cfe
## <param name="domain">
Chris PeBenito d46cfe
##	<summary>
Chris PeBenito b58db3
##	Type to be used as an application domain.
Chris PeBenito d46cfe
##	</summary>
Chris PeBenito d46cfe
## </param>
Chris PeBenito d46cfe
## <param name="entry_point">
Chris PeBenito d46cfe
##	<summary>
Chris PeBenito d46cfe
##	Type of the program to be used as an entry point to this domain.
Chris PeBenito d46cfe
##	</summary>
Chris PeBenito d46cfe
## </param>
Chris PeBenito b58db3
## <infoflow type="none"/>
Chris PeBenito d46cfe
#
Chris PeBenito d46cfe
interface(`application_domain',`
Chris PeBenito d46cfe
	application_type($1)
Chris PeBenito d46cfe
	application_executable_file($2)
Chris PeBenito 5ed061
	domain_entry_file($1, $2)
Chris PeBenito 5ed061
')
Chris PeBenito 5ed061
Chris PeBenito 5ed061
########################################
Chris PeBenito 5ed061
## <summary>
Chris PeBenito 5ed061
##	Send signull to all application domains.
Chris PeBenito 5ed061
## </summary>
Chris PeBenito 5ed061
## <param name="domain">
Chris PeBenito 5ed061
##	<summary>
Chris PeBenito 5ed061
##	Domain allowed access.
Chris PeBenito 5ed061
##	</summary>
Chris PeBenito 5ed061
## </param>
Chris PeBenito 5ed061
#
Chris PeBenito 5ed061
interface(`application_signull',`
Chris PeBenito 5ed061
	gen_require(`
Chris PeBenito 5ed061
		attribute application_domain_type;
Chris PeBenito 5ed061
	')
Chris PeBenito 5ed061
Chris PeBenito 5ed061
	allow $1 application_domain_type:process signull;
Chris PeBenito d46cfe
')