Chris PeBenito 17de1b
## <summary>Policy for SELinux policy and userland applications.</summary>
Chris PeBenito 17de1b
Chris PeBenito 17de1b
#######################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Execute checkpolicy in the checkpolicy domain.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Domain allowed access.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`seutil_domtrans_checkpolicy',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type checkpolicy_t, checkpolicy_exec_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	files_search_usr($1)
Chris PeBenito 17de1b
	corecmd_search_bin($1)
Chris PeBenito c0868a
	domtrans_pattern($1,checkpolicy_exec_t,checkpolicy_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Execute checkpolicy in the checkpolicy domain, and
Chris PeBenito 17de1b
##	allow the specified role the checkpolicy domain,
Chris PeBenito 17de1b
##	and use the caller's terminal.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Domain allowed access.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
## <param name="role">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	The role to be allowed the checkpolicy domain.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
## <param name="terminal">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	The type of the terminal allow the checkpolicy domain to use.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito bbcd3c
## <rolecap/>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`seutil_run_checkpolicy',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type checkpolicy_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	seutil_domtrans_checkpolicy($1)
Chris PeBenito 17de1b
	role $2 types checkpolicy_t;
Chris PeBenito 17de1b
	allow checkpolicy_t $3:chr_file rw_term_perms;
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Execute checkpolicy in the caller domain.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Domain allowed access.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito bbcd3c
## <rolecap/>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`seutil_exec_checkpolicy',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type checkpolicy_exec_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	files_search_usr($1)
Chris PeBenito 17de1b
	corecmd_search_bin($1)
Chris PeBenito 17de1b
	can_exec($1,checkpolicy_exec_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
#######################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Execute load_policy in the load_policy domain.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Domain allowed access.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`seutil_domtrans_loadpolicy',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type load_policy_t, load_policy_exec_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 8021cb
	corecmd_search_bin($1)
Chris PeBenito c0868a
	domtrans_pattern($1,load_policy_exec_t,load_policy_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Execute load_policy in the load_policy domain, and
Chris PeBenito 17de1b
##	allow the specified role the load_policy domain,
Chris PeBenito 17de1b
##	and use the caller's terminal.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Domain allowed access.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
## <param name="role">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	The role to be allowed the load_policy domain.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
## <param name="terminal">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	The type of the terminal allow the load_policy domain to use.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito bbcd3c
## <rolecap/>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`seutil_run_loadpolicy',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type load_policy_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	seutil_domtrans_loadpolicy($1)
Chris PeBenito 17de1b
	role $2 types load_policy_t;
Chris PeBenito 17de1b
	allow load_policy_t $3:chr_file rw_term_perms;
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Execute load_policy in the caller domain.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Domain allowed access.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`seutil_exec_loadpolicy',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type load_policy_exec_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 8021cb
	corecmd_search_bin($1)
Chris PeBenito 17de1b
	can_exec($1,load_policy_exec_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Read the load_policy program file.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Domain allowed access.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`seutil_read_loadpolicy',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type load_policy_exec_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 8021cb
	corecmd_search_bin($1)
Chris PeBenito c0868a
	allow $1 load_policy_exec_t:file read_file_perms;
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
#######################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Execute newrole in the load_policy domain.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Domain allowed access.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`seutil_domtrans_newrole',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type newrole_t, newrole_exec_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	files_search_usr($1)
Chris PeBenito 17de1b
	corecmd_search_bin($1)
Chris PeBenito c0868a
	domtrans_pattern($1,newrole_exec_t,newrole_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Execute newrole in the newrole domain, and
Chris PeBenito 17de1b
##	allow the specified role the newrole domain,
Chris PeBenito 17de1b
##	and use the caller's terminal.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Domain allowed access.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
## <param name="role">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	The role to be allowed the newrole domain.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
## <param name="terminal">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	The type of the terminal allow the newrole domain to use.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito bbcd3c
## <rolecap/>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`seutil_run_newrole',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type newrole_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	seutil_domtrans_newrole($1)
Chris PeBenito 17de1b
	role $2 types newrole_t;
Chris PeBenito 17de1b
	allow newrole_t $3:chr_file rw_term_perms;
Chris PeBenito c2b87f
Chris PeBenito c2b87f
	auth_run_upd_passwd(newrole_t, $2, $3)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Execute newrole in the caller domain.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Domain allowed access.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`seutil_exec_newrole',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type newrole_t, newrole_exec_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	files_search_usr($1)
Chris PeBenito 17de1b
	corecmd_search_bin($1)
Chris PeBenito 17de1b
	can_exec($1,newrole_exec_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Do not audit the caller attempts to send
Chris PeBenito 17de1b
##	a signal to newrole.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Domain allowed access.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`seutil_dontaudit_signal_newrole',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type newrole_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	dontaudit $1 newrole_t:process signal;
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Send a SIGCHLD signal to newrole.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Domain allowed access.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`seutil_sigchld_newrole',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type newrole_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	allow $1 newrole_t:process sigchld;
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Inherit and use newrole file descriptors.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Domain allowed access.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`seutil_use_newrole_fds',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type newrole_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	allow $1 newrole_t:fd use;
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
#######################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 762d2c
##	Execute restorecon in the restorecon domain.  (Deprecated)
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Domain allowed access.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`seutil_domtrans_restorecon',`
Chris PeBenito 762d2c
	refpolicywarn(`$0($*) has been deprecated, please use seutil_domtrans_setfiles() instead.')
Chris PeBenito 762d2c
	seutil_domtrans_setfiles($1)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Execute restorecon in the restorecon domain, and
Chris PeBenito 17de1b
##	allow the specified role the restorecon domain,
Chris PeBenito 762d2c
##	and use the caller's terminal.  (Deprecated)
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Domain allowed access.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
## <param name="role">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	The role to be allowed the restorecon domain.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
## <param name="terminal">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	The type of the terminal allow the restorecon domain to use.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito bbcd3c
## <rolecap/>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`seutil_run_restorecon',`
Chris PeBenito 762d2c
	refpolicywarn(`$0($*) has been deprecated, please use seutil_run_setfiles() instead.')
Chris PeBenito 762d2c
	seutil_run_setfiles($1,$2,$3)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 762d2c
##	Execute restorecon in the caller domain.  (Deprecated)
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Domain allowed access.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito bbcd3c
## <rolecap/>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`seutil_exec_restorecon',`
Chris PeBenito 762d2c
	refpolicywarn(`$0($*) has been deprecated, please use seutil_exec_setfiles() instead.')
Chris PeBenito 762d2c
	seutil_exec_setfiles($1)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Execute run_init in the run_init domain.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Domain allowed access.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`seutil_domtrans_runinit',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type run_init_t, run_init_exec_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	files_search_usr($1)
Chris PeBenito 8021cb
	corecmd_search_bin($1)
Chris PeBenito c0868a
	domtrans_pattern($1,run_init_exec_t,run_init_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Execute init scripts in the run_init domain.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <desc>
Chris PeBenito 17de1b
##	

Chris PeBenito 17de1b
##	Execute init scripts in the run_init domain.
Chris PeBenito 17de1b
##	This is used for the Gentoo integrated run_init.
Chris PeBenito 17de1b
##	

Chris PeBenito 17de1b
## </desc>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Domain allowed access.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`seutil_init_script_domtrans_runinit',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type run_init_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	init_script_file_domtrans($1,run_init_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	allow run_init_t $1:fd use;
Chris PeBenito 17de1b
	allow run_init_t $1:fifo_file rw_file_perms;
Chris PeBenito 17de1b
	allow run_init_t $1:process sigchld;
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Execute run_init in the run_init domain, and
Chris PeBenito 17de1b
##	allow the specified role the run_init domain,
Chris PeBenito 17de1b
##	and use the caller's terminal.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Domain allowed access.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
## <param name="role">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	The role to be allowed the run_init domain.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
## <param name="terminal">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	The type of the terminal allow the run_init domain to use.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito bbcd3c
## <rolecap/>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`seutil_run_runinit',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type run_init_t;
Chris PeBenito 17de1b
		role system_r;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito d87efe
	auth_run_chk_passwd(run_init_t, $2, $3)
Chris PeBenito 17de1b
	seutil_domtrans_runinit($1)
Chris PeBenito 17de1b
	role $2 types run_init_t;
Chris PeBenito 17de1b
	allow run_init_t $3:chr_file rw_term_perms;
Chris PeBenito 17de1b
	allow $2 system_r;
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Execute init scripts in the run_init domain, and
Chris PeBenito 17de1b
##	allow the specified role the run_init domain,
Chris PeBenito 17de1b
##	and use the caller's terminal.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <desc>
Chris PeBenito 17de1b
##	

Chris PeBenito 17de1b
##	Execute init scripts in the run_init domain, and
Chris PeBenito 17de1b
##	allow the specified role the run_init domain,
Chris PeBenito 17de1b
##	and use the caller's terminal.
Chris PeBenito 17de1b
##	

Chris PeBenito 17de1b
##	

Chris PeBenito 17de1b
##	This is used for the Gentoo integrated run_init.
Chris PeBenito 17de1b
##	

Chris PeBenito 17de1b
## </desc>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Domain allowed access.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
## <param name="role">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	The role to be allowed the run_init domain.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
## <param name="terminal">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	The type of the terminal allow the run_init domain to use.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`seutil_init_script_run_runinit',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type run_init_t;
Chris PeBenito 17de1b
		role system_r;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito d87efe
	auth_run_chk_passwd(run_init_t, $2, $3)
Chris PeBenito 17de1b
	seutil_init_script_domtrans_runinit($1)
Chris PeBenito 17de1b
	role $2 types run_init_t;
Chris PeBenito 17de1b
	allow run_init_t $3:chr_file rw_term_perms;
Chris PeBenito 17de1b
	allow $2 system_r;
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Inherit and use run_init file descriptors.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Domain allowed access.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`seutil_use_runinit_fds',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type run_init_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	allow $1 run_init_t:fd use;
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Execute setfiles in the setfiles domain.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Domain allowed access.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`seutil_domtrans_setfiles',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type setfiles_t, setfiles_exec_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	files_search_usr($1)
Chris PeBenito 8021cb
	corecmd_search_bin($1)
Chris PeBenito c0868a
	domtrans_pattern($1,setfiles_exec_t,setfiles_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Execute setfiles in the setfiles domain, and
Chris PeBenito 17de1b
##	allow the specified role the setfiles domain,
Chris PeBenito 17de1b
##	and use the caller's terminal.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Domain allowed access.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
## <param name="role">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	The role to be allowed the setfiles domain.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
## <param name="terminal">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	The type of the terminal allow the setfiles domain to use.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito bbcd3c
## <rolecap/>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`seutil_run_setfiles',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type setfiles_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	seutil_domtrans_setfiles($1)
Chris PeBenito 17de1b
	role $2 types setfiles_t;
Chris PeBenito 17de1b
	allow setfiles_t $3:chr_file rw_term_perms;
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Execute setfiles in the caller domain.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Domain allowed access.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`seutil_exec_setfiles',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type setfiles_exec_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	files_search_usr($1)
Chris PeBenito 8021cb
	corecmd_search_bin($1)
Chris PeBenito 17de1b
	can_exec($1,setfiles_exec_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Do not audit attempts to search the SELinux
Chris PeBenito 17de1b
##	configuration directory (/etc/selinux).
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Domain to not audit.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`seutil_dontaudit_search_config',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type selinux_config_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	dontaudit $1 selinux_config_t:dir search;
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Do not audit attempts to read the SELinux
Chris PeBenito 17de1b
##	userland configuration (/etc/selinux).
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Domain to not audit.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`seutil_dontaudit_read_config',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type selinux_config_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	dontaudit $1 selinux_config_t:dir search;
Chris PeBenito 17de1b
	dontaudit $1 selinux_config_t:file { getattr read };
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Read the general SELinux configuration files.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Domain allowed access.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito bbcd3c
## <rolecap/>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`seutil_read_config',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type selinux_config_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	files_search_etc($1)
Chris PeBenito c0868a
	allow $1 selinux_config_t:dir list_dir_perms;
Chris PeBenito c0868a
	read_files_pattern($1,selinux_config_t,selinux_config_t)
Chris PeBenito c0868a
	read_lnk_files_pattern($1,selinux_config_t,selinux_config_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito d5ae68
########################################
Chris PeBenito d5ae68
## <summary>
Chris PeBenito d5ae68
##	Read and write the general SELinux configuration files.
Chris PeBenito d5ae68
## </summary>
Chris PeBenito d5ae68
## <param name="domain">
Chris PeBenito d5ae68
##	<summary>
Chris PeBenito d5ae68
##	Domain allowed access.
Chris PeBenito d5ae68
##	</summary>
Chris PeBenito d5ae68
## </param>
Chris PeBenito d5ae68
## <rolecap/>
Chris PeBenito d5ae68
#
Chris PeBenito d5ae68
interface(`seutil_rw_config',`
Chris PeBenito d5ae68
	gen_require(`
Chris PeBenito d5ae68
		type selinux_config_t;
Chris PeBenito d5ae68
	')
Chris PeBenito d5ae68
Chris PeBenito d5ae68
	files_search_etc($1)
Chris PeBenito d5ae68
	allow $1 selinux_config_t:dir list_dir_perms;
Chris PeBenito c0868a
	rw_files_pattern($1,selinux_config_t,selinux_config_t)
Chris PeBenito d5ae68
')
Chris PeBenito d5ae68
Chris PeBenito 17de1b
#######################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Create, read, write, and delete
Chris PeBenito 53da70
##	the general selinux configuration files.  (Deprecated)
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 53da70
## <desc>
Chris PeBenito 53da70
##	

Chris PeBenito 53da70
##	Create, read, write, and delete
Chris PeBenito 53da70
##	the general selinux configuration files.
Chris PeBenito 53da70
##	

Chris PeBenito 53da70
##	

Chris PeBenito 53da70
##	This interface has been deprecated, please
Chris PeBenito 53da70
##	use the seutil_manage_config() interface instead.
Chris PeBenito 53da70
##	

Chris PeBenito 53da70
## </desc>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Domain allowed access.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito bbcd3c
## <rolecap/>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`seutil_manage_selinux_config',`
Chris PeBenito 53da70
	refpolicywarn(`$0($*) has been deprecated.  Please use seutil_manage_config() instead.')
Chris PeBenito 53da70
	seutil_manage_config($1)
Chris PeBenito 53da70
')
Chris PeBenito 53da70
Chris PeBenito 53da70
#######################################
Chris PeBenito 53da70
## <summary>
Chris PeBenito 53da70
##	Create, read, write, and delete
Chris PeBenito 53da70
##	the general selinux configuration files.
Chris PeBenito 53da70
## </summary>
Chris PeBenito 53da70
## <param name="domain">
Chris PeBenito 53da70
##	<summary>
Chris PeBenito 53da70
##	Domain allowed access.
Chris PeBenito 53da70
##	</summary>
Chris PeBenito 53da70
## </param>
Chris PeBenito 53da70
## <rolecap/>
Chris PeBenito 53da70
#
Chris PeBenito 53da70
interface(`seutil_manage_config',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type selinux_config_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	files_search_etc($1)
Chris PeBenito c0868a
	manage_files_pattern($1,selinux_config_t,selinux_config_t)
Chris PeBenito c0868a
	read_lnk_files_pattern($1,selinux_config_t,selinux_config_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 582438
#######################################
Chris PeBenito 582438
## <summary>
Chris PeBenito 582438
##	Create, read, write, and delete
Chris PeBenito 582438
##	the general selinux configuration files.
Chris PeBenito 582438
## </summary>
Chris PeBenito 582438
## <param name="domain">
Chris PeBenito 582438
##	<summary>
Chris PeBenito 582438
##	Domain allowed access.
Chris PeBenito 582438
##	</summary>
Chris PeBenito 582438
## </param>
Chris PeBenito 582438
## <rolecap/>
Chris PeBenito 582438
#
Chris PeBenito 582438
interface(`seutil_manage_config_dirs',`
Chris PeBenito 582438
	gen_require(`
Chris PeBenito 582438
		type selinux_config_t;
Chris PeBenito 582438
	')
Chris PeBenito 582438
Chris PeBenito 582438
	files_search_etc($1)
Chris PeBenito 582438
	allow $1 selinux_config_t:dir manage_dir_perms;
Chris PeBenito 582438
')
Chris PeBenito 582438
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Search the policy directory with default_context files.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Domain allowed access.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`seutil_search_default_contexts',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type selinux_config_t, default_context_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	files_search_etc($1)
Chris PeBenito c0868a
	search_dirs_pattern($1,selinux_config_t,default_context_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Read the default_contexts files.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Domain allowed access.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito bbcd3c
## <rolecap/>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`seutil_read_default_contexts',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type selinux_config_t, default_context_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	files_search_etc($1)
Chris PeBenito 4bc6e3
	allow $1 selinux_config_t:dir search_dir_perms;
Chris PeBenito 4bc6e3
	allow $1 default_context_t:dir list_dir_perms;
Chris PeBenito c0868a
	read_files_pattern($1,default_context_t,default_context_t)
Chris PeBenito 4bc6e3
')
Chris PeBenito 4bc6e3
Chris PeBenito 4bc6e3
########################################
Chris PeBenito 4bc6e3
## <summary>
Chris PeBenito 4bc6e3
##	Create, read, write, and delete the default_contexts files.
Chris PeBenito 4bc6e3
## </summary>
Chris PeBenito 4bc6e3
## <param name="domain">
Chris PeBenito 4bc6e3
##	<summary>
Chris PeBenito 4bc6e3
##	Domain allowed access.
Chris PeBenito 4bc6e3
##	</summary>
Chris PeBenito 4bc6e3
## </param>
Chris PeBenito 4bc6e3
#
Chris PeBenito 4bc6e3
interface(`seutil_manage_default_contexts',`
Chris PeBenito 4bc6e3
	gen_require(`
Chris PeBenito 4bc6e3
		type selinux_config_t, default_context_t;
Chris PeBenito 4bc6e3
	')
Chris PeBenito 4bc6e3
Chris PeBenito 4bc6e3
	files_search_etc($1)
Chris PeBenito 4bc6e3
	allow $1 selinux_config_t:dir search_dir_perms;
Chris PeBenito c0868a
	manage_files_pattern($1,default_context_t,default_context_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Read the file_contexts files.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Domain allowed access.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito bbcd3c
## <rolecap/>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`seutil_read_file_contexts',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito c0868a
		type selinux_config_t, default_context_t, file_context_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	files_search_etc($1)
Chris PeBenito c0868a
	allow $1 { selinux_config_t default_context_t }:dir search_dir_perms;
Chris PeBenito c0868a
	read_files_pattern($1,file_context_t,file_context_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Read and write the file_contexts files.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Domain allowed access.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`seutil_rw_file_contexts',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 8f3a0a
		type selinux_config_t, file_context_t, default_context_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	files_search_etc($1)
Chris PeBenito c0868a
	allow $1 { selinux_config_t default_context_t }:dir search_dir_perms;
Chris PeBenito c0868a
	rw_files_pattern($1,file_context_t,file_context_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Create, read, write, and delete the file_contexts files.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Domain allowed access.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito bbcd3c
## <rolecap/>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`seutil_manage_file_contexts',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 8f3a0a
		type selinux_config_t, file_context_t, default_context_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	files_search_etc($1)
Chris PeBenito 4bc6e3
	allow $1 { selinux_config_t default_context_t }:dir search_dir_perms;
Chris PeBenito c0868a
	manage_files_pattern($1,file_context_t,file_context_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Read the SELinux binary policy.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Domain allowed access.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`seutil_read_bin_policy',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type selinux_config_t, policy_config_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	files_search_etc($1)
Chris PeBenito c0868a
	allow $1 selinux_config_t:dir search_dir_perms;
Chris PeBenito c0868a
	read_files_pattern($1,policy_config_t,policy_config_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Create the SELinux binary policy.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Domain allowed access.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`seutil_create_bin_policy',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
#		attribute can_write_binary_policy;
Chris PeBenito 17de1b
		type selinux_config_t, policy_config_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	files_search_etc($1)
Chris PeBenito c0868a
	allow $1 selinux_config_t:dir search_dir_perms;
Chris PeBenito c0868a
	create_files_pattern($1,policy_config_t,policy_config_t)
Chris PeBenito c0868a
	write_files_pattern($1,policy_config_t,policy_config_t)
Chris PeBenito 17de1b
#	typeattribute $1 can_write_binary_policy;
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Allow the caller to relabel a file to the binary policy type.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Domain allowed access.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`seutil_relabelto_bin_policy',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		attribute can_relabelto_binary_policy;
Chris PeBenito 17de1b
		type policy_config_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	allow $1 policy_config_t:file relabelto;
Chris PeBenito 17de1b
	typeattribute $1 can_relabelto_binary_policy;
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Create, read, write, and delete the SELinux
Chris PeBenito 17de1b
##	binary policy.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Domain allowed access.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`seutil_manage_bin_policy',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		attribute can_write_binary_policy;
Chris PeBenito 17de1b
		type selinux_config_t, policy_config_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	files_search_etc($1)
Chris PeBenito c0868a
	allow $1 selinux_config_t:dir search_dir_perms;
Chris PeBenito c0868a
	manage_files_pattern($1,policy_config_t,policy_config_t)
Chris PeBenito 17de1b
	typeattribute $1 can_write_binary_policy;
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Read SELinux policy source files.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Domain allowed access.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`seutil_read_src_policy',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type selinux_config_t, policy_src_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	files_search_etc($1)
Chris PeBenito c0868a
	list_dirs_pattern($1,selinux_config_t,policy_src_t)
Chris PeBenito c0868a
	read_files_pattern($1,policy_src_t,policy_src_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Create, read, write, and delete SELinux
Chris PeBenito 17de1b
##	policy source files.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Domain allowed access.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito bbcd3c
## <rolecap/>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`seutil_manage_src_policy',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type selinux_config_t, policy_src_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	files_search_etc($1)
Chris PeBenito c0868a
	allow $1 selinux_config_t:dir search_dir_perms;
Chris PeBenito c0868a
	manage_dirs_pattern($1,policy_src_t,policy_src_t)
Chris PeBenito c0868a
	manage_files_pattern($1,policy_src_t,policy_src_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Execute a domain transition to run semanage.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Domain allowed to transition.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`seutil_domtrans_semanage',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type semanage_t, semanage_exec_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	files_search_usr($1)
Chris PeBenito 17de1b
	corecmd_search_bin($1)
Chris PeBenito c0868a
	domtrans_pattern($1,semanage_exec_t,semanage_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Execute semanage in the semanage domain, and
Chris PeBenito 17de1b
##	allow the specified role the semanage domain,
Chris PeBenito 17de1b
##	and use the caller's terminal.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Domain allowed access.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
## <param name="role">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	The role to be allowed the checkpolicy domain.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
## <param name="terminal">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	The type of the terminal allow the semanage domain to use.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito bbcd3c
## <rolecap/>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`seutil_run_semanage',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type semanage_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	seutil_domtrans_semanage($1)
Chris PeBenito d87efe
	seutil_run_setfiles(semanage_t, $2, $3)
Chris PeBenito d87efe
	seutil_run_loadpolicy(semanage_t, $2, $3)
Chris PeBenito 17de1b
	role $2 types semanage_t;
Chris PeBenito 17de1b
	allow semanage_t $3:chr_file rw_term_perms;
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Full management of the semanage
Chris PeBenito 17de1b
##	module store.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Domain allowed access.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`seutil_manage_module_store',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type selinux_config_t, semanage_store_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	files_search_etc($1)
Chris PeBenito c0868a
	manage_dirs_pattern($1,selinux_config_t,semanage_store_t)
Chris PeBenito c0868a
	manage_files_pattern($1,semanage_store_t,semanage_store_t)
Chris PeBenito c0868a
	filetrans_pattern($1,selinux_config_t,semanage_store_t,dir)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
#######################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Get read lock on module store
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Domain allowed access.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`seutil_get_semanage_read_lock',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type selinux_config_t, semanage_read_lock_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	files_search_etc($1)
Chris PeBenito c0868a
	rw_files_pattern($1,selinux_config_t,semanage_read_lock_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
#######################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Get trans lock on module store
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Domain allowed access.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`seutil_get_semanage_trans_lock',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type selinux_config_t, semanage_trans_lock_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	files_search_etc($1)
Chris PeBenito c0868a
	rw_files_pattern($1,selinux_config_t,semanage_trans_lock_t)
Chris PeBenito 17de1b
')
Chris PeBenito eeef8d
Chris PeBenito eeef8d
########################################
Chris PeBenito eeef8d
## <summary>
Chris PeBenito eeef8d
##	SELinux-enabled program access for
Chris PeBenito eeef8d
##	libselinux-linked programs.
Chris PeBenito eeef8d
## </summary>
Chris PeBenito eeef8d
## <desc>
Chris PeBenito eeef8d
##	

Chris PeBenito eeef8d
##	SELinux-enabled programs are typically
Chris PeBenito eeef8d
##	linked to the libselinux library.  This
Chris PeBenito eeef8d
##	interface will allow access required for
Chris PeBenito eeef8d
##	the libselinux constructor to function.
Chris PeBenito eeef8d
##	

Chris PeBenito eeef8d
## </desc>
Chris PeBenito eeef8d
## <param name="domain">
Chris PeBenito eeef8d
##	<summary>
Chris PeBenito eeef8d
##	Domain allowed access.
Chris PeBenito eeef8d
##	</summary>
Chris PeBenito eeef8d
## </param>
Chris PeBenito eeef8d
#
Chris PeBenito eeef8d
interface(`seutil_libselinux_linked',`
Chris PeBenito eeef8d
	selinux_get_fs_mount($1)
Chris PeBenito eeef8d
	seutil_read_config($1)
Chris PeBenito eeef8d
')
Chris PeBenito eeef8d
Chris PeBenito eeef8d
########################################
Chris PeBenito eeef8d
## <summary>
Chris PeBenito eeef8d
##	Do not audit SELinux-enabled program access for
Chris PeBenito eeef8d
##	libselinux-linked programs.
Chris PeBenito eeef8d
## </summary>
Chris PeBenito eeef8d
## <desc>
Chris PeBenito eeef8d
##	

Chris PeBenito eeef8d
##	SELinux-enabled programs are typically
Chris PeBenito eeef8d
##	linked to the libselinux library.  This
Chris PeBenito eeef8d
##	interface will dontaudit access required for
Chris PeBenito eeef8d
##	the libselinux constructor to function.
Chris PeBenito eeef8d
##	

Chris PeBenito eeef8d
##	

Chris PeBenito eeef8d
##	Generally this should not be used on anything
Chris PeBenito eeef8d
##	but simple SELinux-enabled programs that do not
Chris PeBenito eeef8d
##	rely on data initialized by the libselinux
Chris PeBenito eeef8d
##	constructor.
Chris PeBenito eeef8d
##	

Chris PeBenito eeef8d
## </desc>
Chris PeBenito eeef8d
## <param name="domain">
Chris PeBenito eeef8d
##	<summary>
Chris PeBenito eeef8d
##	Domain allowed access.
Chris PeBenito eeef8d
##	</summary>
Chris PeBenito eeef8d
## </param>
Chris PeBenito eeef8d
#
Chris PeBenito eeef8d
interface(`seutil_dontaudit_libselinux_linked',`
Chris PeBenito eeef8d
	selinux_dontaudit_get_fs_mount($1)
Chris PeBenito eeef8d
	seutil_dontaudit_read_config($1)
Chris PeBenito eeef8d
')