Chris PeBenito 17de1b7
## <summary>Policy for mount.</summary>
Chris PeBenito 17de1b7
Chris PeBenito 17de1b7
########################################
Chris PeBenito 17de1b7
## <summary>
Chris PeBenito 17de1b7
##	Execute mount in the mount domain.
Chris PeBenito 17de1b7
## </summary>
Chris PeBenito 17de1b7
## <param name="domain">
Chris PeBenito 17de1b7
##	<summary>
Chris PeBenito 17de1b7
##	The type of the process performing this action.
Chris PeBenito 17de1b7
##	</summary>
Chris PeBenito 17de1b7
## </param>
Chris PeBenito 17de1b7
#
Chris PeBenito 17de1b7
interface(`mount_domtrans',`
Chris PeBenito 17de1b7
	gen_require(`
Chris PeBenito 17de1b7
		type mount_t, mount_exec_t;
Chris PeBenito 17de1b7
	')
Chris PeBenito 17de1b7
Chris PeBenito c0868a7
	domtrans_pattern($1,mount_exec_t,mount_t)
Chris PeBenito 17de1b7
')
Chris PeBenito 17de1b7
Chris PeBenito 17de1b7
########################################
Chris PeBenito 17de1b7
## <summary>
Chris PeBenito 17de1b7
##	Execute mount in the mount domain, and
Chris PeBenito 17de1b7
##	allow the specified role the mount domain,
Chris PeBenito 17de1b7
##	and use the caller's terminal.
Chris PeBenito 17de1b7
## </summary>
Chris PeBenito 17de1b7
## <param name="domain">
Chris PeBenito 17de1b7
##	<summary>
Chris PeBenito 17de1b7
##	The type of the process performing this action.
Chris PeBenito 17de1b7
##	</summary>
Chris PeBenito 17de1b7
## </param>
Chris PeBenito 17de1b7
## <param name="role">
Chris PeBenito 17de1b7
##	<summary>
Chris PeBenito 17de1b7
##	The role to be allowed the mount domain.
Chris PeBenito 17de1b7
##	</summary>
Chris PeBenito 17de1b7
## </param>
Chris PeBenito 17de1b7
## <param name="terminal">
Chris PeBenito 17de1b7
##	<summary>
Chris PeBenito 17de1b7
##	The type of the terminal allow the mount domain to use.
Chris PeBenito 17de1b7
##	</summary>
Chris PeBenito 17de1b7
## </param>
Chris PeBenito bbcd3c9
## <rolecap/>
Chris PeBenito 17de1b7
#
Chris PeBenito 17de1b7
interface(`mount_run',`
Chris PeBenito 17de1b7
	gen_require(`
Chris PeBenito 17de1b7
		type mount_t;
Chris PeBenito 17de1b7
	')
Chris PeBenito 17de1b7
Chris PeBenito 17de1b7
	mount_domtrans($1)
Chris PeBenito 17de1b7
	role $2 types mount_t;
Chris PeBenito 17de1b7
	allow mount_t $3:chr_file rw_file_perms;
Chris PeBenito 350b6ab
Chris PeBenito 350b6ab
	optional_policy(`
Chris PeBenito 350b6ab
		samba_run_smbmount($1, $2, $3)
Chris PeBenito 350b6ab
	')
Chris PeBenito 17de1b7
')
Chris PeBenito 17de1b7
Chris PeBenito 17de1b7
########################################
Chris PeBenito 17de1b7
## <summary>
Chris PeBenito 17de1b7
##	Execute mount in the caller domain.
Chris PeBenito 17de1b7
## </summary>
Chris PeBenito 17de1b7
## <param name="domain">
Chris PeBenito 17de1b7
##	<summary>
Chris PeBenito 17de1b7
##	The type of the process performing this action.
Chris PeBenito 17de1b7
##	</summary>
Chris PeBenito 17de1b7
## </param>
Chris PeBenito 17de1b7
#
Chris PeBenito 17de1b7
interface(`mount_exec',`
Chris PeBenito 17de1b7
	gen_require(`
Chris PeBenito 17de1b7
		type mount_exec_t;
Chris PeBenito 17de1b7
	')
Chris PeBenito 17de1b7
Chris PeBenito c0868a7
	# cjp: this should be removed:
Chris PeBenito c0868a7
	allow $1 mount_exec_t:dir list_dir_perms;
Chris PeBenito 17de1b7
Chris PeBenito c0868a7
	allow $1 mount_exec_t:lnk_file read_lnk_file_perms;
Chris PeBenito c0868a7
	can_exec($1,mount_exec_t)
Chris PeBenito 17de1b7
')
Chris PeBenito 17de1b7
Chris PeBenito 17de1b7
########################################
Chris PeBenito 17de1b7
## <summary>
Chris PeBenito 17de1b7
##	Use file descriptors for mount.
Chris PeBenito 17de1b7
## </summary>
Chris PeBenito 17de1b7
## <param name="domain">
Chris PeBenito 17de1b7
##	<summary>
Chris PeBenito 17de1b7
##	The type of the process performing this action.
Chris PeBenito 17de1b7
##	</summary>
Chris PeBenito 17de1b7
## </param>
Chris PeBenito 17de1b7
#
Chris PeBenito 17de1b7
interface(`mount_use_fds',`
Chris PeBenito 17de1b7
	gen_require(`
Chris PeBenito 17de1b7
		type mount_t;
Chris PeBenito 17de1b7
	')
Chris PeBenito 17de1b7
Chris PeBenito 17de1b7
	allow $1 mount_t:fd use; 
Chris PeBenito 17de1b7
')
Chris PeBenito 17de1b7
Chris PeBenito 17de1b7
########################################
Chris PeBenito 17de1b7
## <summary>
Chris PeBenito 17de1b7
##	Allow the mount domain to send nfs requests for mounting
Chris PeBenito 17de1b7
##	network drives
Chris PeBenito 17de1b7
## </summary>
Chris PeBenito 17de1b7
## <desc>
Chris PeBenito 17de1b7
##	

Chris PeBenito 17de1b7
##	Allow the mount domain to send nfs requests for mounting
Chris PeBenito 17de1b7
##	network drives
Chris PeBenito 17de1b7
##	

Chris PeBenito 17de1b7
##	

Chris PeBenito 17de1b7
##	This interface has been deprecated as these rules were
Chris PeBenito 17de1b7
##	a side effect of leaked mount file descriptors.  This
Chris PeBenito 17de1b7
##	interface has no effect.
Chris PeBenito 17de1b7
##	

Chris PeBenito 17de1b7
## </desc>
Chris PeBenito 17de1b7
## <param name="domain">
Chris PeBenito 17de1b7
##	<summary>
Chris PeBenito 17de1b7
##	Domain allowed access.
Chris PeBenito 17de1b7
##	</summary>
Chris PeBenito 17de1b7
## </param>
Chris PeBenito 17de1b7
#
Chris PeBenito 17de1b7
interface(`mount_send_nfs_client_request',`
Chris PeBenito ea3c1f5
	refpolicywarn(`$0($*) has been deprecated.')
Chris PeBenito 17de1b7
')
Chris PeBenito 17de1b7
Chris PeBenito 17de1b7
########################################
Chris PeBenito 17de1b7
## <summary>
Chris PeBenito 17de1b7
##	Execute mount in the unconfined mount domain.
Chris PeBenito 17de1b7
## </summary>
Chris PeBenito 17de1b7
## <param name="domain">
Chris PeBenito 17de1b7
##	<summary>
Chris PeBenito 17de1b7
##	Domain allowed access.
Chris PeBenito 17de1b7
##	</summary>
Chris PeBenito 17de1b7
## </param>
Chris PeBenito 17de1b7
#
Chris PeBenito 17de1b7
interface(`mount_domtrans_unconfined',`
Chris PeBenito 350b6ab
	gen_require(`
Chris PeBenito 350b6ab
		type unconfined_mount_t, mount_exec_t;
Chris PeBenito 350b6ab
	')
Chris PeBenito 17de1b7
Chris PeBenito 350b6ab
	domtrans_pattern($1, mount_exec_t, unconfined_mount_t)
Chris PeBenito 350b6ab
')
Chris PeBenito 17de1b7
Chris PeBenito 350b6ab
########################################
Chris PeBenito 350b6ab
## <summary>
Chris PeBenito 350b6ab
##	Execute mount in the unconfined mount domain, and
Chris PeBenito 350b6ab
##	allow the specified role the unconfined mount domain,
Chris PeBenito 350b6ab
##	and use the caller's terminal.
Chris PeBenito 350b6ab
## </summary>
Chris PeBenito 350b6ab
## <param name="domain">
Chris PeBenito 350b6ab
##	<summary>
Chris PeBenito 350b6ab
##	Domain allowed access.
Chris PeBenito 350b6ab
##	</summary>
Chris PeBenito 350b6ab
## </param>
Chris PeBenito 350b6ab
## <param name="role">
Chris PeBenito 350b6ab
##	<summary>
Chris PeBenito 350b6ab
##	The role to be allowed the unconfined mount domain.
Chris PeBenito 350b6ab
##	</summary>
Chris PeBenito 350b6ab
## </param>
Chris PeBenito 350b6ab
## <param name="terminal">
Chris PeBenito 350b6ab
##	<summary>
Chris PeBenito 350b6ab
##	The type of the terminal allow the unconfined mount domain to use.
Chris PeBenito 350b6ab
##	</summary>
Chris PeBenito 350b6ab
## </param>
Chris PeBenito 350b6ab
## <rolecap/>
Chris PeBenito 350b6ab
#
Chris PeBenito 350b6ab
interface(`mount_run_unconfined',`
Chris PeBenito 350b6ab
	gen_require(`
Chris PeBenito 350b6ab
		type unconfined_mount_t;
Chris PeBenito 17de1b7
	')
Chris PeBenito 350b6ab
Chris PeBenito 350b6ab
	mount_domtrans_unconfined($1)
Chris PeBenito 350b6ab
	role $2 types unconfined_mount_t;
Chris PeBenito 350b6ab
	allow unconfined_mount_t $3:chr_file rw_file_perms;
Chris PeBenito 17de1b7
')