Chris PeBenito e32d52
## <module name="mount" layer="system">
Chris PeBenito e32d52
## <summary>Policy for mount.</summary>
Chris PeBenito b5ab18
Chris PeBenito daa0e0
########################################
Chris PeBenito c9428d
## <interface name="mount_domtrans">
Chris PeBenito daa0e0
##	<description>
Chris PeBenito daa0e0
##		Execute mount in the mount domain.
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 b5ab18
#
Chris PeBenito c9428d
define(`mount_domtrans',`
Chris PeBenito 0c73cd
	requires_block_template(`$0'_depend)
Chris PeBenito 0c73cd
Chris PeBenito cc41a9
	allow $1 mount_exec_t:file rx_file_perms;
Chris PeBenito 0c73cd
	allow $1 mount_t:process transition;
Chris PeBenito 0c73cd
	type_transition $1 mount_exec_t:process mount_t;
Chris PeBenito 0c73cd
	dontaudit $1 mount_t:process { noatsecure siginh rlimitinh };
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	allow $1 mount_t:fd use;
Chris PeBenito 0c73cd
	allow mount_t $1:fd use;
Chris PeBenito 0c73cd
	allow mount_t $1:fifo_file rw_file_perms;
Chris PeBenito 0c73cd
	allow mount_t $1:process sigchld;
Chris PeBenito b5ab18
')
Chris PeBenito b5ab18
Chris PeBenito c9428d
define(`mount_domtrans_depend',`
Chris PeBenito 0c73cd
	type mount_t, mount_exec_t;
Chris PeBenito 0c73cd
Chris PeBenito cc41a9
	class file rx_file_perms;
Chris PeBenito 0c73cd
	class process { transition noatsecure siginh rlimitinh sigchld };
Chris PeBenito 0c73cd
	class fd use;
Chris PeBenito 0c73cd
	class fifo_file rw_file_perms;
Chris PeBenito b5ab18
')
Chris PeBenito b5ab18
Chris PeBenito daa0e0
########################################
Chris PeBenito c9428d
## <interface name="mount_run">
Chris PeBenito daa0e0
##	<description>
Chris PeBenito daa0e0
##		Execute mount in the mount domain, and
Chris PeBenito daa0e0
##		allow the specified role the mount domain,
Chris PeBenito daa0e0
##		and use the caller's terminal.
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
##	<parameter name="role">
Chris PeBenito daa0e0
##		The role to be allowed the mount domain.
Chris PeBenito daa0e0
##	</parameter>
Chris PeBenito daa0e0
##	<parameter name="terminal">
Chris PeBenito daa0e0
##		The type of the terminal allow the mount domain to use.
Chris PeBenito daa0e0
##	</parameter>
Chris PeBenito daa0e0
## </interface>
Chris PeBenito daa0e0
#
Chris PeBenito c9428d
define(`mount_run',`
Chris PeBenito 0c73cd
	requires_block_template(`$0'_depend)
Chris PeBenito 0c73cd
Chris PeBenito c9428d
	mount_domtrans($1)
Chris PeBenito 0c73cd
	role $2 types mount_t;
Chris PeBenito cc41a9
	allow mount_t $3:chr_file rw_file_perms;
Chris PeBenito daa0e0
')
Chris PeBenito daa0e0
Chris PeBenito c9428d
define(`mount_run_depend',`
Chris PeBenito 0c73cd
	type mount_t;
Chris PeBenito 0c73cd
Chris PeBenito cc41a9
	class chr_file rw_file_perms;
Chris PeBenito daa0e0
')
Chris PeBenito daa0e0
Chris PeBenito 3865d6
########################################
Chris PeBenito c9428d
## <interface name="mount_use_fd">
Chris PeBenito 3865d6
##     <description>
Chris PeBenito 3865d6
##             Use file descriptors for mount.
Chris PeBenito 3865d6
##     </description>
Chris PeBenito 3865d6
##     <parameter name="domain">
Chris PeBenito 3865d6
##             The type of the process performing this action.
Chris PeBenito 3865d6
##     </parameter>
Chris PeBenito 3865d6
## </interface>
Chris PeBenito b5ab18
#
Chris PeBenito c9428d
define(`mount_use_fd',`
Chris PeBenito 0c73cd
	requires_block_template(`$0'_depend)
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	allow $1 mount_t:fd use; 
Chris PeBenito b5ab18
')
Chris PeBenito b5ab18
Chris PeBenito c9428d
define(`mount_use_fd_depend',`
Chris PeBenito 0c73cd
	type mount_t;
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	class fd use;
Chris PeBenito b5ab18
')
Chris PeBenito b5ab18
Chris PeBenito 3865d6
########################################
Chris PeBenito 3865d6
## <interface name="mount_send_nfs_client_request">
Chris PeBenito 3865d6
##     <description>
Chris PeBenito 3865d6
##             Allow the mount domain to send nfs requests for mounting
Chris PeBenito 3865d6
##             network drives
Chris PeBenito 3865d6
##     </description>
Chris PeBenito 3865d6
##     <parameter name="domain">
Chris PeBenito 3865d6
##             The type of the process performing this action.
Chris PeBenito 3865d6
##     </parameter>
Chris PeBenito 3865d6
## </interface>
Chris PeBenito b5ab18
#
Chris PeBenito b5ab18
define(`mount_send_nfs_client_request',`
Chris PeBenito 0c73cd
	requires_block_template(`$0'_depend)
Chris PeBenito 0c73cd
Chris PeBenito cc41a9
	allow $1 mount_t:udp_socket rw_socket_perms;
Chris PeBenito b5ab18
')
Chris PeBenito b5ab18
Chris PeBenito b5ab18
define(`mount_send_nfs_client_request_depend',`
Chris PeBenito 0c73cd
	type mount_t;
Chris PeBenito 0c73cd
Chris PeBenito cc41a9
	class udp_socket rw_socket_perms;
Chris PeBenito b5ab18
')
Chris PeBenito e32d52
Chris PeBenito e32d52
## </module>