Chris PeBenito b5ab18
# Copyright (C) 2005 Tresys Technology, LLC
Chris PeBenito b5ab18
Chris PeBenito daa0e0
########################################
Chris PeBenito daa0e0
## <interface name="mount_transition">
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
##	<infoflow type="write" weight="10"/>
Chris PeBenito daa0e0
## </interface>
Chris PeBenito b5ab18
#
Chris PeBenito b5ab18
define(`mount_transition',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito b5ab18
allow $1 mount_exec_t:file { getattr read execute };
Chris PeBenito b5ab18
allow $1 mount_t:process transition;
Chris PeBenito b5ab18
type_transition $1 mount_exec_t:file mount_t;
Chris PeBenito b5ab18
dontaudit $1 mount_t:process { noatsecure siginh rlimitinh };
Chris PeBenito b5ab18
')
Chris PeBenito b5ab18
Chris PeBenito b5ab18
define(`mount_transition_depend',`
Chris PeBenito b5ab18
type mount_t, mount_exec_t;
Chris PeBenito b5ab18
class file { getattr read execute };
Chris PeBenito b5ab18
class process { transition noatsecure siginh rlimitinh };
Chris PeBenito b5ab18
')
Chris PeBenito b5ab18
Chris PeBenito daa0e0
########################################
Chris PeBenito daa0e0
## <interface name="mount_transition_add_role_use_terminal">
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
##	<infoflow type="write" weight="10"/>
Chris PeBenito daa0e0
## </interface>
Chris PeBenito daa0e0
#
Chris PeBenito daa0e0
define(`mount_transition_add_role_use_terminal',`
Chris PeBenito daa0e0
requires_block_template(`$0'_depend)
Chris PeBenito daa0e0
mount_transition($1)
Chris PeBenito daa0e0
role $2 types mount_t;
Chris PeBenito daa0e0
allow mount_t $3:chr_file { getattr read write ioctl };
Chris PeBenito daa0e0
')
Chris PeBenito daa0e0
Chris PeBenito daa0e0
define(`mount_transition_add_role_use_terminal_depend',`
Chris PeBenito daa0e0
type mount_t;
Chris PeBenito daa0e0
class chr_file { getattr read write ioctl };
Chris PeBenito daa0e0
')
Chris PeBenito daa0e0
Chris PeBenito b5ab18
#######################################
Chris PeBenito b5ab18
#
Chris PeBenito bd202f
# mount_use_file_descriptors(domain)
Chris PeBenito b5ab18
#
Chris PeBenito b5ab18
define(`mount_use_file_descriptors',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito b5ab18
allow $1 mount_t:fd use; 
Chris PeBenito b5ab18
')
Chris PeBenito b5ab18
Chris PeBenito b5ab18
define(`mount_use_file_descriptors_depend',`
Chris PeBenito b5ab18
type mount_t;
Chris PeBenito b5ab18
class fd use;
Chris PeBenito b5ab18
')
Chris PeBenito b5ab18
Chris PeBenito b5ab18
#######################################
Chris PeBenito b5ab18
#
Chris PeBenito bd202f
# mount_send_nfs_client_request(domain)
Chris PeBenito b5ab18
#
Chris PeBenito b5ab18
define(`mount_send_nfs_client_request',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito b5ab18
allow $1 mount_t:udp_socket ioctl read getattr write setattr append bind connect getopt setopt shutdown;
Chris PeBenito b5ab18
')
Chris PeBenito b5ab18
Chris PeBenito b5ab18
define(`mount_send_nfs_client_request_depend',`
Chris PeBenito b5ab18
type mount_t;
Chris PeBenito b5ab18
class udp_socket { ioctl read getattr write setattr append bind connect getopt setopt shutdown };
Chris PeBenito b5ab18
')