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

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

Chris PeBenito 17de1b
##	

Chris PeBenito 17de1b
##	This interface has been deprecated as these rules were
Chris PeBenito 17de1b
##	a side effect of leaked mount file descriptors.  This
Chris PeBenito 17de1b
##	interface has no effect.
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(`mount_send_nfs_client_request',`
Chris PeBenito ea3c1f
	refpolicywarn(`$0($*) has been deprecated.')
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Execute mount in the unconfined mount 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(`mount_domtrans_unconfined',`
Chris PeBenito 17de1b
	ifdef(`targeted_policy',`
Chris PeBenito 17de1b
		gen_require(`
Chris PeBenito 17de1b
			type unconfined_mount_t, mount_exec_t;
Chris PeBenito 17de1b
		')
Chris PeBenito 17de1b
Chris PeBenito c0868a
		domtrans_pattern($1,mount_exec_t,unconfined_mount_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
		allow $1 unconfined_mount_t:fd use;
Chris PeBenito 17de1b
		allow unconfined_mount_t $1:fd use;
Chris PeBenito 17de1b
		allow unconfined_mount_t $1:fifo_file rw_file_perms;
Chris PeBenito 17de1b
		allow unconfined_mount_t $1:process sigchld;
Chris PeBenito 17de1b
	',`
Chris PeBenito c0868a
		mount_domtrans($1)
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
')